| | |
| | | } |
| | | |
| | | @Test |
| | | void shouldExposeGuideEarningAmountForHistoryOrder() { |
| | | void shouldExposePaymentAmountSeparatelyFromGuideEarningForHistoryOrder() { |
| | | TourOrder order = order(OrderStatus.COMPLETED); |
| | | order.setAmount(new BigDecimal("300.00")); |
| | | order.setPaymentAmount(new BigDecimal("300.00")); |
| | | order.setGuideEarningAmount(new BigDecimal("256.00")); |
| | | when(orderMapper.selectOne(any())).thenReturn(order); |
| | | |
| | | GuideOrderResponse response = service.detail(8L, 10L); |
| | | |
| | | assertThat(response.getPaymentAmount()).isEqualByComparingTo("300.00"); |
| | | assertThat(response.getEarningAmount()).isEqualByComparingTo("256.00"); |
| | | } |
| | | |