public void CalculateDiscount_NoDiscount() { int listLength = 2; var deviceService = CreateDeviceService(listLength); var discount = deviceService.CalculateDiscountAsync( MockDataFactory.GetListWithDuplicateDeviceIds(listLength)); Assert.Equal(0.0m, discount.Result.discount); }
public void CalculateDiscount_DuplicateElement_Exception() { int listLength = 2; var deviceService = CreateDeviceService(listLength); Assert.ThrowsAsync <AppException>(async() => { await deviceService.CalculateDiscountAsync(MockDataFactory.GetListWithDuplicateDeviceIds(listLength)); }); }