コード例 #1
0
        public void Constructor_SetsId_WhenCalled()
        {
            // Arrange
            // Act
            var sut = new AntSettingsNode(1,
                                          "Text");

            // Assert
            Assert.AreEqual(1,
                            sut.Id);
        }
コード例 #2
0
        public void Constructor_SetsDescription_WhenCalled()
        {
            // Arrange
            // Act
            var sut = new AntSettingsNode(1,
                                          "Text");

            // Assert
            Assert.AreEqual("Text",
                            sut.Description);
        }
コード例 #3
0
        public void Update_SetsSelectedNode_WhenSelectedNodeDoesNotMatch()
        {
            // Arrange
            // Act
            var zero = new AntSettingsNode(0,
                                           "0");
            var one = new AntSettingsNode(1,
                                          "1");

            m_Sut.Update(true,
                         123,
                         new IAntSettingsNode[]
                         {
                             zero,
                             one
                         });

            // Assert
            Assert.AreEqual(zero,
                            m_Sut.SelectedNode);
        }
コード例 #4
0
        public void Update_SetsSelectedNode_WhenCalled()
        {
            // Arrange
            // Act
            var expected = new AntSettingsNode(1,
                                               "1");

            m_Sut.Update(true,
                         1,
                         new IAntSettingsNode[]
                         {
                             expected
                         });

            // Assert
            Assert.AreEqual(expected,
                            m_Sut.SelectedNode);
        }