Standard.Licensing
Standard.Licensing copied to clipboard
Fix parsing of Expiration. Fix comparison of Expiration. Add unit tests.
This PR fixes #17.
- The
Expirationproperty was returning an UnspecifiedDateTimetype. Added the AdjustToUniversal style toParse. - Convert
DateTimepassed toExpirationDateto UTC before comparing withExpirationproperty (which is UTC). - Added a validation to
Expiration.setto ensure the incoming type is not Unspecified. - Added a validation to
ExpiresAtto ensure the incoming type is not Unspecified. - Added more unit tests around
ExpiresAtandExpiration. - All unit tests pass.
This is my first pull request ever. 🙂 I tried to add relevant tests and to maintain the project's coding style (indents, spaces not tabs, etc.). If I introduced an error or missed something, please let me know, and I will be happy to correct it.