public void GivenInvalidTime_ThrowException() { Ride ride = new Ride(1, -1); InvoiceGeneratorException invoiceGeneratorException2 = Assert.Throws <InvoiceGeneratorException>(() => invoiceGeneratorNormalRide.TotalFareForSingleRidereturn(ride)); Assert.AreEqual(invoiceGeneratorException2.type, InvoiceGeneratorException.ExceptionType.INVALID_TIME); }
public void GivenInvalidDistance_ThrowException() { Ride ride = new Ride(-1, 1); InvoiceGeneratorException invoiceGeneratorException = Assert.Throws <InvoiceGeneratorException>(() => invoiceGeneratorNormalRide.TotalFareForSingleRidereturn(ride)); Assert.AreEqual(invoiceGeneratorException.type, InvoiceGeneratorException.ExceptionType.INVALID_DISTANCE); }