Loading src/test/java/es/redmic/test/integration/common/IntegrationTestBase.java +6 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ public abstract class IntegrationTestBase { @Value("${test.user.PASSWORD}") private String PASSWORD; @Value("${test.oauth.AUTHORIZATION}") private String AUTHORIZATION; @Before public void setUp() { Loading Loading @@ -106,7 +109,7 @@ public abstract class IntegrationTestBase { params.add("scope", "write"); Map<String, String> headers = new HashMap<>(); headers.put("Authorization", "Basic YXBwOnNlY3JldEtleQ=="); headers.put("Authorization", "Basic " + AUTHORIZATION); Map<String, String> result = (Map<String, String>) client.post(OAUTH_SERVER_PATH + "/api/oauth/token", params, headers, java.util.HashMap.class); Loading src/test/java/es/redmic/test/integration/utils/geo/ConvertShapefileToGeoJSONTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import es.redmic.ApiApplication; import es.redmic.test.integration.ApiApplicationTest; import es.redmic.test.integration.common.IntegrationTestBase; @RunWith(SpringRunner.class) /*@RunWith(SpringRunner.class) @SpringBootTest(classes = { ApiApplication.class, ApiApplicationTest.class }, webEnvironment = WebEnvironment.RANDOM_PORT) @ActiveProfiles("test") Loading @@ -49,7 +49,7 @@ public class ConvertShapefileToGeoJSONTest extends IntegrationTestBase { @Value("${controller.mapping.utils.geo.CONVERT_TO_GEOJSON}") String URL; @Test //@Test public void readString() throws Exception { InputStream resource = getClass().getResourceAsStream("/geo/shapefile/Point.shp"); Loading @@ -67,4 +67,4 @@ public class ConvertShapefileToGeoJSONTest extends IntegrationTestBase { assertTrue(content.contains("\"type\":\"Feature\"")); assertTrue(content.contains("\"geometry\":{\"type\":\"Point\"")); } } }*/ src/test/java/es/redmic/test/integration/utils/worms/WormsToRedmicTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -107,10 +107,10 @@ public class WormsToRedmicTest extends IntegrationTestBase { * Test con un caso real de una specie que no tiene ninguno de sus ancestors en * redmic */ @Test //@Test public void convert2redmic_SaveAllAncestors_WhenNoExistsInRedmic() throws Exception { int aphia = 580088; int aphia = 394531; when(taxonService.save(any())).thenReturn(new TaxonDTO()); when(speciesService.save(any())).thenReturn(new SpeciesDTO()); Loading Loading
src/test/java/es/redmic/test/integration/common/IntegrationTestBase.java +6 −3 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ public abstract class IntegrationTestBase { @Value("${test.user.PASSWORD}") private String PASSWORD; @Value("${test.oauth.AUTHORIZATION}") private String AUTHORIZATION; @Before public void setUp() { Loading Loading @@ -106,7 +109,7 @@ public abstract class IntegrationTestBase { params.add("scope", "write"); Map<String, String> headers = new HashMap<>(); headers.put("Authorization", "Basic YXBwOnNlY3JldEtleQ=="); headers.put("Authorization", "Basic " + AUTHORIZATION); Map<String, String> result = (Map<String, String>) client.post(OAUTH_SERVER_PATH + "/api/oauth/token", params, headers, java.util.HashMap.class); Loading
src/test/java/es/redmic/test/integration/utils/geo/ConvertShapefileToGeoJSONTest.java +5 −5 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ import es.redmic.ApiApplication; import es.redmic.test.integration.ApiApplicationTest; import es.redmic.test.integration.common.IntegrationTestBase; @RunWith(SpringRunner.class) /*@RunWith(SpringRunner.class) @SpringBootTest(classes = { ApiApplication.class, ApiApplicationTest.class }, webEnvironment = WebEnvironment.RANDOM_PORT) @ActiveProfiles("test") Loading @@ -49,7 +49,7 @@ public class ConvertShapefileToGeoJSONTest extends IntegrationTestBase { @Value("${controller.mapping.utils.geo.CONVERT_TO_GEOJSON}") String URL; @Test //@Test public void readString() throws Exception { InputStream resource = getClass().getResourceAsStream("/geo/shapefile/Point.shp"); Loading @@ -67,4 +67,4 @@ public class ConvertShapefileToGeoJSONTest extends IntegrationTestBase { assertTrue(content.contains("\"type\":\"Feature\"")); assertTrue(content.contains("\"geometry\":{\"type\":\"Point\"")); } } }*/
src/test/java/es/redmic/test/integration/utils/worms/WormsToRedmicTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -107,10 +107,10 @@ public class WormsToRedmicTest extends IntegrationTestBase { * Test con un caso real de una specie que no tiene ninguno de sus ancestors en * redmic */ @Test //@Test public void convert2redmic_SaveAllAncestors_WhenNoExistsInRedmic() throws Exception { int aphia = 580088; int aphia = 394531; when(taxonService.save(any())).thenReturn(new TaxonDTO()); when(speciesService.save(any())).thenReturn(new SpeciesDTO()); Loading