public void InvoiceGeneratorShouldTakesMultipleRide_ShouldReturnTotalNoOfRides() { Rides[] rides = { new Rides(5, 15), new Rides(12, 35), new Rides(7, 23) }; CabInvoice obj = new CabInvoice(); double Actual = obj.TotalRides(rides); Assert.AreEqual(Actual, 3); }
public void Given_User_Id_AndGet_Total_Number_Rides() { RideReposetory rideRepository = new RideReposetory(); List <Rides> rides = new List <Rides>(); rides.Add(new Rides(0.5, 45)); rides.Add(new Rides(1.0, 8)); Customer custmor = new Customer("Bdec123"); rideRepository.AddRide(rides, custmor); double actual = Invoice_Summery.GetRides(custmor); CabInvoice obj = new CabInvoice(); double expected = obj.TotalRides(rides.ToArray()); Assert.AreEqual(actual, expected); }