Newer
Older
RestfulChecker / src / main / Main.java
y-ota on 6 Nov 2018 776 bytes Merge branch 'master' into rest
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", "dee"));
		formParam.add(new RestParam("userName", "abc"));
		formParam.add(new RestParam("userPass", "abc"));
		api.setupRestTest(Method.GET, queryParam, formParam, pathParam);
		api.doRestTest();
		for (int i = 0; i < RestApi.ACCOUNT_NUM; i++) {
			System.out.println(api.getResult(i));
		}
	}

}