Ejemplo n.º 1
0
        public void AddLast_01()
        {
            // Arrange
            var list = new LimitList <int>(3);

            // Act
            list.AddLast(1);
            list.AddLast(2);

            // Assert
            Assert.Equal(new int[] { 1, 2 }, list.ToList());
        }
        public void AddLast_01()
        {
            // Arrange
            var list = new LimitList <int>(3);

            // Act
            list.AddLast(1);
            list.AddLast(2);

            // Assert
            CollectionAssert.AreEquivalent(new int[] { 1, 2 }, list.ToList());
        }
Ejemplo n.º 3
0
        public void AddFirst_02()
        {
            // Arrange
            var list = new LimitList <int>(3);

            // Act
            list.AddFirst(1);
            list.AddFirst(2);
            list.AddFirst(3);
            list.AddFirst(4);

            // Assert
            Assert.Equal(new int[] { 4, 3, 2 }, list.ToList());
        }