コード例 #1
0
        public void TestSetGetConnectedModules()
        {
            Bus    testBus    = new CSPBus("test bus");
            Module testModule = new Module("Test", 100);

            testBus.ConnectModule(testModule);
            Assert.IsTrue(testBus.ConnectedModules.Contains(testModule));
        }
コード例 #2
0
        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);
        }