updated JUnit test
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/uri-resolver-manager@100797 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d4dd5d44e4
commit
66e04281a7
|
@ -136,23 +136,4 @@ public class UriResolverManager {
|
||||||
public Map<String, String> getCapabilities(){
|
public Map<String, String> getCapabilities(){
|
||||||
return this.applicationTypes;
|
return this.applicationTypes;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
|
|
||||||
try {
|
|
||||||
ScopeProvider.instance.set("/gcube/devsec/devVRE");
|
|
||||||
UriResolverManager resolver = new UriResolverManager("GIS");
|
|
||||||
Map<String, String> params = new HashMap<String, String>();
|
|
||||||
params.put("gis-UUID", "eb1a1b63-f324-47ee-9522-b8f5803e19ec");
|
|
||||||
params.put("scope", "/gcube/devsec/devVRE");
|
|
||||||
resolver.getLink(params, true);
|
|
||||||
} catch (UriResolverMapException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
} catch (IllegalArgumentException e) {
|
|
||||||
// TODO Auto-generated catch block
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ public class UriResolverTest {
|
||||||
params.put("gis-UUID", "eb1a1b63-f324-47ee-9522-b8f5803e19ec");
|
params.put("gis-UUID", "eb1a1b63-f324-47ee-9522-b8f5803e19ec");
|
||||||
params.put("scope", "/gcube/devsec/devVRE");
|
params.put("scope", "/gcube/devsec/devVRE");
|
||||||
String shortLink = resolver.getLink(params, true);
|
String shortLink = resolver.getLink(params, true);
|
||||||
System.out.println(shortLink);
|
System.out.println(shortLink); //true, link is shorted otherwise none
|
||||||
} catch (UriResolverMapException e) {
|
} catch (UriResolverMapException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (IllegalArgumentException e) {
|
} catch (IllegalArgumentException e) {
|
||||||
|
|
Loading…
Reference in New Issue