Package org.apache.abdera.ext.sharing

Examples of org.apache.abdera.ext.sharing.History


    public void testSharingFactory() throws Exception {
        Abdera abdera = new Abdera();
        Factory factory = abdera.getFactory();
        Conflicts conflicts = factory.newElement(SharingHelper.SSE_CONFLICTS);
        assertNotNull(conflicts);
        History history = factory.newElement(SharingHelper.SSE_HISTORY);
        assertNotNull(history);
        Related related = factory.newElement(SharingHelper.SSE_RELATED);
        assertNotNull(related);
        Sharing sharing = factory.newElement(SharingHelper.SSE_SHARING);
        assertNotNull(sharing);
View Full Code Here


        Date d1 = AtomDate.parse("2005-05-21T11:43:33Z");
        Date d2 = AtomDate.parse("2005-05-21T10:43:33Z");
        Date d3 = AtomDate.parse("2005-05-21T09:43:33Z");

        History history = sync.getHistory().get(0);
        assertEquals(3, history.getSequence());
        assertEquals(d1, history.getWhen());
        assertEquals("JEO2000", history.getBy());

        history = sync.getHistory().get(1);
        assertEquals(2, history.getSequence());
        assertEquals(d2, history.getWhen());
        assertEquals("REO1750", history.getBy());

        history = sync.getHistory().get(2);
        assertEquals(1, history.getSequence());
        assertEquals(d3, history.getWhen());
        assertEquals("REO1750", history.getBy());
    }
View Full Code Here

        Sync sync = SharingHelper.getSync(entry, false);
        assertNotNull(sync);
        assertNotNull(sync.getId());
        assertEquals(1, sync.getUpdates());
        assertEquals(1, sync.getHistory().size());
        History history = sync.getTopmostHistory();
        assertEquals(1, history.getSequence());
        assertEquals("jms", history.getBy());
    }
View Full Code Here

        Sync sync = SharingHelper.getSync(entry, false);
        assertNotNull(sync);
        assertNotNull(sync.getId());
        assertEquals(2, sync.getUpdates());
        assertEquals(2, sync.getHistory().size());
        History history = sync.getTopmostHistory();
        assertEquals(2, history.getSequence());
        assertEquals("jms", history.getBy());
    }
View Full Code Here

        assertNotNull(sync);
        assertTrue(sync.isDeleted());
        assertNotNull(sync.getId());
        assertEquals(2, sync.getUpdates());
        assertEquals(2, sync.getHistory().size());
        History history = sync.getTopmostHistory();
        assertEquals(2, history.getSequence());
        assertEquals("jms", history.getBy());
    }
View Full Code Here

  public void testSharingFactory() throws Exception {
    Abdera abdera = new Abdera();
    Factory factory = abdera.getFactory();
    Conflicts conflicts = factory.newElement(SharingHelper.SSE_CONFLICTS);
    assertNotNull(conflicts);
    History history = factory.newElement(SharingHelper.SSE_HISTORY);
    assertNotNull(history);
    Related related = factory.newElement(SharingHelper.SSE_RELATED);
    assertNotNull(related);
    Sharing sharing = factory.newElement(SharingHelper.SSE_SHARING);
    assertNotNull(sharing);
View Full Code Here

   
    Date d1 = AtomDate.parse("2005-05-21T11:43:33Z");
    Date d2 = AtomDate.parse("2005-05-21T10:43:33Z");
    Date d3 = AtomDate.parse("2005-05-21T09:43:33Z");
   
    History history = sync.getHistory().get(0);
    assertEquals(history.getSequence(),3);
    assertEquals(history.getWhen(),d1);
    assertEquals(history.getBy(),"JEO2000");
   
    history = sync.getHistory().get(1);
    assertEquals(history.getSequence(),2);
    assertEquals(history.getWhen(),d2);
    assertEquals(history.getBy(),"REO1750");
   
    history = sync.getHistory().get(2);
    assertEquals(history.getSequence(),1);
    assertEquals(history.getWhen(),d3);
    assertEquals(history.getBy(),"REO1750");
  }
View Full Code Here

    Sync sync = SharingHelper.getSync(entry, false);
    assertNotNull(sync);
    assertNotNull(sync.getId());
    assertEquals(sync.getUpdates(),1);
    assertEquals(sync.getHistory().size(),1);
    History history = sync.getTopmostHistory();
    assertEquals(history.getSequence(),1);
    assertEquals(history.getBy(),"jms");
  }
View Full Code Here

    Sync sync = SharingHelper.getSync(entry, false);
    assertNotNull(sync);
    assertNotNull(sync.getId());
    assertEquals(sync.getUpdates(),2);
    assertEquals(sync.getHistory().size(),2);
    History history = sync.getTopmostHistory();
    assertEquals(history.getSequence(),2);
    assertEquals(history.getBy(),"jms");
  }
View Full Code Here

    assertNotNull(sync);
    assertTrue(sync.isDeleted());
    assertNotNull(sync.getId());
    assertEquals(sync.getUpdates(),2);
    assertEquals(sync.getHistory().size(),2);
    History history = sync.getTopmostHistory();
    assertEquals(history.getSequence(),2);
    assertEquals(history.getBy(),"jms");
  }
View Full Code Here

TOP

Related Classes of org.apache.abdera.ext.sharing.History

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.