Standard.Licensing icon indicating copy to clipboard operation
Standard.Licensing copied to clipboard

Fix parsing of Expiration. Fix comparison of Expiration. Add unit tests.

Open skst opened this issue 11 months ago • 0 comments

This PR fixes #17.

  • The Expiration property was returning an Unspecified DateTime type. Added the AdjustToUniversal style to Parse.
  • Convert DateTime passed to ExpirationDate to UTC before comparing with Expiration property (which is UTC).
  • Added a validation to Expiration.set to ensure the incoming type is not Unspecified.
  • Added a validation to ExpiresAt to ensure the incoming type is not Unspecified.
  • Added more unit tests around ExpiresAt and Expiration.
  • 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.

skst avatar Feb 27 '25 18:02 skst