diff --git a/src/main/Main.java b/src/main/Main.java index 7ce7ee9..e049e0b 100644 --- a/src/main/Main.java +++ b/src/main/Main.java @@ -5,16 +5,13 @@ import main.RestApi.Method; public class Main { - + static RestApi api = new RestApi(); + static ArrayList queryParam = new ArrayList<>(); + static ArrayList formParam = new ArrayList<>(); + static ArrayList pathParam = new ArrayList<>(); + public static void main(String[] args) { - RestApi api = new RestApi(); - ArrayList queryParam = new ArrayList<>(); - ArrayList formParam = new ArrayList<>(); - ArrayList pathParam = new ArrayList<>(); - api.setAccount("http://nitta-lab-www.is.konan-u.ac.jp/CactusServer/rest/accounts/"); - formParam.add(new RestParam("userID", "yyy")); - formParam.add(new RestParam("userName", "abc")); - formParam.add(new RestParam("userPass", "abc")); + init(); api.setupRestTest(Method.POST, queryParam, formParam, pathParam); api.doRestTest(); for (String result : api.getResults()) { @@ -23,8 +20,11 @@ System.out.println(api.getJudgeResult()); } - private void init() { - + static private void init() { + api.setAccount("http://nitta-lab-www.is.konan-u.ac.jp/CactusServer/rest/accounts/"); + formParam.add(new RestParam("userID", "yyy")); + formParam.add(new RestParam("userName", "abc")); + formParam.add(new RestParam("userPass", "abc")); } }