Exemplo n.º 1
0
        public void WhenRemovesOnlyNOde_ShouldReturnTrue()
        {
            var sut = new ChainedList <int>(new List <int> {
                1
            });

            Assert.IsFalse(sut.IsEmpty);
            Assert.IsTrue(sut.Any());

            sut.RemoveHead();

            Assert.IsTrue(sut.IsEmpty);
            Assert.IsFalse(sut.Any());
        }
Exemplo n.º 2
0
        public void WhenListNotEmpty_ShouldReturnFalse()
        {
            var sut = new ChainedList <int>(new List <int> {
                1, 2
            });

            Assert.IsFalse(sut.IsEmpty);
            Assert.IsTrue(sut.Any());

            sut.RemoveHead();

            Assert.IsFalse(sut.IsEmpty);
            Assert.IsTrue(sut.Any());
        }
Exemplo n.º 3
0
        public void WhenListEsEmpty_ShouldReturnTrue()
        {
            var sut = new ChainedList <int>();

            Assert.IsTrue(sut.IsEmpty);
            Assert.IsFalse(sut.Any());
        }