Package eu.planets_project.pp.plato.model.measurement

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


        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

        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

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

}
View Full Code Here

        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.