BusNetpumpTest.java 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. package com.coffee.admin;
  2. import com.coffee.bus.controller.BusDeviceRunningController;
  3. import com.coffee.bus.entity.BusDeviceRunningEntity;
  4. import com.coffee.bus.service.LocalBusDeviceRunningService;
  5. import org.junit.Test;
  6. import org.junit.runner.RunWith;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.boot.test.context.SpringBootTest;
  9. import org.springframework.test.context.junit4.SpringRunner;
  10. import java.util.List;
  11. /**
  12. * @author lifang
  13. * @version 1.0.0
  14. * @ClassName BusHospitalTest.java
  15. * @Description TODO
  16. * @createTime 2022年03月19日 10:27:00
  17. */
  18. @RunWith(SpringRunner.class)
  19. @SpringBootTest(classes = AdminApplication.class)
  20. public class BusNetpumpTest {
  21. @Autowired
  22. private LocalBusDeviceRunningService netPumpService;
  23. @Autowired
  24. private BusDeviceRunningController netPumpController;
  25. @Test
  26. public void save(){
  27. // StpUtil.login();
  28. BusDeviceRunningEntity netPumpEntity = new BusDeviceRunningEntity();
  29. // netPumpEntity.setWarn(NetPumpWarnEnum.ComingEnd);
  30. netPumpEntity.setId("1507903748141658113");
  31. netPumpEntity.setAlias("1");
  32. netPumpEntity.setBedNo("1");
  33. netPumpEntity.setDeviceId("123");
  34. netPumpEntity.setTenantId("123");
  35. netPumpService.updateById(netPumpEntity);
  36. }
  37. @Test
  38. public void query(){
  39. List<BusDeviceRunningEntity> list = netPumpService.list();
  40. System.out.println(list);
  41. }
  42. @Test
  43. public void Delete(){
  44. // boolean b = busHospitalService.removeById(1505789328745721857L);
  45. // System.out.println(b);
  46. }
  47. }