public void Feature_UserMultipleCheckouts_PropertyReturnsAreCorrect() { UtilityProgram.Instance.Executable = new FileInfo("MockUtil.exe"); License license = new License() { Port = MockUtil.Program.NoDelayPort, Host = "LmStatTest" }; license.GetStatus(); string expectedName = "User_Multiple_Checkouts"; Feature target = license.Features.First(f => f.Name == expectedName); PropertiesComparer.AssertFeaturePropertiesAreEqual( actual: target, name: expectedName, quantityIssued: 9, quantityUsed: 8, quantityAvailable: 1, quantityBorrowed: 2, usersCount: 4, vendor: "testdaemon", version: "v22.0", type: "floating license", inUse: true, hasError: false, errorMessage: null, entryIndex: target.EntryIndex, entryLength: 553 + (4 * indexOffset)); }
public void Feature_Empty_PropertyReturnsAreCorrect() { UtilityProgram.Instance.Executable = new FileInfo("MockUtil.exe"); License license = new License() { Port = MockUtil.Program.NoDelayPort, Host = "LmStatTest" }; license.GetStatus(); string expectedName = "Empty_Feature_One_License"; Feature target = license.Features.First(f => f.Name == expectedName); PropertiesComparer.AssertFeaturePropertiesAreEqual( actual: target, name: expectedName, quantityIssued: 1, quantityUsed: 0, quantityAvailable: 1, quantityBorrowed: 0, usersCount: 0, vendor: null, version: null, type: null, inUse: false, hasError: false, errorMessage: null, entryIndex: 450 + indexOffset, entryLength: 97); }
public void Feature_Error_PropertyReturnsAreCorrect() { UtilityProgram.Instance.Executable = new FileInfo("MockUtil.exe"); License license = new License() { Port = MockUtil.Program.NoDelayPort, Host = "LmStatTest" }; license.GetStatus(); string expectedName = "Feature_With_Error"; Feature target = license.Features.First(f => f.Name == expectedName); PropertiesComparer.AssertFeaturePropertiesAreEqual( actual: target, name: expectedName, quantityIssued: 0, quantityUsed: 0, quantityAvailable: 0, quantityBorrowed: 0, usersCount: 0, vendor: null, version: null, type: null, inUse: false, hasError: true, errorMessage: "Cannot get users of Feature_With_Error: No such feature exists. (-5,222)", entryIndex: 802 + (2 * indexOffset), entryLength: 105); }