public void TestSetGetConnectedModules() { Bus testBus = new CSPBus("test bus"); Module testModule = new Module("Test", 100); testBus.ConnectModule(testModule); Assert.IsTrue(testBus.ConnectedModules.Contains(testModule)); }
public void TestConnectAndDisconnectModules() { Module testModule = new Module("test module", 1); Bus testBus = new CSPBus("test bus"); testBus.ConnectModule(testModule); ObservableCollection <Module> modules = testBus.ConnectedModules; Boolean test = testBus.ConnectedModules.Contains(testModule); Assert.AreEqual(test, true); testBus.DisconnectModule(testModule); Assert.AreEqual(modules, testBus.ConnectedModules); }