|
@@ -101,6 +101,7 @@ public abstract class CrudTestBase extends ITBase {
|
|
// Bodies
|
|
// Bodies
|
|
// ================
|
|
// ================
|
|
protected void testCreate() {
|
|
protected void testCreate() {
|
|
|
|
+ logger.info("[BEGIN] testCreate");
|
|
// Test: create setting api.
|
|
// Test: create setting api.
|
|
for (int i = 0; i < NUM; i++) {
|
|
for (int i = 0; i < NUM; i++) {
|
|
final Map<String, Object> requestBody = createTestParam(i);
|
|
final Map<String, Object> requestBody = createTestParam(i);
|
|
@@ -114,9 +115,11 @@ public abstract class CrudTestBase extends ITBase {
|
|
// Test: number of settings.
|
|
// Test: number of settings.
|
|
final Map<String, Object> searchBody = createSearchBody(SEARCH_ALL_NUM);
|
|
final Map<String, Object> searchBody = createSearchBody(SEARCH_ALL_NUM);
|
|
checkGetMethod(searchBody, getListEndpointSuffix()).then().body(getJsonPath() + ".size()", equalTo(NUM));
|
|
checkGetMethod(searchBody, getListEndpointSuffix()).then().body(getJsonPath() + ".size()", equalTo(NUM));
|
|
|
|
+ logger.info("[END] testCreate");
|
|
}
|
|
}
|
|
|
|
|
|
protected void testRead() {
|
|
protected void testRead() {
|
|
|
|
+ logger.info("[BEGIN] testRead");
|
|
// Test: get settings api.
|
|
// Test: get settings api.
|
|
final Map<String, Object> searchBody = createSearchBody(SEARCH_ALL_NUM);
|
|
final Map<String, Object> searchBody = createSearchBody(SEARCH_ALL_NUM);
|
|
List<String> nameList = getPropList(searchBody, getKeyProperty());
|
|
List<String> nameList = getPropList(searchBody, getKeyProperty());
|
|
@@ -141,10 +144,11 @@ public abstract class CrudTestBase extends ITBase {
|
|
searchBody.put("page", i + 1);
|
|
searchBody.put("page", i + 1);
|
|
checkGetMethod(searchBody, getListEndpointSuffix()).then().body("response." + getListEndpointSuffix() + ".size()", equalTo(1));
|
|
checkGetMethod(searchBody, getListEndpointSuffix()).then().body("response." + getListEndpointSuffix() + ".size()", equalTo(1));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ logger.info("[END] testRead");
|
|
}
|
|
}
|
|
|
|
|
|
protected void testUpdate() {
|
|
protected void testUpdate() {
|
|
|
|
+ logger.info("[BEGIN] testUpdate");
|
|
// Test: update settings api
|
|
// Test: update settings api
|
|
final Set<String> keySet = createTestParam(0).keySet();
|
|
final Set<String> keySet = createTestParam(0).keySet();
|
|
final Map<String, Object> updateMap = getUpdateMap();
|
|
final Map<String, Object> updateMap = getUpdateMap();
|
|
@@ -169,6 +173,7 @@ public abstract class CrudTestBase extends ITBase {
|
|
}
|
|
}
|
|
|
|
|
|
checkUpdate();
|
|
checkUpdate();
|
|
|
|
+ logger.info("[END] testUpdate");
|
|
}
|
|
}
|
|
|
|
|
|
protected void checkUpdate() {
|
|
protected void checkUpdate() {
|
|
@@ -184,6 +189,7 @@ public abstract class CrudTestBase extends ITBase {
|
|
}
|
|
}
|
|
|
|
|
|
protected void testDelete() {
|
|
protected void testDelete() {
|
|
|
|
+ logger.info("[BEGIN] testDelete");
|
|
final Map<String, Object> searchBody = createSearchBody(SEARCH_ALL_NUM);
|
|
final Map<String, Object> searchBody = createSearchBody(SEARCH_ALL_NUM);
|
|
|
|
|
|
for (int count = 0; count < NUM; count++) {
|
|
for (int count = 0; count < NUM; count++) {
|
|
@@ -194,6 +200,7 @@ public abstract class CrudTestBase extends ITBase {
|
|
|
|
|
|
// Test: number of settings.
|
|
// Test: number of settings.
|
|
checkGetMethod(searchBody, getListEndpointSuffix()).then().body(getJsonPath() + ".size()", equalTo(0));
|
|
checkGetMethod(searchBody, getListEndpointSuffix()).then().body(getJsonPath() + ".size()", equalTo(0));
|
|
|
|
+ logger.info("[END] testDelete");
|
|
}
|
|
}
|
|
|
|
|
|
// ================
|
|
// ================
|