| | |
| | | import org.junit.jupiter.api.BeforeEach; |
| | | import org.junit.jupiter.api.Test; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | import static org.assertj.core.api.Assertions.assertThat; |
| | | import static org.assertj.core.api.Assertions.assertThatThrownBy; |
| | | import static org.mockito.ArgumentMatchers.any; |
| | |
| | | } |
| | | |
| | | @Test |
| | | void shouldExposeGuideEarningAmountForHistoryOrder() { |
| | | TourOrder order = order(OrderStatus.COMPLETED); |
| | | order.setGuideEarningAmount(new BigDecimal("256.00")); |
| | | when(orderMapper.selectOne(any())).thenReturn(order); |
| | | |
| | | GuideOrderResponse response = service.detail(8L, 10L); |
| | | |
| | | assertThat(response.getEarningAmount()).isEqualByComparingTo("256.00"); |
| | | } |
| | | |
| | | @Test |
| | | void shouldRejectOrderOutsidePendingMeetingState() { |
| | | TourOrder order = order(OrderStatus.COMPLETED); |
| | | when(orderMapper.selectOne(any())).thenReturn(order); |