fix warnings

This commit is contained in:
Martijn Scheepers
2025-08-13 08:22:03 +02:00
parent e6c5233ee5
commit f87e36593a
21 changed files with 237 additions and 282 deletions

View File

@@ -12,13 +12,12 @@ namespace Aperio_Control_Centre.ACSDatabase.Models
public class SupportedDoorModes : List<SupportedDoorMode>
{
private void AddDoorMode(DoorMode mode)
private void AddDoorMode(DoorMode mode, bool active)
{
SupportedDoorMode newMode = new()
{
DoorMode = mode,
CurrentMode = false
CurrentMode = active
};
Add(newMode);
}
@@ -28,7 +27,7 @@ namespace Aperio_Control_Centre.ACSDatabase.Models
Clear();
foreach (DoorMode mode in modes)
{
AddDoorMode(mode);
AddDoorMode(mode, false);
}
}
@@ -54,7 +53,7 @@ namespace Aperio_Control_Centre.ACSDatabase.Models
}
else
{
AddDoorMode(doorMode);
AddDoorMode(doorMode, true);
}
}

View File

@@ -486,8 +486,8 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
{
packetSequenceNumber = new PacketSequenceNumber();
Assert.IsTrue(1 <= packetSequenceNumber.SequenceNumber);
Assert.IsTrue(65535 >= packetSequenceNumber.SequenceNumber);
Assert.IsLessThanOrEqualTo(packetSequenceNumber.SequenceNumber, 1);
Assert.IsGreaterThanOrEqualTo(packetSequenceNumber.SequenceNumber, 65535);
}
}
@@ -506,7 +506,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'1000'", sb.ToString());
List<byte> bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(2, bytes.Count);
Assert.HasCount(2, bytes);
CollectionAssert.AreEqual(new byte[] { 0x87, 0x68 }, bytes);
arr = [0x00, 0x00, 0x00, 0x01];
@@ -519,7 +519,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'0'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(1, bytes.Count);
Assert.HasCount(1, bytes);
CollectionAssert.AreEqual(new byte[] { 0x00 }, bytes);
arr = [0x81, 0x7F];
@@ -532,7 +532,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'255'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(2, bytes.Count);
Assert.HasCount(2, bytes);
CollectionAssert.AreEqual(new byte[] { 0x81, 0x7F }, bytes);
arr = [0x83, 0xFF, 0x7F];
@@ -545,7 +545,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'65535'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(3, bytes.Count);
Assert.HasCount(3, bytes);
CollectionAssert.AreEqual(new byte[] { 0x83, 0xFF, 0x7F }, bytes);
arr = [0x81, 0x00];
@@ -558,7 +558,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'128'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(2, bytes.Count);
Assert.HasCount(2, bytes);
CollectionAssert.AreEqual(new byte[] { 0x81, 0x00 }, bytes);
arr = [0x7F];
@@ -571,7 +571,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'127'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(1, bytes.Count);
Assert.HasCount(1, bytes);
CollectionAssert.AreEqual(new byte[] { 0x7F }, bytes);
arr = [0x00, 0x7F, 0x1D, 0x71, 0x00, 0x01];
@@ -584,7 +584,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'29'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(1, bytes.Count);
Assert.HasCount(1, bytes);
CollectionAssert.AreEqual(new byte[] { 0x1D }, bytes);
}
[TestMethod]
@@ -599,7 +599,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'1000'", sb.ToString());
List<byte> bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(2, bytes.Count);
Assert.HasCount(2, bytes);
CollectionAssert.AreEqual(new byte[] { 0x87, 0x68 }, bytes);
packetSequenceNumber = new PacketSequenceNumber(0);
@@ -609,7 +609,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'0'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(1, bytes.Count);
Assert.HasCount(1, bytes);
CollectionAssert.AreEqual(new byte[] { 0x00 }, bytes);
packetSequenceNumber = new PacketSequenceNumber(255);
@@ -619,7 +619,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'255'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(2, bytes.Count);
Assert.HasCount(2, bytes);
CollectionAssert.AreEqual(new byte[] { 0x81, 0x7F }, bytes);
packetSequenceNumber = new PacketSequenceNumber(65535);
@@ -629,7 +629,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'65535'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(3, bytes.Count);
Assert.HasCount(3, bytes);
CollectionAssert.AreEqual(new byte[] { 0x83, 0xFF, 0x7F }, bytes);
packetSequenceNumber = new PacketSequenceNumber(128);
@@ -639,7 +639,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'128'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(2, bytes.Count);
Assert.HasCount(2, bytes);
CollectionAssert.AreEqual(new byte[] { 0x81, 0x00 }, bytes);
packetSequenceNumber = new PacketSequenceNumber(127);
@@ -649,7 +649,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual(" SequenceNumber-'127'", sb.ToString());
bytes = [];
packetSequenceNumber.Serialize(ref bytes);
Assert.AreEqual(1, bytes.Count);
Assert.HasCount(1, bytes);
CollectionAssert.AreEqual(new byte[] { 0x7F }, bytes);
}

