Example #1
0
 public void HostInfoTest()
 {
     var expected = new HostsInfo();
     Globals.HostInfo = expected;
     HostsInfo actual = Globals.HostInfo;
     if (expected.CurrentHosts.Count == 0) return;
     Assert.AreEqual(expected.CurrentHosts[0].HostName, actual.CurrentHosts[0].HostName);
     Assert.AreEqual(expected.CurrentHosts[0].ChatActive, actual.CurrentHosts[0].ChatActive);
     Assert.IsNull(actual.CurrentHosts[0].IPAdress);
 }
 public void DeleteTest()
 {
     var target = new HostsInfo();
     target.CurrentHosts.Add(new Host
     {
         ChatActive = false,
         HostName = "Localhost"
     });
     target.SelectedHost.HostName = "Localhost";
     target.Delete();
     if (target.CurrentHosts.Count > 0)
     {
         target.SelectedHost.HostName = "Localhost";
         target.Delete();
     }
     Assert.AreEqual(0, target.CurrentHosts.Count);
     Assert.IsNull(target.SelectedHost.HostName);
 }
 public void HostsInfoConstructorTest()
 {
     var target = new HostsInfo();
     Assert.IsNotNull(target);
 }