mirror of
https://github.com/junian/Standard.Licensing.git
synced 2026-04-25 05:45:51 +03:00
[PR #47] Fix parsing of Expiration. Fix comparison of Expiration. Add unit tests. #49
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Standard.Licensing#49
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/junian/Standard.Licensing/pull/47
Author: @skst
Created: 2/27/2025
Status: 🔄 Open
Base:
master← Head:expiration-fixes📝 Commits (2)
2fb8ddbFix parsing of Expiration. Fix comparison of Expiration. Add unit tests.316358bRemove breaking validation. Fix comparison of Expiration. Add unit tests.📊 Changes
5 files changed (+138 additions, -16 deletions)
View changed files
📝
src/Standard.Licensing.Tests/LicenseSignatureTests.cs(+14 -4)📝
src/Standard.Licensing.Tests/LicenseValidationTests.cs(+87 -5)📝
src/Standard.Licensing/License.cs(+21 -4)📝
src/Standard.Licensing/LicenseBuilder.cs(+10 -1)📝
src/Standard.Licensing/Validation/LicenseValidationExtensions.cs(+6 -2)📄 Description
This PR fixes #17.
Expirationproperty was returning an UnspecifiedDateTimetype. Added the AdjustToUniversal style toParse.DateTimepassed toExpirationDateto UTC before comparing withExpirationproperty (which is UTC).Expiration.setto ensure the incoming type is not Unspecified.ExpiresAtto ensure the incoming type is not Unspecified.ExpiresAtandExpiration.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.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.