public void Test_TotalTax_MeetsExpectation() { ABM.BOL.IABCBookingHelper IABC = new ABM.BOL.ABCBookingHelper(); decimal expectedTotalTax = 890251.48M; decimal actualTotalTax = IABC.Get_TotalTax_For_TheSystem(); Assert.AreEqual(expectedTotalTax, actualTotalTax, "Total tax not met to the expected total tax."); }
public void Test_TotalTax_IsValid() { ABM.BOL.IABCBookingHelper IABC = new ABM.BOL.ABCBookingHelper(); decimal expectedTotalTax = 0; decimal actualTotalTax = IABC.Get_TotalTax_For_TheSystem(); Assert.AreNotEqual(expectedTotalTax, actualTotalTax, "Total tax is invalid."); }
static void Main(string[] args) { string errorMsg = string.Empty; try { ABM.BOL.IABCBookingHelper IABC = new ABM.BOL.ABCBookingHelper(); // (1) Get price per night long booking_id = 200123; var pricePerNight = IABC.Get_PricePerNight_For_BookingId(booking_id); Console.WriteLine(ABM.Constants.request1 + booking_id + " = " + pricePerNight); // (2) Get earliest check-in date long hotel_id = 1042; var earliestCheckInDate = IABC.Get_Earliest_CheckInDate_For_HotelId(hotel_id); Console.WriteLine(ABM.Constants.request2 + hotel_id + " = " + earliestCheckInDate); // (3) Get top 5 expensive bookings var top5_BookingIdWithTotalPrice = IABC.Get_FiveMostExpensiveBookings(); Console.WriteLine(ABM.Constants.request3); foreach (var item in top5_BookingIdWithTotalPrice) { Console.WriteLine(item.Key + " : " + item.Value); } // (4) Get total tax ABC owes decimal totalTax = IABC.Get_TotalTax_For_TheSystem(); Console.WriteLine(ABM.Constants.request4 + totalTax); } catch (Exception ex) { errorMsg = ABM.Constants.COMMON_EXP + ex.Message; } finally { Console.WriteLine(errorMsg); } Console.ReadLine(); }