Beispiel #1
0
        public void AddNewClass_WhenAddNewClassWithTheSameNameWhatExisting_ClassCountShouldEqualOne()
        {
            //Arrange
            string className = "1A";
            School school    = new School();
            int    expected  = 1;

            school.AddNewClass(className);
            //Act
            school.AddNewClass(className);
            //Assert
            Assert.AreEqual(expected, school.Classes.Count);
        }
Beispiel #2
0
        public void GetStudents_WhenAddOneClassWithOneStudent_SchouldBeEqualOne()
        {
            //Arrange
            School  school   = new School();
            Student student  = new Student("Jan", "Kowalski");
            int     expected = 1;
            //Act
            Class @class = school.AddNewClass("1A");

            @class.AddStudent(student);
            int result = school.Students.Count;

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