コード例 #1
0
        public void Includes_finds_nothing_in_empty_list()
        {
            // Arrange
            LinkedLister list = new LinkedLister();

            // Act
            bool result = list.Includes(1);

            // Assert
            Assert.False(result);
        }
コード例 #2
0
        public void Includes_finds_input_in_list()
        {
            //Arrange
            LinkedLister list = new LinkedLister();

            //Act
            list.Insert(1);
            list.Insert(2);
            list.Insert(3);
            list.Insert(4);
            list.Insert(5);

            //Assert
            bool expected = false;

            Assert.Equal(list.Includes(4), expected);
        }
コード例 #3
0
        public void Includes_finds_input_in_list(int valueToFind, bool expected)
        {
            //Arrange
            LinkedLister list = new LinkedLister();

            list.Insert(1);
            list.Insert(2);
            list.Insert(3);
            list.Insert(4);
            list.Insert(5);

            //Act
            bool result = list.Includes(valueToFind);

            //Assert
            Assert.Equal(expected, result);
        }