Exemplo n.º 1
0
        public void IsEmptyInEmptyList_EmptyList_True()
        {
            // Arrange
            LinkList <Person> list = new LinkList <Person>();

            // Act
            bool expected = true;
            bool actual   = list.IsEmpty();

            // Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void IsEmptyInList_NotEmptyList_False()
        {
            // Arrange
            LinkList <Person> list = new LinkList <Person>();

            list.Add(Student.GeneratePupil());
            list.Add(Student.GeneratePupil());
            list.Add(Student.GeneratePupil());

            // Act
            bool expected = false;
            bool actual   = list.IsEmpty();

            // Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void IsEmptyInClearedList_EmptyList_True()
        {
            // Arrange
            LinkList <Person> list = new LinkList <Person>();

            list.Add(Student.GeneratePupil());
            list.Add(Student.GeneratePupil());
            list.Add(Student.GeneratePupil());
            list.Clear();

            // Act
            bool expected = true;
            bool actual   = list.IsEmpty();

            // Assert
            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
        public void DeleteFirstTimes3_IsEmpty_True()
        {
            // Arrange
            LinkList <Person> list = new LinkList <Person>();

            list.Add(Student.GeneratePupil());
            list.Add(Student.GeneratePupil());
            list.Add(Student.GeneratePupil());

            // Act
            list.DeleteFirst();
            list.DeleteFirst();
            list.DeleteFirst();

            bool expected = true;
            bool actual   = list.IsEmpty();

            // Assert
            Assert.AreEqual(expected, actual);
        }