public void PortKnock_Complete_With_Invalid_IP(object sender, PortKnockCompleteEventArgs e) { // Actual should be a blank object. PKScanObject expected = new PKScanObject(); PKScanObject actual = e.Result; // Make sure we get what we want. Assert.AreEqual(expected, actual); }
public ScanObject(IPAddress ip, string address, string hostname, string mac, string ping, PKScanObject ports, string online, ScanStatus status = ScanStatus.Unknown) { IP = ip; Address = address; Hostname = hostname; MAC = mac; Ping = ping; Ports = ports; Online = online; Status = status; }
public void PortKnock_With_Invalid_IP() { // Setup our scanner. Scanner s = new Scanner(); s.PortKnockProgressChanged += new PortKnockProgressChangedHandler(PortKnock_ProgressChanged_With_Invalid_IP); s.PortKnockComplete += new PortKnockCompleteHandler(PortKnock_Complete_With_Invalid_IP); // Run our scan. PKScanObject expected = new PKScanObject(); PKScanObject actual = s.PortKnock("x.x.x.x"); // Make sure that we get what we want. Assert.AreNotEqual(expected, actual); }