Package com.googlecode.gmail4j.test

Examples of com.googlecode.gmail4j.test.TestConfigurer


     * Tests retrieval of unread messages
     */
    @Test
    public void testGetUnreadMessages() {
        try {
            TestConfigurer conf = TestConfigurer.getInstance();           
            final RssGmailClient client = new RssGmailClient();
            final GmailConnection connection = new HttpGmailConnection();
            connection.setLoginCredentials(conf.getGmailCredentials());
            if (conf.useProxy()) {
                ((ProxyAware) connection).setProxy(conf.getProxyHost(),
                        conf.getProxyPort());
                ((ProxyAware) connection).setProxyCredentials(
                        conf.getProxyCredentials());
            }
            log.debug("Getting unread messages");
            client.setConnection(connection);
            final List<GmailMessage> messages = client.getUnreadMessages();
            for (GmailMessage message : messages) {
View Full Code Here


    private static final Log log = LogFactory.getLog(RssGmailClientTest.class);
    private RssGmailClient client;   
   
    @Before
    public void connect() {
        TestConfigurer conf = TestConfigurer.getInstance();           
        client = new RssGmailClient();
        final GmailConnection connection = new HttpGmailConnection();
        connection.setLoginCredentials(conf.getGmailCredentials());
        if (conf.useProxy()) {
            ((ProxyAware) connection).setProxy(conf.getProxyHost(),
                    conf.getProxyPort());
            ((ProxyAware) connection).setProxyCredentials(
                    conf.getProxyCredentials());
        }
        client.setConnection(connection);     
    }
View Full Code Here

TOP

Related Classes of com.googlecode.gmail4j.test.TestConfigurer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.