Examples of fromUri()


Examples of com.elasticinbox.core.blob.BlobURI.fromURI()

  public void testFromURI1()
  {
    URI testUri = URI.create("blob://aws3-bucket/f1ca99e0-99a0-11e2-95f0-040cced3bd7a:myemail%40elasticinbox.com?c=dfl&e=ekey2");

    BlobURI bu = new BlobURI();
    bu.fromURI(testUri);
   
    assertEquals("aws3-bucket", bu.getProfile());
    assertEquals("f1ca99e0-99a0-11e2-95f0-040cced3bd7a:myemail@elasticinbox.com", bu.getName());
    assertEquals("dfl", bu.getCompression());
    assertEquals("ekey2", bu.getEncryptionKey());
View Full Code Here

Examples of com.elasticinbox.core.blob.BlobURI.fromURI()

  public void testFromURI2()
  {
    URI testUri = URI.create("blob://db/f1ca99e0-99a0-11e2-95f0-040cced3bd7a?c=gz&b=1");

    BlobURI bu = new BlobURI();
    bu.fromURI(testUri);
   
    assertEquals("db", bu.getProfile());
    assertEquals("f1ca99e0-99a0-11e2-95f0-040cced3bd7a", bu.getName());
    assertEquals("gz", bu.getCompression());
    assertEquals(new Integer(1), bu.getBlockCount());
View Full Code Here

Examples of eu.planets_project.pp.plato.model.measurement.MeasurementInfo.fromUri()

        }
    }
    @Test()
    public void testFromUri() {
        MeasurementInfo info = new MeasurementInfo();
        info.fromUri("outcome://object/image/dimension/width#equal");
        Assert.assertNotNull(info.getProperty(), "should be initialised");
        Assert.assertEquals(info.getProperty().getPropertyId(),"image/dimension/width");
        Assert.assertNotNull(info.getMetric(), "should be initialised");
        Assert.assertEquals(info.getMetric().getMetricId(),"equal");
View Full Code Here

Examples of eu.planets_project.pp.plato.model.measurement.MeasurementInfo.fromUri()

        Assert.assertNotNull(info.getProperty(), "should be initialised");
        Assert.assertEquals(info.getProperty().getPropertyId(),"image/dimension/width");
        Assert.assertNotNull(info.getMetric(), "should be initialised");
        Assert.assertEquals(info.getMetric().getMetricId(),"equal");

        info.fromUri("");
        Assert.assertNull(info.getUri(), "should be reset");
        Assert.assertNull(info.getProperty(), "should be reset");
        Assert.assertNull(info.getMetric(), "should be reset");
       
        info.fromUri(null);
View Full Code Here

Examples of eu.planets_project.pp.plato.model.measurement.MeasurementInfo.fromUri()

        info.fromUri("");
        Assert.assertNull(info.getUri(), "should be reset");
        Assert.assertNull(info.getProperty(), "should be reset");
        Assert.assertNull(info.getMetric(), "should be reset");
       
        info.fromUri(null);
        Assert.assertNull(info.getUri(), "should be reset");
        Assert.assertNull(info.getProperty(), "should be reset");
        Assert.assertNull(info.getMetric(), "should be reset");
    }
   
View Full Code Here

Examples of eu.planets_project.pp.plato.model.measurement.MeasurementInfo.fromUri()

    }
   
    @Test(expectedExceptions=IllegalArgumentException.class)
    public void testFromUriInvalidCategory() {
        MeasurementInfo info = new MeasurementInfo();
        info.fromUri("object://xcl/object/image/dimension/width#equal");
    }

}
View Full Code Here

Examples of eu.planets_project.pp.plato.model.measurement.MeasurementInfo.fromUri()

        lib.addMainRequirements();
        lib.getRoot().setDescription("This is a description");
        Leaf c = new Leaf();
        c.setName("ImageWidth");
        MeasurementInfo mInfo = new MeasurementInfo();
        mInfo.fromUri("xcl://imageWidth#equal");
        c.setMeasurementInfo(mInfo);
        ((LibraryRequirement)lib.getRoot().getChildren().get(0).getChildren().get(0)).addChild(c);
       
        LibraryExport export = new LibraryExport();
        File exported = new File ("test-data/lib_export.xml");
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.