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(); //query.add(new RestParam("oauth_callback","http://localhost")); } public OAuthHeader getOauth() { return oauth; } public void setOauth(OAuthHeader oauth) { this.oauth = oauth; } public void start() { check.setProperty("Authorization", "OAuth oauth_consumer_key=\"xPk6o11catewYwxGcXvvvqo2I\",oauth_signature_method=\"HMAC-SHA1\",oauth_timestamp=\"1545367805\",oauth_nonce=\"rUUpDS\",oauth_version=\"1.0\",oauth_signature=\"9sb6QH5pVBarQsk%2FN%2Fn3HrPgiXE%3D\""); check.doRestTest(); } }