Newer
Older
RestfulChecker / src / main / Main.java
y-ota on 8 Nov 2018 839 bytes 参考文献をうp
package main;

import java.util.ArrayList;

import main.RestApi.Method;

public class Main {

	public static void main(String[] args) {
		RestApi api = new RestApi();
		ArrayList<RestParam> queryParam = new ArrayList<>();
		ArrayList<RestParam> formParam = new ArrayList<>();
		ArrayList<String> 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"));
		api.setupRestTest(Method.POST, queryParam, formParam, pathParam);
		api.doRestTest();
		for (String result : api.getResults()) {
			System.out.println(result);
		}
		System.out.println(api.getJudgeResult());
	}

	private void init() {

	}

}