Skip to content

Commit 111f8cb

Browse files
committed
Update KeyTest.java
1 parent 1cda009 commit 111f8cb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/test/java/io/cryptolens/KeyTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,22 @@ public void testApp() throws Exception {
6363

6464
LicenseKey license = Key.Activate(auth, RSAPubKey, new ActivateModel(3349, "ICVLD-VVSZR-ZTICT-YKGXL", Helpers.GetMachineCode()), error);
6565

66+
67+
if(license != null) {
68+
// activation/validation did not work.
69+
}
70+
71+
if(license.MaxNoOfMachines != 0 && !Helpers.IsOnRightMachine(license,true)) {
72+
// since MaxNoOfMachines > 0, devices are being tracked, so we
73+
// check if this device was activated.
74+
// the "true" parameter refers to "isFloatingLicense".
75+
}
76+
77+
// if we are here, everything went well.
78+
79+
80+
81+
6682
if (license == null || !Helpers.IsOnRightMachine(license)) {
6783
System.out.println("The license does not work.");
6884
System.out.println("Error: " + error.message);

0 commit comments

Comments
 (0)