Package com.googlecode.gmail4j.rss

Examples of com.googlecode.gmail4j.rss.RssGmailClient


     */
    @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) {
                log.debug(message);
            }
            assertNotNull("Messages are not null", messages);
        } catch (final Exception e) {
View Full Code Here


    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());
View Full Code Here

TOP

Related Classes of com.googlecode.gmail4j.rss.RssGmailClient

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.