public void ContainsIDTest() { HostConfiguration config = new HostConfiguration(0) { CameraID = 3, Name = "abc" }; var host = new Host{ Config = config, Status = HostStatus.OnLine, LastSeen = DateTime.Now,}; HostConfiguration config1 = new HostConfiguration(0) { CameraID = 4, Name = "abc" }; var host1 = new Host { Config = config, Status = HostStatus.OnLine, LastSeen = DateTime.Now, }; pool.Add(host); Assert.IsTrue(pool.ContainsID(host.Config.StationID)); Assert.IsTrue(pool.Contains(host1)); Assert.IsFalse(pool.ContainsID(4)); var h = pool[config.StationID]; Assert.IsNotNull(h); h.Config.Name = "benny"; h.LastSeen = DateTime.Now; h = pool[config.StationID]; Assert.AreEqual("benny", h.Config.Name); pool.Add(host1); }
public void UpdateHost(Host h) { }
public void AddHost(Host h) { }
public void CopyTo(Host to) { to.Config = this.Config; to.Ip = this.Ip; to.LastSeen = this.LastSeen; to.Status = this.Status; }