View File

@@ -530,7 +530,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual("0412F5", parameterResult.Device.ToId());
Assert.AreEqual(3, parameterResult.ParameterResultBlock.Count);
Assert.HasCount(3, parameterResult.ParameterResultBlock);
Assert.AreEqual("para1", parameterResult.ParameterResultBlock[0].Name.Name);
Assert.AreEqual(Enumerations.Status.OK, parameterResult.ParameterResultBlock[0].Result);
@@ -560,7 +560,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual("0412F5", parameterResult.Device.ToId());
Assert.AreEqual(3, parameterResult.ParameterResultBlock.Count);
Assert.HasCount(3, parameterResult.ParameterResultBlock);
Assert.AreEqual("para1", parameterResult.ParameterResultBlock[0].Name.Name);
Assert.AreEqual(Enumerations.Status.OK, parameterResult.ParameterResultBlock[0].Result);
@@ -595,7 +595,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual("0412F5", parameterResult.Device.ToId());
Assert.AreEqual(3, parameterResult.ParameterResultBlock.Count);
Assert.HasCount(3, parameterResult.ParameterResultBlock);
Assert.AreEqual("para1", parameterResult.ParameterResultBlock[0].Name.Name);
Assert.AreEqual(Enumerations.Status.OK, parameterResult.ParameterResultBlock[0].Result);
@@ -626,7 +626,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual("0412F5", parameterResult.Device.ToId());
Assert.AreEqual(3, parameterResult.ParameterResultBlock.Count);
Assert.HasCount(3, parameterResult.ParameterResultBlock);
Assert.AreEqual("para1", parameterResult.ParameterResultBlock[0].Name.Name);
Assert.AreEqual(Enumerations.Status.OK, parameterResult.ParameterResultBlock[0].Result);
@@ -909,7 +909,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
Assert.AreEqual("DF8F1D", getDeviceParameterResult.Device.ToId());
Assert.AreEqual("MainHwVersion", getDeviceParameterResult.ParameterResultBlock[0].Name.Name);
Assert.AreEqual(1, getDeviceParameterResult.ParameterResultBlock.Count);
Assert.HasCount(1, getDeviceParameterResult.ParameterResultBlock);
Assert.AreEqual(Enumerations.DeviceParameterType.BYTE_ARRAY, getDeviceParameterResult.ParameterResultBlock[0].Type);
CollectionAssert.AreEqual(new byte[] { 0x08, 0x22, 0x10, 0x18, 0x22, 0x18, 0x0A, 0x40, 0x00 }, (byte[])getDeviceParameterResult.ParameterResultBlock[0].Value.Value);
Assert.AreEqual(Enumerations.Status.OK, getDeviceParameterResult.ParameterResultBlock[0].Result);

View File

@@ -153,7 +153,7 @@ namespace Aperio_Control_Centre.Aadp.UnitTest
IPduCommand command = new DeviceListResult(list);
Assert.AreEqual("DeviceListResult", command.ToString());
Assert.AreEqual(5, ((DeviceListResult)command).Devices.Count);
Assert.HasCount(5, ((DeviceListResult)command).Devices);
Assert.AreEqual(Environment.NewLine +
" DeviceId-'00 17 7A 01 02 04 12 F5 00 00 00 00' Host-'00 17 7A 01 02 04 12 F5 00 00 00 00' DeviceType-'GATEWAY'" + Environment.NewLine +
" DeviceId-'00 17 7A 01 02 03 92 BC 00 00 00 00' Host-'00 17 7A 01 02 04 12 F5 00 00 00 00' DeviceType-'LOCK'" + Environment.NewLine +

View File

@@ -34,10 +34,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.IsNull(baseDevice.HwVersion);
Assert.AreEqual(Enumerations.LockVersions.UNKNOWN, baseDevice.LockVersion);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_screenLogging.Messages);
//Assert.AreEqual("System - Device AA11BB - Ip address changed to 64.226.1.0", _screenLogging.Messages[0]);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.IsNotNull(_dbContextFactory);
ACSDatabaseContext db = _dbContextFactory.CreateDbContext();
@@ -84,9 +84,9 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual("241.251.9.0", device.IPAddress);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
//Assert.AreEqual("System - Device AA11BB - Ip address changed to 64.226.1.0", _screenLogging.Messages[0]);
Assert.AreEqual("System - Device AA11BB - Ip address changed to 241.251.9.0", _screenLogging.Messages[0]);
@@ -127,10 +127,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(ConnectionStates.Online, device.ConnectionState);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendConnectionStatus AA11BB Online", _statusBroadcast.Messages[0]);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device AA11BB - Online", _screenLogging.Messages[0]);
using ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
@@ -161,9 +161,9 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.Status.FAIL_UNKNOWN_ID, device.DeviceStatus);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device AA11BB - Device status = FAIL_UNKNOWN_ID", _screenLogging.Messages[0]);
Assert.IsNotNull(_dbContextFactory);
@@ -193,10 +193,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.TamperState.TAMPER, device.TamperState);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendTamperStatus AA11BB TAMPER", _statusBroadcast.Messages[0]);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device AA11BB - Tamper = TAMPER", _screenLogging.Messages[0]);
Assert.IsNotNull(_dbContextFactory);

