Newer
Older
RestfulChecker / src / main / Main.java
package main;

import java.util.ArrayList;

import restfulchecker.RestAccount;
import restfulchecker.RestChecker;
import restfulchecker.RestChecker.Method;
import restfulchecker.RestParam;

public class Main {
	static RestChecker api = new RestChecker();
	static ArrayList<RestParam> queryParam = new ArrayList<>();
	static ArrayList<RestParam> formParam = new ArrayList<>();
	static ArrayList<String> pathParam = new ArrayList<>();

	public static void main(String[] args) {
		init();
		api.setupRestTest(Method.PUT, queryParam, formParam, pathParam);
		api.doRestTest();
		System.out.println(api.getResults());
		System.out.println(api.getBeforeResults());
		System.out.println(api.getJudgeResult());
	}

	static private void init() {
		api.setAccount("http://nitta-lab-www.is.konan-u.ac.jp/CactusServer/rest/accounts");
		formParam.add(new RestParam("userID", "q"));
		formParam.add(new RestParam("userPass", "q"));
//		formParam.add(new RestParam("userName", "g"));
//		pathParam.add("logout");
//		formParam.add(new RestParam("token", "t38Xkpbw9GuzNweM4NVAxC8TLHq0YBTDm51kC0Ley3GdCvxqbRgX0reGNBpL32eb"));
	}

}