Пример #1
0
        public void PainterCreationWithoutReflectionTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            IArtist       x       = factory.GetArtist(typeof(Painter));

            Assert.AreSame(x.GetType(), typeof(Painter));
        }
Пример #2
0
        public void PainterCreationTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            IPerson       x       = factory.GetPerson <Painter>();

            Assert.AreSame(x.GetType(), typeof(Painter));
        }
Пример #3
0
        public void MathTeacherCreationWithoutReflectionTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            ITeacher      x       = factory.GetTeacher(typeof(MathTeacher));

            Assert.AreSame(x.GetType(), typeof(MathTeacher));
        }
Пример #4
0
        public void MathTeacherCreationTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            IPerson       x       = factory.GetPerson <MathTeacher>();

            Assert.AreSame(x.GetType(), typeof(MathTeacher));
        }
Пример #5
0
        public void PneumologistCreationWithoutReflectionTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            IDoctor       x       = factory.GetDoctor(typeof(Pneumologist));

            Assert.AreSame(x.GetType(), typeof(Pneumologist));
        }
Пример #6
0
        public void PneumologistCreationTest()
        {
            SimpleFactory factory = SimpleFactory.GetFactory();
            IPerson       x       = factory.GetPerson <Pneumologist>();

            Assert.AreSame(x.GetType(), typeof(Pneumologist));
        }