Beispiel #1
0
        public void TestCreateStudents()
        {
            Cursus         csharp  = new Cursus();
            AbstractPerson student = PersonFactory.Create("Dan");

            string typeName = typeof(Students).ToString();

            Assert.AreEqual(typeName, student.GetType().ToString());
        }
Beispiel #2
0
        public void TestTrainerCreation()
        {
            List <AbstractPerson> people = new List <AbstractPerson> {
                new Student()
            };

            AbstractPerson person = PersonFactory.Create(people);

            Assert.AreEqual(person.GetType(), typeof(Trainer));
        }
Beispiel #3
0
        public void TestCreateInstructor()
        {
            Cursus csharp = new Cursus();

            List <AbstractPerson> students = new List <AbstractPerson>
            {
                new Students("Dan", csharp)
            };
            AbstractPerson instructor = PersonFactory.Create("Instructor", students);

            string typeName = typeof(Instructor).ToString();

            Assert.AreEqual(typeName, instructor.GetType().ToString());
        }
Beispiel #4
0
        public void TestStudentCreation()
        {
            AbstractPerson person = PersonFactory.Create();

            Assert.AreEqual(person.GetType(), typeof(Student));
        }