package twitter4j; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import java.io.InputStream; import org.junit.Test; import twitter4j.auth.Authorization; import twitter4j.auth.BasicAuthorization; import twitter4j.conf.Configuration; import twitter4j.conf.PropertyConfiguration; public class TestTwitterImpl { @Test public void testConstructor() { InputStream io = null; Configuration conf = new PropertyConfiguration(io); String userId = "user"; String password = "pass"; Authorization auth = new BasicAuthorization(userId, password); TwitterImpl ti = new TwitterImpl(conf, auth) { }; assertNotNull(ti); assertEquals(auth, ti.auth); assertEquals(conf, ti.conf); assertEquals(auth, ti.getAuthorization()); assertEquals(conf, ti.getConfiguration()); } }