示例#1
0
        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!");
            }
        }
示例#2
0
        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!");
            }
        }
示例#3
0
 //Model functions
 public void CreateNewScan(IPAddress gateway, IPAddress netMask, int timeout)
 {
     ActiveScan = new LocalNetScan(gateway, netMask, timeout);
 }
示例#4
0
        public void ScaningTest()
        {
            LocalNetScan testObj = new LocalNetScan(IPAddress.Parse("192.168.0.1"), IPAddress.Parse("255.255.255.0"));

            testObj.StartScanningAsync();
        }