* @return
*/
public static Test suite() {
// Create and start the TestContainer, which takes care of starting the container, deploying the
// classes, starting the contexts etc.
TestContainer container = new TestContainer(
// The classes to deploy as beans
Convertible.class,
Seat.class,
V8Engine.class,
Cupholder.class,
FuelTank.class,
Tire.class,
// Producer Methods allowing to expose DriversSeat, SpareTire, @Named("spare") SpareTire, @Drivers Seat
Producers.class
);
container.startContainer();
// Our entry point is the single bean deployment archive
BeanManager beanManager = container.getBeanManager(container.getDeployment().getBeanDeploymentArchives().iterator().next());
// Obtain a reference to the Car and pass it to the TCK to generate the testsuite
Bean<?> bean = beanManager.resolve(beanManager.getBeans(Car.class));
Car instance = (Car) beanManager.getReference(bean, Car.class, beanManager.createCreationalContext(bean));