public void CreatingSchoolShouldSucceedWhenProvidedValidData() { var school = new School("Valid"); Assert.IsInstanceOfType(school, typeof(ISchool), "Creating new School failed with valid data."); }
public void StudentsShouldHaveDifferentIDsIfInOneSchool() { var school = new School("FELS"); var firstStudent = new Student("John", school); var secondStudent = new Student("Marry", school); Assert.AreNotEqual(firstStudent.ID, secondStudent.ID, "Students in one school cannot have same ID."); }
public void StudentsCanHaveSameIDIfInDifferentSchools() { var firstSchool = new School("FELS"); var secondSchool = new School("FGLS"); var studentInFirstSchool = new Student("Sophie", firstSchool); var studentInSecondSchool = new Student("Leonardo", secondSchool); Assert.AreEqual(studentInFirstSchool.ID, studentInSecondSchool.ID, "Adding first students in different schools should give them same ID."); }
private School GetValidSchool() { var school = new School("Valid"); return school; }
public void CreatingStudentShouldThrowArgumentOutOfRangeExceptionWhenGivenTooLongName() { var school = new School("FELS"); var tooLongName = new string('a', 101); var student = new Student(tooLongName, school); }
public void CreatingSchoolShouldThrowArgumentOutOfRangeExceptionWhenProvidedTooLongName() { var tooLongName = new string('a', 101); var school = new School(tooLongName); }
public void CreatingSchoolShouldThrowArgumentExceptionWhenProvidedNameWithValueNull() { var school = new School(null); }
public void CreatingSchoolShouldThrowArgumentExceptionWhenProvidedEmptyName() { var school = new School(string.Empty); }