public static void MyClassInitialize(TestContext testContext) { testUniver = new University("Test Uni"); testGroup = new Group("TestGroup"); testGroup.AddStudent(new Student("Mr. Brilliant")); testGroup.AddStudent(new Student("Mr. Diamond")); testGroup.AddStudent(new Student("Mr. Carbone")); testUniver.AddGroup(testGroup); testTeacher = new Teacher("Mr. Smartpants"); testCourse = new Course("Very hard course"); testUniver.AddCourse(testCourse); testTeacher.AddCourse(testCourse); }
public void TestIDs() { University newUni = new University("Best Uni ever"); Assert.IsFalse(string.IsNullOrEmpty(newUni.ID), "Univer's constructor with parameters must generate an ID"); Student newStud = new Student("Mr. Studoid"); Assert.IsFalse(string.IsNullOrEmpty(newStud.ID), "Student's constructor with parameters must generate an ID"); Group newGroup = new Group("Test Group"); Assert.IsFalse(string.IsNullOrEmpty(newGroup.ID), "Group's constructor with parameters must generate an ID"); }