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

import java.util.ArrayList;

import restfulchecker.RestApi;
import restfulchecker.RestParam;
import restfulchecker.RestApi.Method;

public class Main {
	static RestApi api = new RestApi();
	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.GET, queryParam, formParam, pathParam);
		api.doRestTest();
		for (String result : api.getResults()) {
			System.out.println(result);
		}
		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", "yyy"));
		formParam.add(new RestParam("userName", "abc"));
		formParam.add(new RestParam("userPass", "abc"));
	}

}