Newer
Older
task-bldg / src / test / java / osm / surveyor / task / plateau / PlateauServiceTest.java
@haya4 haya4 on 28 Apr 1 KB Plateau API test
  1. package osm.surveyor.task.plateau;
  2.  
  3. import static org.junit.jupiter.api.Assertions.*;
  4.  
  5. import java.nio.file.Path;
  6.  
  7. import org.junit.jupiter.api.AfterAll;
  8. import org.junit.jupiter.api.AfterEach;
  9. import org.junit.jupiter.api.BeforeAll;
  10. import org.junit.jupiter.api.BeforeEach;
  11. import org.junit.jupiter.api.DisplayName;
  12. import org.junit.jupiter.api.Test;
  13. import org.springframework.beans.factory.annotation.Autowired;
  14. import org.springframework.boot.test.context.SpringBootTest;
  15. import org.springframework.util.FileSystemUtils;
  16.  
  17. @SpringBootTest
  18. class PlateauServiceTest {
  19.  
  20. @Autowired
  21. PlateauService service;
  22. private static final String dirStr = "plateau-data"; // task-bldg.plateau.dir=plateau-data
  23.  
  24. @BeforeAll
  25. static void setUpBeforeClass() throws Exception {
  26. Path dir = Path.of(dirStr);
  27. FileSystemUtils.deleteRecursively(dir);
  28. }
  29.  
  30. @AfterAll
  31. static void tearDownAfterClass() throws Exception {
  32. }
  33.  
  34. @BeforeEach
  35. void setUp() throws Exception {
  36. }
  37.  
  38. @AfterEach
  39. void tearDown() throws Exception {
  40. }
  41.  
  42. @Test
  43. @DisplayName("'PlateauService.getPlateauStatus() ['./plateau-data' is not exists.]")
  44. void testGetPlateauStatus() throws Exception {
  45. Boolean ret = service.getPlateauStatus();
  46. assertFalse(ret);
  47. }
  48.  
  49. }