Examples of Oven


Examples of org.apache.jdo.tck.pc.building.Oven

    public void testPersistBase() {
      Object id = null;
      try {
          getPM().currentTransaction().begin();
          Kitchen kitchen1 = new Kitchen(1);
          Oven oven = new Oven("Westinghouse", "Economy");
          kitchen1.setOven(oven);
          getPM().makePersistent(kitchen1);
          getPM().currentTransaction().commit();
          id = getPM().getObjectId(kitchen1);
      }
        catch (Exception e) {
            fail("Exception on persist : " + e.getMessage());
        }
      finally {
            if (getPM().currentTransaction().isActive()) {
                getPM().currentTransaction().rollback();
            }
        }

        getPM().currentTransaction().begin();
        Kitchen kitchen = (Kitchen)getPM().getObjectById(id);
        assertEquals("Id of object is incorrect", 1, kitchen.getId());
        Oven oven = kitchen.getOven();
        assertNotNull("Oven of Kitchen is null!", oven);
        assertEquals("Oven is of incorrect type", Oven.class.getName(), oven.getClass().getName());
        assertEquals("Oven make is incorrect", "Westinghouse", oven.getMake());
        assertEquals("Oven model is incorrect", "Economy", oven.getModel());
        getPM().currentTransaction().commit();
    }
View Full Code Here

Examples of org.apache.jdo.tck.pc.building.Oven

        }

        getPM().currentTransaction().begin();
        Kitchen kitchen = (Kitchen)getPM().getObjectById(id);
        assertEquals("Id of object is incorrect", 1, kitchen.getId());
        Oven oven = kitchen.getOven();
        assertNotNull("Oven of Kitchen is null!", oven);
        assertEquals("Oven is of incorrect type", MultifunctionOven.class.getName(),
                oven.getClass().getName());
        MultifunctionOven multioven = (MultifunctionOven)oven;
        assertEquals("Oven make is incorrect", "Westinghouse", multioven.getMake());
        assertEquals("Oven model is incorrect", "Economy", multioven.getModel());
        assertEquals("Oven microwave setting is incorrect", true, multioven.getMicrowave());
        assertEquals("Oven capabilities is incorrect", "TIMER,CLOCK", multioven.getCapabilities());
View Full Code Here

Examples of org.jbake.app.Oven

  }

  protected void reRender() throws MojoExecutionException {
    try {
      // TODO: At some point, reuse Oven
      Oven oven = new Oven(inputDirectory, outputDirectory, isClearCache);

      oven.setupPaths();

      oven.bake();
    } catch (Exception e) {
      getLog().info("Oops", e);

      throw new MojoExecutionException("Failure when running: ", e);
    }
View Full Code Here

Examples of org.jbake.app.Oven

    new Main().run(args);
  }
 
  private void bake(LaunchOptions options) {
    try {
      Oven oven = new Oven(options.getSource(), options.getDestination(), options.isClearCache());
      oven.setupPaths();
      oven.bake();
      final List<String> errors = oven.getErrors();
      if (!errors.isEmpty()) {
        // TODO: decide, if we want the all error here
        System.err.println(MessageFormat.format("JBake failed with {0} errors:", errors.size()));
        int errNr = 1;
        for (String msg : errors) {
View Full Code Here

Examples of org.jbake.app.Oven

  @Parameter(property = "jbake.inputDirectory", defaultValue = "${project.basedir}/src/main/jbake", required = true)
  protected File inputDirectory;
 
  public void execute() throws MojoExecutionException {
    try {
      Oven oven = new Oven(inputDirectory, outputDirectory);
     
      oven.setupPaths();
      oven.bake();
    } catch (Exception e) {
      getLog().info("Oops", e);
     
      throw new MojoExecutionException("Failure when running: ", e);
    }
View Full Code Here

Examples of org.jbake.app.Oven

  @Parameter(property = "jbake.inputDirectory", defaultValue = "${project.basedir}/src/main/jbake", required = true)
  protected File inputDirectory;
 
  public void execute() throws MojoExecutionException {
    try {
      Oven oven = new Oven(inputDirectory, outputDirectory);
     
      oven.setupPaths();
      oven.bake();
    } catch (Exception e) {
      getLog().info("Oops", e);
     
      throw new MojoExecutionException("Failure when running: ", e);
    }
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.