@Test
public void test1PutOnPserver() throws UnsupportedEncodingException, AAIException {
- /*
- * TODO do the same with uri
- */
+ /*
+ * TODO do the same with uri
+ */
DBConnectionType type = DBConnectionType.REALTIME;
traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion(), type);
Loader loader = traversalHttpEntry.getLoader();
@Test
public void test3PutOnPInterface() {
- try {
+ try {
DBConnectionType type = DBConnectionType.REALTIME;
traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion(), type);
Loader loader = traversalHttpEntry.getLoader();
Response response = doRequest(traversalHttpEntry, loader, dbEngine, HttpMethod.PUT, uri, content);
dbEngine.commit();
assertEquals("Expected the p-interface to be created", 201, response.getStatus());
- } catch (UnsupportedEncodingException | AAIException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+ } catch (UnsupportedEncodingException | AAIException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
}
}
private int doDelete(String resourceVersion, String uri, String nodeType) throws UnsupportedEncodingException, AAIException {
- queryParameters.add("resource-version", resourceVersion);
- DBConnectionType type = DBConnectionType.REALTIME;
- traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion(), type);
+ queryParameters.add("resource-version", resourceVersion);
+ DBConnectionType type = DBConnectionType.REALTIME;
+ traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion(), type);
Loader loader = traversalHttpEntry.getLoader();
TransactionalGraphEngine dbEngine = traversalHttpEntry.getDbEngine();
JsonObject jsonObj = new JsonParser().parse(msg).getAsJsonObject();
String resourceVersion = "";
if ( jsonObj.isJsonObject()) {
- resourceVersion = jsonObj.get("resource-version").getAsString();
+ resourceVersion = jsonObj.get("resource-version").getAsString();
}
assertEquals("Expected the pserver to be deleted", 204, doDelete(resourceVersion, "/cloud-infrastructure/pservers/pserver/junit-test1", "pserver"));
}
@Test
public void test7DeleteOnPserverNoPinterface() throws UnsupportedEncodingException, AAIException {
-
+
DBConnectionType type = DBConnectionType.REALTIME;
traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion(), type);
//HttpEntry httpEntry = new HttpEntry(Version.getLatest(), ModelType.MOXY, queryStyle, type);
JsonObject jsonObj = new JsonParser().parse(msg).getAsJsonObject();
String resourceVersion = "";
if ( jsonObj.isJsonObject()) {
- resourceVersion = jsonObj.get("resource-version").getAsString();
+ resourceVersion = jsonObj.get("resource-version").getAsString();
}
assertEquals("Expected the pserver to be deleted", 204, doDelete(resourceVersion, "/cloud-infrastructure/pservers/pserver/junit-test2", "pserver"));
}
public void notificationOnRelatedToTest() throws UnsupportedEncodingException, AAIException {
Loader ld = loaderFactory.createLoaderForVersion(ModelType.MOXY, schemaVersions.getDefaultVersion());
- UEBNotification uebNotification = Mockito.spy(new UEBNotification(ld, loaderFactory, schemaVersions));
+ UEBNotification uebNotification = Mockito.spy(new UEBNotification(ld, loaderFactory, schemaVersions));
DBConnectionType type = DBConnectionType.REALTIME;
traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion(), type , uebNotification);
@Test
public void setDepthTest() throws UnsupportedEncodingException, AAIException {
- System.setProperty("AJSC_HOME", ".");
- System.setProperty("BUNDLECONFIG_DIR", "src/main/test/resources");
+ System.setProperty("AJSC_HOME", ".");
+ System.setProperty("BUNDLECONFIG_DIR", "src/main/test/resources");
- String depthParam = AAIConfig.get("aai.rest.getall.depthparam");
+ String depthParam = AAIConfig.get("aai.rest.getall.depthparam");
DBConnectionType type = DBConnectionType.REALTIME;
traversalHttpEntry.setHttpEntryProperties(schemaVersions.getDefaultVersion(), type);
//HttpEntry httpEntry = new HttpEntry(Version.getLatest(), ModelType.MOXY, QueryStyle.TRAVERSAL, type);