public void call_to_CreateProductX_method_should_return_productX() { IAbstractFactory factory = new ConcreteFactory(); IAbstractProductX productX = factory.CreateProductX(); Assert.AreEqual("Called: ConcreteProductX", productX.feature()); }
public void call_to_createProductX_overridden_method_should_return_new_productX() { IAbstractFactory myFactory = new MyConcreteFactory(); IAbstractProductX myProduct = myFactory.CreateProductX(); Assert.That(myProduct.feature(), Is.EqualTo("Called: MyProductX")); }