private List <IComponent> DummyCarComponents() { var componentFactory = new ComponentFactory("car"); var dummyCarComponents = componentFactory.CreateComponents(); return(dummyCarComponents); }
public List <IComponent> DummyPlaneComponents() { var componentFactory = new ComponentFactory("plane"); var dummyPlaneComponents = componentFactory.CreateComponents(); return(dummyPlaneComponents); }
public void WhenComponentFactoryIsCalledWithVehicleTypeofCarParameter_ThenAListOfComponentObjectsIsReturned( string vehicleType) { var componentFactory = new ComponentFactory(vehicleType); var expected = DummyCarComponents(); var result = componentFactory.CreateComponents(); int i = 0; foreach (IComponent component in result) { component.Should().Be(result[i]); i++; } }