public void CreateTest() { LocalNetScan testObj = new LocalNetScan(IPAddress.Parse("127.0.0.1"), IPAddress.Parse("255.255.255.0")); if (testObj == null) { throw new Exception("Object creation return null!"); } }
public void InitFieldsTest() { LocalNetScan testObj = new LocalNetScan(IPAddress.Parse("127.0.0.1"), IPAddress.Parse("255.255.255.0")); if (!(testObj.ScanResult != null && testObj.Gateway != null && testObj.NetMask != null && testObj.Timeout >= 0 && testObj.StartData == null && testObj.FinishedData == null && testObj.ScanStatus == NetScanStatus.Ready && testObj.TotalIpsForScan == 0 && testObj.SentPingsCount == 0 && testObj.CompletedPingsCount == 0 && testObj.ScanResult != null && testObj.Locked == false)) { throw new Exception("Fields initialization is not correct!"); } }
//Model functions public void CreateNewScan(IPAddress gateway, IPAddress netMask, int timeout) { ActiveScan = new LocalNetScan(gateway, netMask, timeout); }
public void ScaningTest() { LocalNetScan testObj = new LocalNetScan(IPAddress.Parse("192.168.0.1"), IPAddress.Parse("255.255.255.0")); testObj.StartScanningAsync(); }