public void givenDistanceAndTime_ShouldReturnFare() { Invoicegenerator invoiceGenerator = new Invoicegenerator(); double distance = 2.0; int time = 5; double fare = invoiceGenerator.CalculateFare(distance, time); Assert.AreEqual(25, fare); }
public void givenless_DistanceAndTime_ShouldReturnMinimumFare() { Invoicegenerator invoiceGenerator = new Invoicegenerator(); double distance = 0.1; int time = 1; double fare = invoiceGenerator.CalculateFare(distance, time); Assert.AreEqual(5, fare); }
public void givenMultipleRide_shouldReturnInvoiceSummary() { List <Ride> rides = new List <Ride> { new Ride(2.0, 5), new Ride(2.0, 5) }; InvoiceSummary Expectedsummary = new InvoiceSummary(2, 50, 25); Invoicegenerator invoiceGenerator = new Invoicegenerator(); InvoiceSummary summary = invoiceGenerator.CalculateFare(rides, RideType.NORMAL_RIDE); Assert.AreEqual(Expectedsummary, summary); }