From 1180fbd8be365e8291ea937d850af381cd12fed2 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Thu, 11 Apr 2024 17:21:24 +0200 Subject: [PATCH] commented JUnit Tests --- .../gcube/application/geoportal/common/FilesTests.java | 4 ++-- .../application/geoportal/common/StorageUtilsTest.java | 6 +++--- .../geoportal/common/legacy/DefaultsTests.java | 4 ++-- .../geoportal/common/model/JSONPathTests.java | 10 +++++----- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/FilesTests.java b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/FilesTests.java index 0ec8885..f511c2f 100644 --- a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/FilesTests.java +++ b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/FilesTests.java @@ -18,7 +18,7 @@ public class FilesTests { static File baseFolder=new File("../test-data/concessioni"); - @Test + //@Test public void testNames(){ ArrayList toTestStrings=new ArrayList<>(Arrays.asList(baseFolder.list())); @@ -36,7 +36,7 @@ public class FilesTests { } } - @Test + //@Test public void testClustering() throws IOException { Map> map=Files.getAllShapeSet(baseFolder.getParentFile(),true); map.forEach((k, v)->{ diff --git a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java index ad7f17d..90603e2 100644 --- a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java +++ b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/StorageUtilsTest.java @@ -29,7 +29,7 @@ public class StorageUtilsTest { IClient client= null; - @Before + //@Before public void init(){ assumeTrue(GCubeTest.isTestInfrastructureEnabled()); TokenSetter.set(GCubeTest.getContext()); @@ -47,7 +47,7 @@ public class StorageUtilsTest { return client.getHttpsUrl().RFile(id); } - @Test + //@Test public void testParallelStorage() throws FileNotFoundException, InterruptedException { assumeTrue(GCubeTest.isTestInfrastructureEnabled()); ExecutorService service = Executors.newFixedThreadPool(10); @@ -81,7 +81,7 @@ public class StorageUtilsTest { } } - @Test + //@Test public void testSerialStorage() throws FileNotFoundException { assumeTrue(GCubeTest.isTestInfrastructureEnabled()); //get client diff --git a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/legacy/DefaultsTests.java b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/legacy/DefaultsTests.java index 61549c1..7b81549 100644 --- a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/legacy/DefaultsTests.java +++ b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/legacy/DefaultsTests.java @@ -11,14 +11,14 @@ import static org.junit.Assert.assertEquals; public class DefaultsTests { - @Test + //@Test public void checkConstraints(){ assertEquals(AccessPolicy.OPEN,ConstraintCheck.defaultFor(null,AccessPolicy.OPEN).evaluate()); assertEquals(AccessPolicy.EMBARGOED,ConstraintCheck.defaultFor(AccessPolicy.EMBARGOED,AccessPolicy.OPEN).evaluate()); } - @Test + //@Test public void checkDefaults(){ Concessione c= new Concessione(); diff --git a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java index 1d6c0fc..cdbfad0 100644 --- a/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java +++ b/geoportal-common/src/test/java/org/gcube/application/geoportal/common/model/JSONPathTests.java @@ -35,7 +35,7 @@ public class JSONPathTests { } - @Test + //@Test public void readElements() throws IOException { JSONPathWrapper documentNavigator=getNavigator("profiledConcessioniExample.json"); @@ -54,7 +54,7 @@ public class JSONPathTests { } - @Test + //@Test public void writeTest() throws IOException { JSONPathWrapper wrapper =getNavigator("emptyProfiledDocument.json"); checkSetValue(wrapper,"firstField","value1"); @@ -112,7 +112,7 @@ public class JSONPathTests { assertTrue(foundElements.size()==sizeBefore+1); } - @Test + //@Test public void testTokenizer(){ assertTrue(JSONPathWrapper.tokenizePath("$.firstField").size()==1); assertTrue(JSONPathWrapper.tokenizePath("$.firstField.child").size()==2); @@ -129,7 +129,7 @@ public class JSONPathTests { } - @Test + //@Test public void testGetFieldNameFromPathElement(){ assertEquals(JSONPathWrapper.extractFieldNameFromPathElement("$.firstField"),"firstField"); assertEquals(JSONPathWrapper.extractFieldNameFromPathElement("firstField"),"firstField"); @@ -137,7 +137,7 @@ public class JSONPathTests { assertEquals(JSONPathWrapper.extractFieldNameFromPathElement("$['book'][?(@.isbn)]"),"book"); } - @Test + //@Test public void testDefinitePath(){ assertTrue(JsonPath.isPathDefinite("$.firstField")); assertTrue(JsonPath.isPathDefinite("$.firstField.child"));