Newer
Older
RestfulChecker / src / main / Main.java
y-ota on 3 Dec 2018 1 KB 修正
package main;

import java.util.ArrayList;

import restfulchecker.*;
import restfulchecker.RestChecker.Method;
import testcase.*;

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<>();
	static TestGETCactus get = new TestGETCactus();
	static TestPOSTCactus post = new TestPOSTCactus("f","f","f");
	static TestPUTCactus put = new TestPUTCactus("f","f");
	static TestDELETECactus delete = new TestDELETECactus("qF9bgKYZmw8P");

	public static void main(String[] args) {
		post.start();
//		init();
//		api.doRestTest();
//		System.out.println(api.getResults());
//		System.out.println(api.getBeforeResults());
//		System.out.println(api.getJudgeResult());
	}

	static private void init() {
		api.setAccount("https://www.googleapis.com/youtube/v3");
		queryParam.add(new RestParam("key", "AIzaSyD5EI71SqPZhgdpwzlV0XTisGuKKtH5p6I"));
		queryParam.add(new RestParam("id", "7lCDEYXw3mM"));
		queryParam.add(new RestParam("part", "status"));
		queryParam.add(new RestParam("access_token",
				"4/qAArj0H6c6w-brTnYiy1aGXn_PW97ks_KJdS03-tYEdXyT_W1OAyWh3OdMTuOctD1zEdjLpAHR2Ez-vgar6WqYQ"));
		pathParam.add("playlists");
		formParam.add(new RestParam("snippet.title", "test"));
		api.setupRestTest(Method.POST, queryParam, formParam, pathParam);
	}

}