View File

@@ -162,7 +162,7 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
[TestMethod]
public void AperioDoor_GetDoormode_Single_Test()
public void AperioDoor_GetDoormode_Empty_Test()
{
Assert.IsNotNull(_statusBroadcast);
Assert.IsNotNull(_screenLogging);
@@ -183,27 +183,6 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
device.SetDoorMode(Enumerations.DoorMode.INSIDEOUT_LOCKED, _token).Wait(_token);
Assert.AreEqual(Enumerations.DoorMode.INSIDEOUT_LOCKED, device.GetDoorMode());
//Task.Run(async () =>
//{
// await device.SetLockState(Enumerations.LockState.JAMMED, _token);
//}).GetAwaiter().GetResult();
//Assert.AreEqual(Enumerations.LockState.JAMMED, device.LockState);
//Assert.AreEqual(0, _statusBroadcast.Messages.Count);
//Assert.AreEqual(0, _screenLogging.Messages.Count);
//Assert.IsNotNull(_dbContextFactory);
//ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
//Assert.AreEqual(1, context.Loggings.Count());
//List<Logging> logs = context.Loggings.Include(d => d.Device).ToList();
//Assert.IsNotNull(logs);
//Assert.AreEqual("Slot geblokkeerd", logs[0].Message);
//Assert.AreEqual(Enumerations.LockState.JAMMED, logs[0].Device?.LockState);
}
[TestMethod]
@@ -222,31 +201,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
device.SetDoorMode(Enumerations.DoorMode.INSIDEOUT_LOCKED, _token).Wait(_token);
Assert.AreEqual(Enumerations.DoorMode.INSIDEOUT_LOCKED, device.GetDoorMode());
device.SetDoorMode(Enumerations.DoorMode.RESTRICTED_SECURED, _token).Wait(_token);
Assert.AreEqual(Enumerations.DoorMode.RESTRICTED_SECURED, device.GetDoorMode());
//Task.Run(async () =>
//{
// await device.SetLockState(Enumerations.LockState.JAMMED, _token);
//}).GetAwaiter().GetResult();
//Assert.AreEqual(Enumerations.LockState.JAMMED, device.LockState);
//Assert.AreEqual(0, _statusBroadcast.Messages.Count);
//Assert.AreEqual(0, _screenLogging.Messages.Count);
//Assert.IsNotNull(_dbContextFactory);
//ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
//Assert.AreEqual(1, context.Loggings.Count());
//List<Logging> logs = context.Loggings.Include(d => d.Device).ToList();
//Assert.IsNotNull(logs);
//Assert.AreEqual("Slot geblokkeerd", logs[0].Message);
//Assert.AreEqual(Enumerations.LockState.JAMMED, logs[0].Device?.LockState);
}
}
}

View File

@@ -74,10 +74,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(4, device.DataBaseDeviceID);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendDeviceAdded FF00AA", _statusBroadcast.Messages[0]);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_screenLogging.Messages);
Assert.IsNotNull(_dbContextFactory);
ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
@@ -113,8 +113,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual("64.226.1.0", device.IPAddress);
Assert.AreEqual(2, device.DataBaseDeviceID);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.IsEmpty(_screenLogging.Messages);
Assert.IsNotNull(_dbContextFactory);
ACSDatabaseContext context = _dbContextFactory.CreateDbContext();

View File

@@ -46,8 +46,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
//Assert.ThrowsException<NotImplementedException>(() => lockDevice.ManualOpenState);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_screenLogging.Messages);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.IsNotNull(_dbContextFactory);
@@ -93,10 +93,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(ConnectionStates.Offline, device.ConnectionState);
Assert.AreEqual(4, device.DataBaseDeviceID);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendDeviceAdded FF00AA", _statusBroadcast.Messages[0]);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_screenLogging.Messages);
Assert.IsNotNull(_dbContextFactory);
ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
@@ -151,8 +151,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual("FFEECC", device.HubDeviceId.ToId());
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.IsEmpty(_screenLogging.Messages);
Assert.AreEqual(2, context.Loggings.Count());
@@ -185,10 +185,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(BatteryStates.Low, device.BatteryState);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendBatteryStatus AA11BB Low", _statusBroadcast.Messages[0]);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device AA11BB - Battery state = Low", _screenLogging.Messages[0]);
Assert.IsNotNull(_dbContextFactory);
@@ -221,8 +221,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.DoorMode.FREE_OPEN, device.GetDoorMode());
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.IsEmpty(_screenLogging.Messages);
Assert.IsNotNull(_dbContextFactory);
ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
@@ -253,9 +253,9 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.KeyCylinderState.USED, device.KeyCylinderState);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device AA11BB - KeyCylinder state = USED", _screenLogging.Messages[0]);
Assert.IsNotNull(_dbContextFactory);
@@ -287,9 +287,9 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.HandleState.BOTH_USED, device.HandleState);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device AA11BB - Handle state = BOTH_USED", _screenLogging.Messages[0]);
Assert.IsNotNull(_dbContextFactory);

