Package com.google.gdata.data

Examples of com.google.gdata.data.Entry


        //This test case might fail
        //because Google blogger service has limitation on new posts allowed everyday/every hour?
       
        //System.out.println("testClientDelete");
        //We create a new post, and then delete it
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct("calendarEntryShouldNotApear"));
        newEntry.setContent(new PlainTextConstruct("calendarByBloggerShouldNotAppear"));
        Entry postedEntry = testService.clientPost(newEntry);
        Thread.sleep(Constants.SLEEP_INTERVAL);
       
        //System.out.println("ID: " + postedEntry.getId());
       
        int idStartPosition = postedEntry.getId().lastIndexOf("/");
        String postedEntryID = postedEntry.getId().substring(idStartPosition+1);       
        //System.out.println("postedEntryID: " + postedEntryID );
       
        //Before deletion
        Entry entry00 = testService.clientGetEntry(postedEntryID);
        //System.out.println("Before Deleteion: " + entry00.getId());
       
        //Delete this entry
        testService.clientDelete(postedEntryID);
View Full Code Here


   
   
    @Test
    public void testClientGetEntry() throws Exception {
        String entryID = "8308734583601887890";
        Entry blogEntry = testService.clientGetEntry(entryID);
        //System.out.println("Entry ID: " + blogEntry.getId());
        Assert.assertTrue(blogEntry.getId().endsWith(entryID));
        //System.out.println("------------------------------------------------------------\n\n");
    }
View Full Code Here

    public void testClientPut() throws Exception
        String entryID = "2889832689497686762";         
        String newBlogEntryTitle = "updatedTitleByTestCase2";
        testService.clientPut(entryID, newBlogEntryTitle);      //update the title
        Thread.sleep(Constants.SLEEP_INTERVAL);           
        Entry updatedEntry = testService.clientGetEntry(entryID);        
        Assert.assertEquals(newBlogEntryTitle, updatedEntry.getTitle().getPlainText());
    }
View Full Code Here

   

    @Test
    public void testClientPost() throws Exception {
        String blogEntryTitle = "titleByBloogerTestcase000";
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct(blogEntryTitle));
        newEntry.setContent(new PlainTextConstruct("contentByBloggerTestCase000"));
        Entry postedEntry = testService.clientPost(newEntry);       
        Assert.assertEquals(blogEntryTitle, postedEntry.getTitle().getPlainText());
    }
View Full Code Here

        //This test case might fail
        //because Google blogger service has limitation on new posts allowed everyday/every hour?
       
        //System.out.println("testClientDelete");
        //We create a new post, and then delete it
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct("blogEntryShouldNotApear"));
        newEntry.setContent(new PlainTextConstruct("contentByBloggerShouldNotAppear"));
        Entry postedEntry = testService.clientPost(newEntry);
        Thread.sleep(Constants.SLEEP_INTERVAL);       
        int idStartPosition = postedEntry.getId().lastIndexOf("-");
        String postedEntryID = postedEntry.getId().substring(idStartPosition+1);       
        //System.out.println("postedEntryID: " + postedEntryID );
       
        //Before deletion
        Entry entry00 = testService.clientGetEntry(postedEntryID);
        //System.out.println("Before Deleteion: " + entry00.getId());
       
        //Delete this entry
        testService.clientDelete(postedEntryID);
View Full Code Here

   
   
    @Test
    public void testClientGetEntry() throws Exception {
        String entryID = "12feeeb38ab87365";
        Entry contactEntry = testService.clientGetEntry(entryID);
        //System.out.println("Entry ID: " + contactEntry.getId());
        Assert.assertTrue(contactEntry.getId().endsWith(entryID));
    }
View Full Code Here

    public void testClientPut() throws Exception
        String entryID = "12feeeb38ab87365";         
        String newBlogEntryTitle = "updatedTitleByGoogleContactsConsumerTestCase";
        testService.clientPut(entryID, newBlogEntryTitle);      //update the title
        Thread.sleep(Constants.SLEEP_INTERVAL);           
        Entry updatedEntry = testService.clientGetEntry(entryID);        
        Assert.assertEquals(newBlogEntryTitle, updatedEntry.getTitle().getPlainText());
    }
View Full Code Here

   

    @Test
    public void testClientPost() throws Exception {
        String blogEntryTitle = "titleByGoogleContactsTestcase";
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct(blogEntryTitle));
        newEntry.setContent(new PlainTextConstruct("contentByGoogleContactsTestCase"));
        Entry postedEntry = testService.clientPost(newEntry);       
        Assert.assertEquals(blogEntryTitle, postedEntry.getTitle().getPlainText());
    }
View Full Code Here

        //This test case might fail
        //because Google blogger service has limitation on new posts allowed everyday/every hour?
       
        //System.out.println("testClientDelete");
        //We create a new post, and then delete it
        Entry newEntry = new Entry();
        newEntry.setTitle(new PlainTextConstruct("contactEntryShouldNotApear"));
        newEntry.setContent(new PlainTextConstruct("contactByBloggerShouldNotAppear"));
        Entry postedEntry = testService.clientPost(newEntry);
        Thread.sleep(Constants.SLEEP_INTERVAL);
       
        //System.out.println("ID: " + postedEntry.getId());
       
        int idStartPosition = postedEntry.getId().lastIndexOf("/");
        String postedEntryID = postedEntry.getId().substring(idStartPosition+1);       
        //System.out.println("postedEntryID: " + postedEntryID );
       
        //Before deletion
        for (int i = 0; i < 5; i++) { // make 5 attempts because of timing issues
            try {
                Entry entry00 = testService.clientGetEntry(postedEntryID);
                //System.out.println("Before Deletion: " + entry00.getId());
                break// get was successful
            } catch (Exception e) {
                if (i < 4) {
                    System.out.println("Get failed, retrying...");
View Full Code Here

   
    @Test
    public void testClientGetEntry() throws Exception {
        String entryID = "photoid/5233468700029715874";
        Entry contactEntry = testService.clientGetEntry(entryID);
        //System.out.println("Entry ID: " + contactEntry.getId());
        Assert.assertTrue(contactEntry.getId().endsWith(entryID));
        //System.out.println("------------------------------------------------------------\n\n");
    }
View Full Code Here

TOP

Related Classes of com.google.gdata.data.Entry

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.