Search in sources :

Example 1 with ContainerConfigurationBuilder

use of io.fabric8.runtime.container.ContainerConfigurationBuilder in project fabric8 by jboss-fuse.

the class ManagedContainerTest method testContainerLifecycle.

@Test
public void testContainerLifecycle() throws Exception {
    ContainerConfigurationBuilder builder = ContainerConfigurationBuilder.create();
    ContainerConfiguration configuration = builder.setTargetDirectory("target/managed-container").getConfiguration();
    ManagedContainer<?> container = ManagedContainer.Factory.create(configuration);
    Assert.assertNotNull("ManagedContainer not null", container);
    try {
        Assert.assertNotNull("Container home not null", container.getContainerHome());
        container.start();
    } finally {
        container.destroy();
    }
}
Also used : ContainerConfigurationBuilder(io.fabric8.runtime.container.ContainerConfigurationBuilder) ContainerConfiguration(io.fabric8.runtime.container.ContainerConfiguration) Test(org.junit.Test)

Aggregations

ContainerConfiguration (io.fabric8.runtime.container.ContainerConfiguration)1 ContainerConfigurationBuilder (io.fabric8.runtime.container.ContainerConfigurationBuilder)1 Test (org.junit.Test)1