public void CreateSut_CreatesVehicleFees_ForVehicle() { // Arrange var vehicle = Substitute.For <IStandardCar>(); IFeeManager sut = CreateSut(); // Act sut.CreateFees(vehicle); // Assert IVehicleFees actual = sut.GetFees(vehicle); Assert.NotNull(actual); }
public void DeleteFees_RemovesFees_ForVehicle() { // Arrange var vehicle = Substitute.For <IStandardCar>(); var factory = Substitute.For <IFeesForVehicleFactory>(); IFeeManager sut = CreateSut(factory); sut.CreateFees(vehicle); // Act sut.DeleteFees(vehicle); // Assert factory.Received().Release(Arg.Any <IEnumerable <IFee> >()); }