PosStorePaymentBindingTest.java 779 B

1234567891011121314151617181920212223
  1. package com.ruoyi.system.service;
  2. import com.fasterxml.jackson.databind.ObjectMapper;
  3. import com.ruoyi.system.domain.PosStore;
  4. import org.junit.jupiter.api.Test;
  5. import static org.junit.jupiter.api.Assertions.assertNull;
  6. class PosStorePaymentBindingTest {
  7. @Test
  8. void genericStoreInputCannotChangeStallPaymentSelection() throws Exception {
  9. PosStore input = new ObjectMapper().readValue(
  10. "{\"id\":11,\"payMethods\":\"COD\"}", PosStore.class);
  11. assertNull(input.getPayMethods());
  12. }
  13. @Test
  14. void genericStoreInputCannotSwitchPaymentRoutingType() throws Exception {
  15. PosStore input = new ObjectMapper().readValue(
  16. "{\"id\":11,\"isStall\":0}", PosStore.class);
  17. assertNull(input.getIsStall());
  18. }
  19. }