Пример #1
0
        public void TestTeacherCreation()
        {
            Person teacher = FactoryPerson.Create("Loh", false, true);

            Assert.AreSame(typeof(Teacher), teacher.GetType());
        }
Пример #2
0
        public void TestTeacherBossCreation()
        {
            Person teacherboss = FactoryPerson.Create("Boss", true, true);

            Assert.AreSame(typeof(Teacher), teacherboss.GetType());
        }
Пример #3
0
        public void TestStudentCreation()
        {
            Person student = FactoryPerson.Create("john", false, false);

            Assert.AreSame(typeof(Student), student.GetType());
        }