fixed Tests
This commit is contained in:
parent
79a040d0a3
commit
42f52dfa50
|
@ -1,54 +0,0 @@
|
|||
package org.gcube.portlets.user.geoportaldataviewer;
|
||||
|
||||
import org.gcube.common.authorization.library.provider.SecurityTokenProvider;
|
||||
import org.gcube.common.scope.api.ScopeProvider;
|
||||
|
||||
public class ConcessioneReader {
|
||||
|
||||
private static final String YOUR_TOKEN = "";
|
||||
|
||||
public static String SCOPE = "/gcube/devsec/devVRE";
|
||||
public static String mongoConcessioneID = "6102c07002ad3d05b5f81ddc";
|
||||
|
||||
//@Before
|
||||
public void setEnviroment() {
|
||||
ScopeProvider.instance.set(SCOPE);
|
||||
SecurityTokenProvider.instance.set(YOUR_TOKEN);
|
||||
|
||||
}
|
||||
|
||||
//@Test
|
||||
public void readConcessione() throws Exception {
|
||||
System.out.println("getConcessioneForId " + mongoConcessioneID + "called");
|
||||
|
||||
/*ConcessioneDV concessionDV = null;
|
||||
|
||||
if (mongoConcessioneID == null)
|
||||
throw new Exception("Invalid parameter. The Id is null");
|
||||
|
||||
try {
|
||||
System.out.println("Trying to get record for id " + mongoConcessioneID);
|
||||
ConcessioniManagerI concessioniManager = statefulMongoConcessioni().build();
|
||||
Concessione concessione = concessioniManager.getById(mongoConcessioneID);
|
||||
System.out.println("For id " + mongoConcessioneID + ", got concessione " + concessione);
|
||||
System.out.println("Immagini Rappresentative are: " + concessione.getImmaginiRappresentative());
|
||||
System.out.println("Relazione scavo: " + concessione.getRelazioneScavo());
|
||||
System.out.println("Pianta Fine scavo: " + concessione.getPianteFineScavo());
|
||||
System.out.println("Posizionamento scavo: " + concessione.getPosizionamentoScavo());
|
||||
|
||||
if (concessione != null) {
|
||||
concessionDV = ConvertToDataViewModel.toConcessione(concessione);
|
||||
}
|
||||
|
||||
if (concessionDV == null)
|
||||
throw new Exception("Concessione not retrieved");
|
||||
|
||||
System.out.println("Got concessione: " + concessionDV);
|
||||
|
||||
} catch (Exception e) {
|
||||
String erroMsg = Concessione.class.getSimpleName() + " with id " + mongoConcessioneID + " not available";
|
||||
throw new Exception(erroMsg);
|
||||
}*/
|
||||
}
|
||||
|
||||
}
|
|
@ -11,7 +11,7 @@ public class GNABaseMaps {
|
|||
|
||||
private static final String SCOPE = "/gcube/devsec/devVRE";
|
||||
|
||||
@Test
|
||||
//@Test
|
||||
public void readBaseMaps() {
|
||||
System.out.println("called readBaseMaps test");
|
||||
ScopeProvider.instance.set(SCOPE);
|
||||
|
|
|
@ -45,7 +45,7 @@ public class GeoportalViewer_Tests {
|
|||
// private static String TOKEN = ""; //preVRE
|
||||
|
||||
private static String CONTEXT = "/gcube/devsec/devVRE";
|
||||
private static String TOKEN = "c41a00c0-7897-48d2-a67a-05190d6ce5e6-98187548"; // devVRE
|
||||
private static String TOKEN = ""; // devVRE
|
||||
|
||||
private static String PROFILE_ID = "profiledConcessioni";
|
||||
private static String PROJECT_ID = "6356ad1dde985906377eef3f";
|
||||
|
@ -57,7 +57,7 @@ public class GeoportalViewer_Tests {
|
|||
*
|
||||
* @return the client
|
||||
*/
|
||||
@Before
|
||||
//@Before
|
||||
public void getClient() {
|
||||
// assumeTrue(GCubeTest.isTestInfrastructureEnabled());
|
||||
ScopeProvider.instance.set(CONTEXT);
|
||||
|
@ -116,7 +116,7 @@ public class GeoportalViewer_Tests {
|
|||
|
||||
}
|
||||
|
||||
@Test
|
||||
//@Test
|
||||
public void getSpatialReference() {
|
||||
System.out.println("getSpatialReference [profileID: " + PROFILE_ID + ", projectID: " + PROJECT_ID + "] called");
|
||||
try {
|
||||
|
|
|
@ -11,7 +11,7 @@ public class IAMClient {
|
|||
private static final String SCOPE = "/gcube/devsec/devVRE";
|
||||
private static final String MONGO_ITEM_ID = "614af6a502ad3d6128abd43f";
|
||||
|
||||
@Test
|
||||
//@Test
|
||||
public void readCredentials() {
|
||||
System.out.println("called readCredentials test");
|
||||
ScopeProvider.instance.set(SCOPE);
|
||||
|
|
Loading…
Reference in New Issue