public void ArtistCreationWithConcreteFactory1() { AbstractFactory factory = ConcreteFactory1.GetFactory(); IPerson x = factory.CreateArtist(); Assert.AreSame(x.GetType(), typeof(Actor)); }
public void DoctorCreationWithConcreteFactory1() { AbstractFactory factory = ConcreteFactory1.GetFactory(); IPerson x = factory.CreateDoctor(); Assert.AreSame(x.GetType(), typeof(Cardiologist)); }
public void TeacherCreationWithConcreteFactory1() { AbstractFactory factory = ConcreteFactory1.GetFactory(); IPerson x = factory.CreateTeacher(); Assert.AreSame(x.GetType(), typeof(EnglishTeacher)); }
public void DoctorCreationTestWithReflectionConcreteFactory1() { AbstractFactory factory = ConcreteFactory1.GetFactory(); IPerson x = factory.CreatePerson <Cardiologist>(); Assert.AreSame(x.GetType(), typeof(Cardiologist)); }