Exemplo n.º 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);
 }
Exemplo n.º 2
0
 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);
 }
Exemplo n.º 3
0
 public void HostsInfoConstructorTest()
 {
     var target = new HostsInfo();
     Assert.IsNotNull(target);
 }