Example #1
0
        public void ZWaveNodeAddChildren()
        {
            Mock <IZWaveController> controller = new Mock <IZWaveController>(MockBehavior.Strict);

            controller.Setup(s => s.IsInitialized).Returns(false);
            ZWaveNode.SetController(controller.Object);
            Mock <IInternalConfigurationManager> configManager = new Mock <IInternalConfigurationManager>();
            MockZWaveNode node = new MockZWaveNode();

            Assert.AreEqual(0, node.Children.Count());

            Mock <IParseable> mockParseable = new Mock <IParseable>();

            node.AddChild(mockParseable.Object);

            Assert.AreEqual(1, node.Children.Count());
            Assert.AreSame(mockParseable.Object, node.Children.First());
        }