public void EducationNackademinTest() { //Arrange var builder = new NackademinBuilder(); var director = new NackademinDirector(); string expectedTeacher = "Nackademin Teacher Assigned"; string expectedStudent = "Nackadem Student Invited"; string expectedFeedback = "Nackademin Student Feedback"; //Act var actualTeacher = director.Build(builder).Teacher; var actualStudent = director.Build(builder).Student; var actualFeedback = director.Build(builder).Feedback; //Assert Assert.AreEqual(expectedTeacher, actualTeacher); Assert.AreEqual(expectedStudent, actualStudent); Assert.AreEqual(expectedFeedback, actualFeedback); }
static void Main(string[] args) { Console.WriteLine("Hello"); IEducation education = new NackademinEducation(); EducationLibrary.EducationBuilder builder = new NackademinBuilder(education); EducationDirector director = new NackademinDirector(); IEducation result = director.Build(builder); Console.ReadLine(); }
public void TestAssignTeacherNackademin() { var builder = new NackademinBuilder(); var director = new NackademinDirector(); var education = director.Build(builder); string expectedteacher = "Kurt"; string expectedstudents = "200"; string expectedProcessStudentFeedback = "Good"; string actualteacher = education.AssignTeacher; string actualstudents = education.InviteStudents; string actualFeedback = education.ProcessStudentFeedback; Assert.AreEqual(expectedteacher, actualteacher); Assert.AreEqual(expectedstudents, actualstudents); Assert.AreEqual(expectedProcessStudentFeedback, actualFeedback); }
public void TestNackademinBuilder() { //ARRANGE IEducation education = new NackademinEducation(); EducationLibrary.EducationBuilder builder = new NackademinBuilder(education); EducationDirector director = new NackademinDirector(); const string expectedEducation = "Nackademin AB"; //ACT IEducation result = director.Build(builder); //ASSERT Assert.AreEqual(result.Education, expectedEducation); }
public void Test_Nackademin_Education() { //Arrange string expectedEducationName = "Nackademin"; string expectedTeacher = "Ellie"; string expectedStudents = "Samir"; string expectedFeedBack = "SiSåDär"; AbstractEducation education = new NackademinEducation("Ellie", "Samir", "SiSåDär"); EducationBuilder builder = new NackademinBuilder(education); NackademinDirector director = new NackademinDirector(); //Act IEducation actual = director.Build(builder); //Assert Assert.AreEqual(expectedEducationName, actual.EducationName); Assert.AreEqual(expectedTeacher, actual.TeacherName); Assert.AreEqual(expectedStudents, actual.Student); Assert.AreEqual(expectedFeedBack, actual.Feedback); }
public void TestIfNackademinGetsCorrectValues() { //ARRANGE IEducation education = new NackademinEducation(); EducationLibrary.EducationBuilder builder = new NackademinBuilder(education); EducationDirector director = new NackademinDirector(); const string expectedEducation = "Nackademin AB"; const string expectedTeacher = "Mattias Asplund"; const string expectedFeedback = "Very good"; const string expectedStudents = "Erik, Sven"; //ACT IEducation result = director.Build(builder); //ASSERT Assert.AreEqual(result.Education, expectedEducation); Assert.AreEqual(result.Students, expectedStudents); Assert.AreEqual(result.Teacher, expectedTeacher); Assert.AreEqual(result.StudentFeedback, expectedFeedback); }