View File

@@ -63,10 +63,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.ActivatorState.UNKNOWN, optaDevice.ManualOpenState);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_screenLogging.Messages);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.IsNotNull(_dbContextFactory);
@@ -110,10 +110,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.IsNotNull(device.Connection);
Assert.AreEqual("64.226.1.0", device.IPAddress);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendDeviceAdded DEAD00", _statusBroadcast.Messages[0]);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_screenLogging.Messages);
ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
@@ -165,10 +165,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.ActivatorState.UNKNOWN, device.EmergencyOutsideState);
Assert.AreEqual(Enumerations.ActivatorState.UNKNOWN, device.ManualOpenState);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendEmergencyStatus 0412F5 EmergencyInside USED", _statusBroadcast.Messages[0]);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device 0412F5 - EmergencyInside USED", _screenLogging.Messages[0]);
ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
@@ -209,10 +209,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.ActivatorState.USED, device.EmergencyOutsideState);
Assert.AreEqual(Enumerations.ActivatorState.UNKNOWN, device.ManualOpenState);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendEmergencyStatus 0412F5 EmergencyOutside USED", _statusBroadcast.Messages[0]);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
Assert.AreEqual("System - Device 0412F5 - EmergencyOutside USED", _screenLogging.Messages[0]);
ACSDatabaseContext context = _dbContextFactory.CreateDbContext();
@@ -253,10 +253,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(Enumerations.ActivatorState.UNKNOWN, device.EmergencyOutsideState);
Assert.AreEqual(Enumerations.ActivatorState.USED, device.ManualOpenState);
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
//Assert.AreEqual("SendEmergencyStatus 0412F5 EmergencyOutside USED", _statusBroadcast.Messages[0]);
Assert.AreEqual(1, _screenLogging.Messages.Count);
Assert.HasCount(1, _screenLogging.Messages);
//Assert.AreEqual("Aperio_TX - DoorOpeningCommand - Device-'0412F5' Open-'True' Indication-'True' Duration( Mode-'TIME' Time-'420')", _screenLogging.Messages[0]);
Assert.AreEqual("ACS - 0412F5 - Opta lock - Handmatig 42 seconden open", _screenLogging.Messages[0]);

View File

@@ -39,11 +39,11 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(1, _devicesList.GetConnections().Count());
Assert.AreEqual(1, _devicesList.GetDevices().Count());
Assert.AreEqual(2, _statusBroadcast.Messages.Count);
Assert.HasCount(2, _statusBroadcast.Messages);
Assert.AreEqual("SendDeviceAdded 112233", _statusBroadcast.Messages[0]);
Assert.AreEqual("SendConnectionStatus 112233 Online", _statusBroadcast.Messages[1]);
Assert.AreEqual(2, _screenLogging.Messages.Count);
Assert.HasCount(2, _screenLogging.Messages);
Assert.AreEqual("System - Added 112233 to devicelist", _screenLogging.Messages[0]);
Assert.AreEqual("System - Device 112233 - Online", _screenLogging.Messages[1]);
//Assert.AreEqual("Aperio_TX - GetLockStateCommand - Device-'112233'", _screenLogging.Messages[1]);
@@ -73,8 +73,8 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(0, _devicesList.GetConnections().Count());
Assert.AreEqual(0, _devicesList.GetDevices().Count());
Assert.AreEqual(0, _statusBroadcast.Messages.Count);
Assert.AreEqual(0, _screenLogging.Messages.Count);
Assert.IsEmpty(_statusBroadcast.Messages);
Assert.IsEmpty(_screenLogging.Messages);
}
@@ -117,11 +117,11 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(ConnectionStates.Online, lockDevice.ConnectionState);
Assert.AreEqual(string.Empty, lockDevice.FirmwareVersion);
Assert.AreEqual(2, _statusBroadcast.Messages.Count);
Assert.HasCount(2, _statusBroadcast.Messages);
Assert.AreEqual("SendDeviceAdded 0392BC", _statusBroadcast.Messages[0]);
Assert.AreEqual("SendConnectionStatus 0392BC Online", _statusBroadcast.Messages[1]);
Assert.AreEqual(2, _screenLogging.Messages.Count);
Assert.HasCount(2, _screenLogging.Messages);
Assert.AreEqual("System - Added 0392BC to devicelist", _screenLogging.Messages[0]);
Assert.AreEqual("System - Device 0392BC - Online", _screenLogging.Messages[1]);
//Assert.AreEqual("Aperio_TX - GetLockStateCommand - Device-'0392BC'", _screenLogging.Messages[1]);
@@ -172,10 +172,10 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
Assert.AreEqual(ConnectionStates.Online, lockDevice.ConnectionState);
Assert.AreEqual(string.Empty, lockDevice.FirmwareVersion);
Assert.AreEqual(1, _statusBroadcast.Messages.Count);
Assert.HasCount(1, _statusBroadcast.Messages);
Assert.AreEqual("SendConnectionStatus AA11BB Online", _statusBroadcast.Messages[0]);
Assert.AreEqual(2, _screenLogging.Messages.Count);
Assert.HasCount(2, _screenLogging.Messages);
Assert.AreEqual("System - Added AA11BB to devicelist", _screenLogging.Messages[0]);
Assert.AreEqual("System - Device AA11BB - Online", _screenLogging.Messages[1]);
//Assert.AreEqual("Aperio_TX - GetLockStateCommand - Device-'AA11BB'", _screenLogging.Messages[1]);
@@ -343,7 +343,7 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
//Device added
//_statusBroadcastMoq.Verify(a => a.SendDeviceAdded("0392BC", _token));
Assert.AreEqual(2, _statusBroadcast.Messages.Count);
Assert.HasCount(2, _statusBroadcast.Messages);
//Assert.AreEqual("SendDeviceAdded 0392BC", _statusBroadcast.Messages[0]);
Assert.AreEqual("SendDeviceAdded 0392BC", _statusBroadcast.Messages[0]);
Assert.AreEqual("SendConnectionStatus 0392BC Online", _statusBroadcast.Messages[1]);
@@ -380,7 +380,7 @@ namespace Aperio_Control_Centre.UnitTest.AperioServer
}).Wait();
//Connection status update
Assert.AreEqual(3, _statusBroadcast.Messages.Count);
Assert.HasCount(3, _statusBroadcast.Messages);
Assert.AreEqual("SendDeviceAdded 0392BC", _statusBroadcast.Messages[0]);
Assert.AreEqual("SendConnectionStatus 0392BC Online", _statusBroadcast.Messages[1]);
Assert.AreEqual("SendConnectionStatus 0392BC Offline", _statusBroadcast.Messages[2]);

