Search in sources :

Example 1 with TestClassBeanBuildItem

use of io.quarkus.deployment.builditem.TestClassBeanBuildItem in project quarkus by quarkusio.

the class TestsAsBeansProcessor method testClassBeans.

@BuildStep
public void testClassBeans(List<TestClassBeanBuildItem> items, BuildProducer<AdditionalBeanBuildItem> producer) {
    if (items.isEmpty()) {
        return;
    }
    AdditionalBeanBuildItem.Builder builder = AdditionalBeanBuildItem.builder();
    for (TestClassBeanBuildItem item : items) {
        builder.addBeanClass(item.getTestClassName());
    }
    producer.produce(builder.build());
}
Also used : TestClassBeanBuildItem(io.quarkus.deployment.builditem.TestClassBeanBuildItem) BuildStep(io.quarkus.deployment.annotations.BuildStep)

Aggregations

BuildStep (io.quarkus.deployment.annotations.BuildStep)1 TestClassBeanBuildItem (io.quarkus.deployment.builditem.TestClassBeanBuildItem)1