public void SetDeviceIpAddress_AppliesChanges() { Guid deviceId = Guid.NewGuid(); string hostname = "SESM-001"; NetworkDevice device = new NetworkDevice(deviceId, hostname); string ip = "172.24.180.14"; device.SetIpV4Address(ip); Assert.AreEqual(device.ipAddress.ToString(), ip); }
public void SetDeviceIpAddress_ThrowsOnBadIp() { Guid deviceId = Guid.NewGuid(); string hostname = "SESM-001"; NetworkDevice device = new NetworkDevice(deviceId, hostname); string ip = "asdsd"; Assert.Throws <Exception>(() => { device.SetIpV4Address(ip); }); }