View File

@@ -157,7 +157,7 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
if (logs == 5)
{
Assert.AreEqual(5, _screenLogging.GetAPILogs().Count);
Assert.HasCount(5, _screenLogging.GetAPILogs());
Assert.AreEqual($"{deviceid} - {devicename} - Connectionstate changed to Online", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual($"{deviceid} - {devicename} - Ipaddress changed to 11.22.33.44", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual($"{deviceid} - {devicename} - Name changed to {devicename}", _screenLogging.GetAPILogs()[2].Message);
@@ -167,7 +167,7 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
}
if (logs == 6)
{
Assert.AreEqual(6, _screenLogging.GetAPILogs().Count);
Assert.HasCount(6, _screenLogging.GetAPILogs());
Assert.AreEqual($"{deviceid} - {devicename} - ACSreader actief", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual($"{deviceid} - {devicename} - Connectionstate changed to Online", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual($"{deviceid} - {devicename} - Ipaddress changed to 11.22.33.44", _screenLogging.GetAPILogs()[2].Message);

View File

@@ -30,10 +30,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual((UInt32)0, returnModel.OpenTime);
Assert.AreEqual(0, returnModel.CardNumber);
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
}
[TestMethod]
@@ -54,10 +54,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual((UInt32)0, returnModel.OpenTime);
Assert.AreEqual(0, returnModel.CardNumber);
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
}
[TestMethod]
@@ -78,10 +78,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual((UInt32)0, returnModel.OpenTime);
Assert.AreEqual(0, returnModel.CardNumber);
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
}
[TestMethod]
@@ -113,11 +113,11 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(9901, returnModel.CardNumber);
//screenlogging
Assert.AreEqual(1, _screenLogging.GetACSLogs().Count);
Assert.HasCount(1, _screenLogging.GetACSLogs());
Assert.AreEqual("XXXXXX - Unknown - Active User - 9901 - Niet in een groep", _screenLogging.GetACSLogs()[0].Message);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
TestApiScreenLog(credentialRequest.Device, credentialRequest.Name, 5, "Reader:Reader 1 Data:E2C9FBA004090900010000000000000000000000B3DC49B384C1D5F34C8E232316D65821");
@@ -232,11 +232,11 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(9901, returnModel.CardNumber);
//screenlogging
Assert.AreEqual(1, _screenLogging.GetACSLogs().Count);
Assert.HasCount(1, _screenLogging.GetACSLogs());
Assert.AreEqual("112233 - NAME - Active User - 9901 - Niet in een groep", _screenLogging.GetACSLogs()[0].Message);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
TestApiScreenLog(credentialRequest.Device, credentialRequest.Name, 5, "Reader:Reader 1 Data:E2C9FBA004090900010000000000000000000000B3DC49B384C1D5F34C8E232316D65821");
//Assert.AreEqual(5, _screenLogging.GetAPILogs().Count);

View File

@@ -27,10 +27,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(0, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
}
[TestMethod]
@@ -50,10 +50,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(0, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
}
[TestMethod]
@@ -79,10 +79,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(0, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
}
[TestMethod]
@@ -107,10 +107,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(0, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
}
[TestMethod]
@@ -135,10 +135,10 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(0, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAPILogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetAPILogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
}
[TestMethod]
@@ -166,9 +166,9 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(1, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
//screenlog
TestApiScreenLog(requestModel.Device, requestModel.Name, 5, "Status:Unknown");
@@ -221,9 +221,9 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(1, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
//screenlog
TestApiScreenLog(requestModel.Device, requestModel.Name, 6, "Status:Running");
@@ -265,12 +265,12 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(1, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
//screenlog
Assert.AreEqual(6, _screenLogging.GetAPILogs().Count);
Assert.HasCount(6, _screenLogging.GetAPILogs());
Assert.AreEqual("445566 - Offline Device - ACSreader actief", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual("445566 - Offline Device - Connectionstate changed to Online", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual("445566 - Offline Device - Ipaddress changed to 11.22.33.44", _screenLogging.GetAPILogs()[2].Message);
@@ -322,12 +322,12 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(1, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
//screenlog
Assert.AreEqual(7, _screenLogging.GetAPILogs().Count);
Assert.HasCount(7, _screenLogging.GetAPILogs());
Assert.AreEqual("112233 - Active Device - ACSreader gestopt", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual("112233 - Active Device - Connectionstate changed to Offline", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual("112233 - Active Device - Connectionstate changed to Online", _screenLogging.GetAPILogs()[2].Message);
@@ -393,14 +393,14 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(1, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
//screenlog
//TestApiScreenLog(requestModel.Device, requestModel.Name, 6, "Status:Restart_Success");
Assert.AreEqual(6, _screenLogging.GetAPILogs().Count);
Assert.HasCount(6, _screenLogging.GetAPILogs());
Assert.AreEqual("112233 - Active Device - ACSreader herstart gelukt", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual("112233 - Active Device - Connectionstate changed to Online", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual("112233 - Active Device - Ipaddress changed to 11.22.33.44", _screenLogging.GetAPILogs()[2].Message);
@@ -452,12 +452,12 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(1, _apiDeviceList.GetDevices().Count());
Assert.AreEqual(0, _screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, _screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, _screenLogging.GetAperioLogs().Count);
Assert.IsEmpty(_screenLogging.GetACSLogs());
Assert.IsEmpty(_screenLogging.GetSystemLogs());
Assert.IsEmpty(_screenLogging.GetAperioLogs());
//screenlog
Assert.AreEqual(7, _screenLogging.GetAPILogs().Count);
Assert.HasCount(7, _screenLogging.GetAPILogs());
Assert.AreEqual("112233 - Active Device - ACSreader herstart niet gelukt", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual("112233 - Active Device - Connectionstate changed to Offline", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual("112233 - Active Device - Connectionstate changed to Online", _screenLogging.GetAPILogs()[2].Message);

View File

@@ -34,7 +34,7 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(5, time);
Assert.IsNotNull(_screenLogging);
Assert.AreEqual(4, _screenLogging.GetAPILogs().Count);
Assert.HasCount(4, _screenLogging.GetAPILogs());
Assert.AreEqual("000000 - NEW - Connectionstate changed to Online", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual("000000 - NEW - Ipaddress changed to 11.22.33.44", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual("000000 - NEW - Name changed to NEW", _screenLogging.GetAPILogs()[2].Message);
@@ -68,7 +68,7 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(0, time);
Assert.IsNotNull(_screenLogging);
Assert.AreEqual(4, _screenLogging.GetAPILogs().Count);
Assert.HasCount(4, _screenLogging.GetAPILogs());
Assert.AreEqual("445566 - TEST - Connectionstate changed to Online", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual("445566 - TEST - Ipaddress changed to 11.22.33.44", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual("445566 - TEST - Name changed to TEST", _screenLogging.GetAPILogs()[2].Message);
@@ -102,7 +102,7 @@ namespace Aperio_Control_Centre.UnitTest.ApiTest
Assert.AreEqual(50, time);
Assert.IsNotNull(_screenLogging);
Assert.AreEqual(4, _screenLogging.GetAPILogs().Count);
Assert.HasCount(4, _screenLogging.GetAPILogs());
Assert.AreEqual("112233 - TEST - Connectionstate changed to Online", _screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual("112233 - TEST - Ipaddress changed to 11.22.33.44", _screenLogging.GetAPILogs()[1].Message);
Assert.AreEqual("112233 - TEST - Name changed to TEST", _screenLogging.GetAPILogs()[2].Message);

View File

@@ -36,7 +36,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
//screenlogging
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - Active User - 9902 - Niet in een groep", screenLogging.Messages[0]);
@@ -81,7 +81,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
//screenlogging
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - AA11BB - Inactive Device - Niet in een groep", screenLogging.Messages[0]);
//db logging
@@ -125,7 +125,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
//Screen logging
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - |Inactive Group User| - 9903 - Geen autorisatie gevonden", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -168,7 +168,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsTrue(success);
Assert.AreEqual(0, screenLogging.Messages.Count);
Assert.IsEmpty(screenLogging.Messages);
}
}
}

View File

@@ -29,7 +29,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNull(checker.Device);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("System - XYZ - Onbekend apparaat", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -68,7 +68,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNotNull(checker.Device);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - AA11BB - Inactive Device - Apparaat is niet aktief", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -106,7 +106,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsNotNull(checker.Device);
Assert.AreEqual("112233", checker.Device.DeviceId);
Assert.AreEqual(0, screenLogging.Messages.Count);
Assert.IsEmpty(screenLogging.Messages);
Assert.AreEqual(0, db.Loggings?.Count());
}

View File

@@ -44,7 +44,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNull(checker.CredentialData);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - 1 - Reader 1 - Lezerdata lengte onjuist - 635456474356745845634", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -94,7 +94,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNotNull(checker.CredentialData);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - 1 - Reader 1 - Kaart nummer fout - E2C9FBA0040x0900010000000000000000000000B3DC49B384C1D5F34C8E232316D65821", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -150,7 +150,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.AreEqual(9901, checker.CredentialData.PassNumber);
Assert.AreEqual(string.Empty, checker.CredentialData.Error);
Assert.AreEqual(0, screenLogging.Messages.Count);
Assert.IsEmpty(screenLogging.Messages);
Assert.AreEqual(0, db.Loggings?.Count());
}

View File

@@ -37,7 +37,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNull(checker.CredentialData);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - AA11BB - Inactive Device - Lezerdata lengte onjuist - 000102030405", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -81,7 +81,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsNotNull(checker.CredentialData);
//screen log
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - AA11BB - Inactive Device - Ongeldig kaart nummer - 05090900010900000000000000000000B3DC49B384C1D5F34C8E232316D65821", screenLogging.Messages[0]);
//database log
@@ -131,7 +131,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.AreEqual(9901, checker.CredentialData.PassNumber);
Assert.AreEqual(string.Empty, checker.CredentialData.Error);
Assert.AreEqual(0, screenLogging.Messages.Count);
Assert.IsEmpty(screenLogging.Messages);
Assert.AreEqual(0, db.Loggings?.Count());
}

View File

@@ -41,7 +41,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("System - Geen sectorkey in configuratie", screenLogging.Messages[0]);
@@ -88,7 +88,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - Active User - 9902 - Verkeerde sectorkey B3DC49B384C1D5000C8E232316D65821", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -134,7 +134,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsTrue(success);
Assert.AreEqual(0, screenLogging.Messages.Count);
Assert.IsEmpty(screenLogging.Messages);
Assert.AreEqual(0, db.Loggings?.Count());
}

View File

@@ -38,7 +38,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNull(checker.User);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - Onbekende gebruiker DEADBEEF", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -84,7 +84,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNotNull(checker.User);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - Inactive User - 9901 - kaart nummer onjuist 9801", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -130,7 +130,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsFalse(success);
Assert.IsNotNull(checker.User);
Assert.AreEqual(1, screenLogging.Messages.Count);
Assert.HasCount(1, screenLogging.Messages);
Assert.AreEqual("ACS - 112233 - Active Device - Inactive User - 9901 - Gebruiker niet aktief", screenLogging.Messages[0]);
Assert.AreEqual(1, db.Loggings?.Count());
@@ -176,7 +176,7 @@ namespace Aperio_Control_Centre.UnitTest.CredentialChecker
Assert.IsNotNull(checker.User);
Assert.AreEqual("987654", checker.User.CredentialString);
Assert.AreEqual(0, screenLogging.Messages.Count);
Assert.IsEmpty(screenLogging.Messages);
Assert.AreEqual(0, db.Loggings?.Count());
}

View File

@@ -10,10 +10,10 @@ namespace Aperio_Control_Centre.UnitTest
private static ScreenLogger CreateScreenLogger()
{
ScreenLogger screenLogging = new();
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
return screenLogging;
}
@@ -24,10 +24,10 @@ namespace Aperio_Control_Centre.UnitTest
ScreenLogger screenLogging = CreateScreenLogger();
screenLogging.AddScreenlog(new ScreenLogEventArgs() { });
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
}
[TestMethod]
@@ -37,10 +37,10 @@ namespace Aperio_Control_Centre.UnitTest
screenLogging.AddScreenlog(new SystemScreenLog() { IPAddress = IPAddress.Parse("11.22.33.44"), Message = "Disconnected" });
Assert.AreEqual(1, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.HasCount(1, screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
Assert.AreEqual("Disconnected", screenLogging.GetSystemLogs()[0].Message);
Assert.AreEqual(IPAddress.Parse("11.22.33.44"), screenLogging.GetSystemLogs()[0].IPAddress);
@@ -55,10 +55,10 @@ namespace Aperio_Control_Centre.UnitTest
screenLogging.AddScreenlog(new AperioScreenLog() { IPAddress = IPAddress.Parse("11.22.33.44"), Direction = AperioLogDirections.Aperio_RX, Message = "MSG 1", PDUType = PDUTypes.CredentialNotification });
screenLogging.AddScreenlog(new AperioScreenLog() { IPAddress = IPAddress.Parse("11.22.33.44"), Direction = AperioLogDirections.Aperio_TX, Message = "MSG 2", PDUType = PDUTypes.CredentialNotification });
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(2, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.HasCount(2, screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
Assert.AreEqual("MSG 2", screenLogging.GetAperioLogs()[0].Message);
Assert.AreEqual(IPAddress.Parse("11.22.33.44"), screenLogging.GetAperioLogs()[0].IPAddress);
@@ -80,10 +80,10 @@ namespace Aperio_Control_Centre.UnitTest
screenLogging.AddScreenlog(new ACSScreenLog() { IPAddress = IPAddress.Parse("11.22.33.44"), Message = "Disconnected" });
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(1, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.HasCount(1, screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
Assert.AreEqual("Disconnected", screenLogging.GetACSLogs()[0].Message);
Assert.AreEqual(IPAddress.Parse("11.22.33.44"), screenLogging.GetACSLogs()[0].IPAddress);
@@ -97,10 +97,10 @@ namespace Aperio_Control_Centre.UnitTest
screenLogging.AddScreenlog(new ApiScreenLog() { IPAddress = IPAddress.Parse("11.22.33.44"), Message = "Disconnected", ApiLogType = ApiLogTypes.OpenTime });
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(1, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.HasCount(1, screenLogging.GetAPILogs());
Assert.AreEqual("Disconnected", screenLogging.GetAPILogs()[0].Message);
Assert.AreEqual(IPAddress.Parse("11.22.33.44"), screenLogging.GetAPILogs()[0].IPAddress);
@@ -116,10 +116,10 @@ namespace Aperio_Control_Centre.UnitTest
{
ScreenBufferCount = 100
};
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
List<Task<bool>> tasks = new();
for (int i = 0; i < 10; i++)
@@ -138,21 +138,21 @@ namespace Aperio_Control_Centre.UnitTest
Task.WaitAll(tasks.ToArray());
Thread.Sleep(500);
Assert.AreEqual(100, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.HasCount(100, screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 0").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 1").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 2").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 3").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 4").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 5").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 6").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 7").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 8").ToList().Count);
Assert.AreEqual(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 9").ToList().Count);
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 0").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 1").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 2").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 3").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 4").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 5").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 6").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 7").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 8").ToList());
Assert.HasCount(10, screenLogging.GetSystemLogs().Where(conn => conn.Message == "Msg 9").ToList());
}
[TestMethod]
@@ -162,10 +162,10 @@ namespace Aperio_Control_Centre.UnitTest
{
ScreenBufferCount = 100
};
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
List<Task<bool>> tasks = new();
for (int i = 0; i < 10; i++)
@@ -184,21 +184,21 @@ namespace Aperio_Control_Centre.UnitTest
Task.WaitAll(tasks.ToArray());
Thread.Sleep(500);
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(100, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.HasCount(100, screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 0").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 1").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 2").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 3").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 4").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 5").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 6").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 7").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 8").ToList().Count);
Assert.AreEqual(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 9").ToList().Count);
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 0").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 1").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 2").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 3").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 4").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 5").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 6").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 7").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 8").ToList());
Assert.HasCount(10, screenLogging.GetACSLogs().Where(conn => conn.Message == "Msg 9").ToList());
}
[TestMethod]
@@ -208,10 +208,10 @@ namespace Aperio_Control_Centre.UnitTest
{
ScreenBufferCount = 100
};
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(0, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.IsEmpty(screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs());
List<Task<bool>> tasks = new();
for (int i = 0; i < 10; i++)
@@ -230,21 +230,21 @@ namespace Aperio_Control_Centre.UnitTest
Task.WaitAll(tasks.ToArray());
Thread.Sleep(500);
Assert.AreEqual(0, screenLogging.GetSystemLogs().Count);
Assert.AreEqual(100, screenLogging.GetAperioLogs().Count);
Assert.AreEqual(0, screenLogging.GetACSLogs().Count);
Assert.AreEqual(0, screenLogging.GetAPILogs().Count); Assert.AreEqual(0, screenLogging.GetAPILogs().Count);
Assert.IsEmpty(screenLogging.GetSystemLogs());
Assert.HasCount(100, screenLogging.GetAperioLogs());
Assert.IsEmpty(screenLogging.GetACSLogs());
Assert.IsEmpty(screenLogging.GetAPILogs()); Assert.IsEmpty(screenLogging.GetAPILogs());
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 0").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 1").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 2").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 3").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 4").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 5").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 6").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 7").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 8").ToList().Count);
Assert.AreEqual(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 9").ToList().Count);
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 0").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 1").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 2").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 3").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 4").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 5").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 6").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 7").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 8").ToList());
Assert.HasCount(10, screenLogging.GetAperioLogs().Where(conn => conn.Message == "Msg 9").ToList());
}
}
}