Package eu.planets_project.tb.api

Examples of eu.planets_project.tb.api.AdminManager


  }
 
 
  public void testExperimentApproach(){
    BasicProperties props = new BasicPropertiesImpl();
    AdminManager adminManager = AdminManagerImpl.getInstance();
    try {
      props.setExperimentApproach(
          adminManager.getExperimentTypeID("simple migration"));
    } catch (InvalidInputException e) {
      assertEquals(true,false);
    }
    assertEquals(adminManager.getExperimentTypeID("simple migration"), props.getExperimentApproach());
 
    //Test2:
    String sTypeID = adminManager.getExperimentTypeID("complex workflow");
    try {
      props.setExperimentApproach(sTypeID);
    } catch (InvalidInputException e) {
      assertEquals(true,false);
    }
    assertEquals("complex workflow", props.getExperimentApproachName(sTypeID));
   
   
    //Test3:
    sTypeID = adminManager.getExperimentTypeID("novalidtypename");
    try {
      props.setExperimentApproach(sTypeID);
      assertEquals(false,true);
    } catch (InvalidInputException e) {
      assertEquals(true,true);
View Full Code Here


  /* (non-Javadoc)
   * @see eu.planets_project.tb.api.model.BasicProperties#getExperimentApproachName(java.lang.String)
   */
  public String getExperimentApproachName(String sExperimentTypeID) {
    AdminManager manager = AdminManagerImpl.getInstance();
    return manager.getExperimentTypeName(sExperimentTypeID);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see eu.planets_project.tb.api.model.BasicProperties#setExperimentApproach(int)
   */
  public void setExperimentApproach(String sExperimentTypeID) throws InvalidInputException{
    AdminManager manager = AdminManagerImpl.getInstance();
    //check ExperimentApproach valid?
        log.info("Setting Experiment Approach to: " + sExperimentTypeID);
    if(manager.getExperimentTypeIDs().contains(sExperimentTypeID)){
      this.sExperimentApproach = sExperimentTypeID;
    }
    else{
            log.error("Could not set Experiment Approach to: " + sExperimentTypeID );
      throw new InvalidInputException("Unsupported ExperimentTypeID "+sExperimentTypeID);
View Full Code Here

TOP

Related Classes of eu.planets_project.tb.api.AdminManager

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.