public async Task GivenQuoteofOneVechicleExceedPassengerShouldReturn0() { _proxy.GetQuote().Returns(Task.FromResult(GetSingleQoute())); var passengerService = new PassengerService(_proxy); var result = await passengerService.GetQuote(4); result.Count().Should().Be(0); }
public async Task GivenQuoteofOneVechicleShouldReturnValueBasedOnLowerPrice() { _proxy.GetQuote().Returns(Task.FromResult(GetSingleQoute())); var passengerService = new PassengerService(_proxy); var result = await passengerService.GetQuote(2); result.Count().Should().Be(1); result.First().TotalPrice.Should().Be(4); }
public async Task GivenQuoteofOneVechicleExceedPassengerShouldReturnInProperOrder() { _proxy.GetQuote().Returns(Task.FromResult(GetTwoQoute())); var passengerService = new PassengerService(_proxy); var result = await passengerService.GetQuote(2); result.Count().Should().Be(2); result.First().Name.Should().Be("L2"); result.First().TotalPrice.Should().Be(3); result.Last().Name.Should().Be("L1"); result.Last().TotalPrice.Should().Be(4); }