Newer
Older
RestfulChecker / src / main / Main.java
y-ota on 20 Nov 2018 1 KB memo作成
package main;

import java.util.ArrayList;

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.POST, 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", "g"));
//		formParam.add(new RestParam("userPass", "g"));
//		formParam.add(new RestParam("userName", "g"));
//		pathParam.add("beWRKy7Oz5SI");
//		formParam.add(new RestParam("token", "c4qSX1aJRitZ3x2z1OHmZ0k2I9YXaQMIluDgDgdlkeeqt3bIskbEYBLeUC5xAtZw"));
	}

}