Package org.apache.abdera.ext.features

Examples of org.apache.abdera.ext.features.Features


public class FeatureTest {

    @Test
    public void testFeaturesDocument() throws Exception {
        Abdera abdera = Abdera.getInstance();
        Features features = FeaturesHelper.newFeatures(abdera);
        assertNotNull(features);
        assertNotNull(features.getDocument());
        Document<Features> doc = features.getDocument();
        assertTrue(doc.getRoot() instanceof Features);
    }
View Full Code Here


    @Test
    public void testFeatures() throws Exception {
        Abdera abdera = Abdera.getInstance();
        Collection coll = abdera.getFactory().newCollection();
        Features features = FeaturesHelper.addFeaturesElement(coll);
        features.addFeature("http://example.com/features/foo", null, "foo & here");
        features.addFeature("http://example.com/features/bar", null, null);

        assertEquals(Status.SPECIFIED, FeaturesHelper.getFeatureStatus(coll, "http://example.com/features/foo"));
        assertEquals(Status.SPECIFIED, FeaturesHelper.getFeatureStatus(coll, "http://example.com/features/bar"));
        assertEquals(Status.UNSPECIFIED, FeaturesHelper.getFeatureStatus(coll, "http://example.com/features/baz"));
        assertEquals(Status.UNSPECIFIED, FeaturesHelper.getFeatureStatus(coll, "http://example.com/features/pez"));
View Full Code Here

        Abdera abdera = Abdera.getInstance();
        Service service = abdera.newService();
        Workspace workspace = service.addWorkspace("a");
        Collection collection1 = workspace.addCollection("a1", "a1");
        collection1.setAcceptsEntry();
        Features features = FeaturesHelper.addFeaturesElement(collection1);
        features.addFeature(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
        Collection collection2 = workspace.addCollection("a2", "a2");
        collection2.setAccept("image/*");

        Selector s1 = new FeatureSelector(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);

View Full Code Here

public class FeatureTest extends Assert {

  @Test
  public void testFeaturesDocument() throws Exception {
    Abdera abdera = Abdera.getInstance();
    Features features = FeaturesHelper.newFeatures(abdera);
    assertNotNull(features);
    assertNotNull(features.getDocument());
    Document<Features> doc = features.getDocument();
    assertTrue(doc.getRoot() instanceof Features);
  }
View Full Code Here

 
  @Test
  public void testFeatures() throws Exception {
    Abdera abdera = Abdera.getInstance();
    Collection coll = abdera.getFactory().newCollection();
    Features features = FeaturesHelper.addFeaturesElement(coll);
    features.addFeature(
      "http://example.com/features/foo",
      null, "foo & here");
    features.addFeature(
      "http://example.com/features/bar",
      null, null);
   
    assertEquals(Status.SPECIFIED,FeaturesHelper.getFeatureStatus(
      coll, "http://example.com/features/foo"));
View Full Code Here

    Abdera abdera = Abdera.getInstance();
    Service service = abdera.newService();
    Workspace workspace = service.addWorkspace("a");
    Collection collection1 = workspace.addCollection("a1","a1");
    collection1.setAcceptsEntry();
    Features features = FeaturesHelper.addFeaturesElement(collection1);
    features.addFeature(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
    Collection collection2 = workspace.addCollection("a2","a2");
    collection2.setAccept("image/*");
   
    Selector s1 = new FeatureSelector(FeaturesHelper.FEATURE_SUPPORTS_DRAFTS);
   
View Full Code Here

TOP

Related Classes of org.apache.abdera.ext.features.Features

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.