diff --git a/src/main/Main.java b/src/main/Main.java index fb58cad..9fce269 100644 --- a/src/main/Main.java +++ b/src/main/Main.java @@ -3,18 +3,18 @@ import java.util.ArrayList; import restfulchecker.RestChecker; -import restfulchecker.RestParam; import restfulchecker.RestChecker.Method; +import restfulchecker.RestParam; public class Main { static RestChecker api = new RestChecker(); static ArrayList queryParam = new ArrayList<>(); static ArrayList formParam = new ArrayList<>(); static ArrayList pathParam = new ArrayList<>(); - + public static void main(String[] args) { init(); - api.setupRestTest(Method.GET, queryParam, formParam, pathParam); + api.setupRestTest(Method.POST, queryParam, formParam, pathParam); api.doRestTest(); for (String result : api.getResults()) { System.out.println(result); @@ -23,10 +23,12 @@ } 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")); + 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")); + pathParam.add("logout"); + formParam.add(new RestParam("token","d4pEuHxDUbzRJswWImVjWlbFJZDsUI8QItMVfjoRQt8lj2J7Y7XWR4QlyMlx77ya")); } }