Newer
Older
RestfulChecker / src / testcase / twitter / TestTwitter.java
y-ota on 20 Dec 2018 658 bytes 401...Arrrrrrrrrrr
package testcase.twitter;

import testcase.TestCase;

abstract public class TestTwitter extends TestCase {
	protected OAuthHeader oauth = new OAuthHeader();

	protected TestTwitter() {
		super("https://api.twitter.com/1.1");
		oauth.setConsumer_key("xPk6o11catewYwxGcXvvvqo2I");
		oauth.setConsumer_secret("P9oXQstrFURXcbV8qT4OJzLjNfgYkpo1AvJzUnbywsEiDpuytb");
		oauth.generateSignature();
	}

	public OAuthHeader getOauth() {
		return oauth;
	}

	public void setOauth(OAuthHeader oauth) {
		this.oauth = oauth;
	}
	
	public void start() {
		check.setProperty("Authorization", oauth.getAuthorization());
		check.doRestTest();
	}
}