Package com.alexecollins.vbox.core

Examples of com.alexecollins.vbox.core.TestContext


public class DeleteDefinitionIT {
  @Test
  public void testCall() throws Exception {
    final File tmp = Files.createTempDir();
    final File target = new File(tmp, "test");
    final VBox box = new CreateDefinition(new TestContext(), "CentOS_6_5", target).call();

    System.out.println("src="+box.getSrc());

    assertTrue(target.exists());
    new DeleteDefinition(new Work(new TestContext()), box).call();
    assertFalse(target.exists());
  }
View Full Code Here


  }

  @Test
  public void testApply() throws Exception {
    final File tmp = Files.createTempDir();
    final Context context = new TestContext();
    new CreateDefinition(context, "CentOS_6_5", tmp).call();
    new PredefinedPatch("CentOS_6_5--tomcat6", ImmutableMap.of("hostname", "localhost")).apply(new VBox(context, tmp.toURI()));
    assertTrue(FileUtils.readFileToString(new File(tmp, "floppy0/post-install.sh")).contains("tomcat6"));
  }
View Full Code Here

public class ImageUtilsTestTest {
    @Test
    public void testCreateImage() throws Exception {
        final File dest = new File("src.iso");
        ImageUtils.createImage(new Work(new TestContext()), new File("src"), dest);
        assertTrue(dest.exists());
      FileUtils.forceDelete(dest);
    }
View Full Code Here

TOP

Related Classes of com.alexecollins.vbox.core.TestContext

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.