public void CreateInstance_GivenASpecificCarName_ReturnsTheAppropriateIAutoInstance(string carName, Type expectedCarType) { //arrange AutoFactory autoFactory = new AutoFactory(); //act IAuto actualCar = autoFactory.CreateInstance(carName); //assert actualCar.Should().BeOfType(expectedCarType); }
public void CreateAutomobile_ReturnsTheConfiguredIAutoInstance() { //arrange IAutoFactory autoFactory = LoadFactory.GetInstance(); Type expectedAutomobileType = typeof(MiniCooper); //act IAuto actualAutomobile = autoFactory.CreateAutomobile(); //assert actualAutomobile.Should().BeOfType(expectedAutomobileType); }