Examples of BasicProperties


Examples of eu.planets_project.tb.api.model.BasicProperties

    manager.removeExperiment(exp1.getEntityID());
  }
 

  public void testExternalReferenceID(){
    BasicProperties props = new BasicPropertiesImpl();
    props.setExternalReferenceID("LocalSystem://refID1");
    assertEquals("LocalSystem://refID1", props.getExternalReferenceID());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    props.setExternalReferenceID("LocalSystem://refID1");
    assertEquals("LocalSystem://refID1", props.getExternalReferenceID());
  }
 
  public void testFocus(){
    BasicProperties props = new BasicPropertiesImpl();
    String sFocus = "Focus is on testing speed of jpeg->tiff migration tool";
    props.setFocus(sFocus);
    assertEquals(sFocus, props.getFocus());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    props.setFocus(sFocus);
    assertEquals(sFocus, props.getFocus());
  }
 
  public void testScope(){
    BasicProperties props = new BasicPropertiesImpl();
    String sScope = "Not tested is the outputquality";
    props.setScope(sScope);
    assertEquals(sScope, props.getScope());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    props.setScope(sScope);
    assertEquals(sScope, props.getScope());
  }
 
  public void testPurpose(){
    BasicProperties props = new BasicPropertiesImpl();
    String sPurpose ="Find the best migration tool supporting PDF/A";
    props.setScope(sPurpose);
    assertEquals(sPurpose, props.getScope());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    assertEquals(sPurpose, props.getScope());
  }
 
 
  public void testIndication(){
    BasicProperties props = new BasicPropertiesImpl();
    String sIndication = "A overall description";
    props.setIndication(sIndication);
    assertEquals(sIndication, props.getIndication());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    props.setIndication(sIndication);
    assertEquals(sIndication, props.getIndication());
  }
 
  public void testSummary(){
    BasicProperties props = new BasicPropertiesImpl();
    String sSummary = "Summary of the experiment";
    props.setSummary(sSummary);
    assertEquals(sSummary, props.getSummary());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    props.setSummary(sSummary);
    assertEquals(sSummary, props.getSummary());
  }
 
  public void testExperimentStructureReference(){
    BasicProperties props = new BasicPropertiesImpl();
    TestbedManager tbmanager = TestbedManagerImpl.getInstance();
    //Test1:
    Experiment exp1 = tbmanager.createNewExperiment();
    try {
      props.setExperimentStructureReference(exp1.getEntityID());
    } catch (ExperimentNotFoundException e2) {
      assertEquals(true,false);
    }
   
    try {
      assertEquals(exp1.getEntityID(),props.getExperimentStructureReference().getEntityID());
    } catch (ExperimentNotFoundException e1) {
      assertEquals(true,false);
    }

    //Test2:
    props.removeExperimentStructureReference();
    try {
      assertEquals(null,props.getExperimentStructureReference());
    } catch (ExperimentNotFoundException e1) {
      assertEquals(true,false);
    }
   
    //Test3:
    try {
      props.setExperimentStructureReference(exp1);
      assertEquals(exp1.getEntityID(),props.getExperimentStructureReference().getEntityID());
    } catch (InvalidInputException e) {
      assertEquals(true,false);
    } catch (ExperimentNotFoundException e) {
      assertEquals(true,false);
    }
   
    //Test4:
    try {
      props.setExperimentStructureReference(new ExperimentImpl());
      assertEquals(true,false);
    } catch (InvalidInputException e) {
      assertEquals(true,true);
    }
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    }
  }
 

  public void testExperimentFormal(){
    BasicProperties props = new BasicPropertiesImpl();
    boolean bFormal = true;
    props.setExperimentFormal(bFormal);
   
    assertEquals(bFormal,props.isExperimentFormal());
    assertEquals(bFormal,!props.isExperimentInformal());
   
    bFormal = false;
    props.setExperimentFormal(bFormal);
   
    assertEquals(bFormal,props.isExperimentFormal());
    assertEquals(bFormal,!props.isExperimentInformal());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    assertEquals(bFormal,!props.isExperimentInformal());
  }
 
 
  public void testLiteratureReference(){
    BasicProperties props = new BasicPropertiesImpl();

    //Test1:
    assertEquals(0,props.getAllLiteratureReferences().size());

    //Test2:
    String sTitle = "Digital Long Term Preservation";
    String sURI = "ISBN: 20-323-3233";
    props.addLiteratureReference(sTitle, sURI);
    List<String[]> refs = props.getAllLiteratureReferences();

    Iterator<String[]> itElement = refs.iterator();
    while(itElement.hasNext()){
      String[] element = itElement.next();
      assertEquals(1,refs.size());
      assertEquals(sTitle,element[0]);
      assertEquals(sURI,element[1]);
    }

    //Test3:
    String sTitle2 = "Digital Long Term Preservation2";
    String sURI2 = "ISBN: 20-323-3233";
    props.addLiteratureReference(sTitle2, sURI2);
    //Element should have been added:
    assertEquals(2,props.getAllLiteratureReferences().size());
   
    props.addLiteratureReference(sTitle2, sURI2);
    //Duplicate element should not have been added:
    assertEquals(2,props.getAllLiteratureReferences().size());

    //Test4:
    String sTitle3 = "Comic Book";
    String sURI3 = "ISBN: 111111";
    props.addLiteratureReference(sTitle3, sURI3);
    //Element should not have been added:
    assertEquals(3,props.getAllLiteratureReferences().size());
   
    props.removeLiteratureReference(sTitle,sURI);
    assertEquals(2,props.getAllLiteratureReferences().size());
   
    String sTitle4 = "Title Website1";
    String sURI4 = "http://localhost:8080";
    Vector<String[]> vAdd = new Vector<String[]>();
    vAdd.add(new String[]{sTitle4,sURI4});
    try {
      props.setLiteratureReferences(vAdd);
    } catch (InvalidInputException e) {
      assertEquals(true,false);
    }
    //Element should not have been added:
    assertEquals(1,props.getAllLiteratureReferences().size());

    String sTitle5 = "Title Website2";
    String sURI5 = "http://localhost:8080/jsf";
    vAdd.add(new String[]{sTitle5,sURI5});
    try {
      props.setLiteratureReferences(vAdd);
    } catch (InvalidInputException e) {
      assertEquals(true,false);
    }
    assertEquals(2,props.getAllLiteratureReferences().size());
  }
View Full Code Here

Examples of eu.planets_project.tb.api.model.BasicProperties

    }
    assertEquals(2,props.getAllLiteratureReferences().size());
  }
 
  public void testToolTypes(){
    BasicProperties props = new BasicPropertiesImpl();
   
    //Test1:
    assertEquals(0,props.getToolTypes().size());
   
    //Test2:
    //Should be: ServiceRegistry.getToolTypes();
    props.addToolType("jpeg2pdf");
   
    assertEquals(1,props.getToolTypes().size());
    assertTrue(props.getToolTypes().contains("jpeg2pdf"));
   
    //Test3:
    //Should be: ServiceRegistry.getToolTypes();
    props.addToolType("jpeg2pdf");
   
    //should not add duplicates
    assertEquals(1,props.getToolTypes().size());
   
    //Test4:
    Vector<String> vAdd = new Vector<String>();
    vAdd.add("jpeg2pdf");
    vAdd.add("jpeg2tiff");
    props.setToolTypes(vAdd);
   
    assertEquals(2,props.getToolTypes().size());
   
    //Test5:
    props.removeToolType("jpeg2pdf");
   
    assertEquals(1,props.getToolTypes().size());
    assertTrue(!props.getToolTypes().contains("jpeg2pdf"));
  }
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.