Exemple #1
0
        public void RemoveTwoOff()
        {
            // Arrange
            ListClass <int> list = new ListClass <int>()
            {
                1, 2, 3, 4, 5
            };
            int three = 3;
            int five  = 5;

            // Act
            list.Remove(three);
            list.Remove(five);
            // Assert
            Assert.AreEqual(list.listArray[2], 4);
            Assert.AreEqual(list.listArray[0], 1);
            Assert.AreEqual(list.listArray[1], 2);
        }
Exemple #2
0
        public void RemoveOffTest()
        {
            // Arrange
            ListClass <int> list = new ListClass <int>()
            {
                1, 2, 3, 4, 5
            };
            int three = 3;

            // Act
            list.Remove(three);
            // Assert
            Assert.AreEqual(list.listArray[2], 4);
        }
Exemple #3
0
        public void RemoveOffCounts()
        {
            // Arrage
            ListClass <int> list = new ListClass <int>()
            {
                1, 2, 3, 4, 5
            };
            int five = 5;

            // Act
            list.Remove(five);
            // Assert
            Assert.AreEqual(4, list.Counts);
        }