public void Remove_03()
        {
            // Arrange
            var list = new LimitList <int>(3);

            list.AddLast(1);

            // Act
            var result = list.Remove(4);

            // Assert
            Assert.AreEqual(false, result);
            Assert.AreEqual(1, list.Count);
            Assert.AreEqual(1, list[0]);
        }
Esempio n. 2
0
        public void Remove_03()
        {
            // Arrange
            var list = new LimitList <int>(3);

            list.AddLast(1);

            // Act
            var result = list.Remove(4);

            // Assert
            Assert.False(result);
            Assert.Single(list);
            Assert.Equal(1, list[0]);
        }
        public void Remove_02()
        {
            // Arrange
            var list = new LimitList <int>(3);

            list.AddLast(1);
            list.AddLast(2);
            list.AddLast(3);

            // Act
            var result = list.Remove(2);

            // Assert
            Assert.AreEqual(true, result);
            Assert.AreEqual(2, list.Count);
            Assert.AreEqual(1, list[0]);
            Assert.AreEqual(3, list[1]);
        }