public void ShouldStartThreadDiscoverRomania() { int startNumber = Process.GetCurrentProcess().Threads.Count; ThreadDiscoverRomania sut = new ThreadDiscoverRomania(); sut.StartSync(); int endNumber = Process.GetCurrentProcess().Threads.Count; Assert.AreEqual(startNumber + 1, endNumber); }
public void ShouldAttachAndDetach() { ISync sut1 = new ThreadDiscoverRomania(); ISync sut2 = new ThreadHotels(); ISync sut3 = new ThreadTravelAgents(); FileSync sync = new FileSync(); sync.attach(sut1); sync.attach(sut2); sync.detach(sut3); Assert.AreEqual(2, sync.syncList.Count); }