Esempio n. 1
0
        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);
        }
Esempio n. 2
0
        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();
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }
Esempio n. 5
0
        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);
        }
Esempio n. 6
0
        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);
        }
Esempio n. 7
0
        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);
        }