public void CreateTest() { var typeName = typeof(ConcreteProduct).AssemblyQualifiedName; var product = RawGenericFactory.Create <IProduct>(typeName); Assert.AreEqual(typeName, product.GetType().AssemblyQualifiedName); }
public void RawGenericFactoryTest() { string typeName = typeof(ConcreteProduct).AssemblyQualifiedName; IProduct product = RawGenericFactory.Create <IProduct>(typeName); Assert.IsNotNull(product); Assert.AreEqual <string>(typeName, product.GetType().AssemblyQualifiedName); }
public void Test() { var typeName = typeof(ConcreteProduct).AssemblyQualifiedName; Trace.WriteLine(typeName); var product = new RawGenericFactory <IProduct>().Create(typeName); Assert.IsNotNull(product); Assert.IsInstanceOfType(product, typeof(ConcreteProduct)); Assert.IsTrue(product is IProduct); var user = new RawGenericFactory <IUser>().Create(typeof(ConcreteUserA).AssemblyQualifiedName); Assert.IsNotNull(user); Assert.IsInstanceOfType(user, typeof(ConcreteUserA)); Assert.IsTrue(user is IUser); }