use of io.quarkus.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method producesJobRunrProducerUsesJSONBIfCapabilityPresent.
@Test
void producesJobRunrProducerUsesJSONBIfCapabilityPresent() {
Mockito.reset(capabilities);
lenient().when(capabilities.isPresent(Capability.JSONB)).thenReturn(true);
final AdditionalBeanBuildItem additionalBeanBuildItem = jobRunrExtensionProcessor.produce(capabilities);
assertThat(additionalBeanBuildItem.getBeanClasses()).contains(JobRunrProducer.JobRunrJsonBJsonMapperProducer.class.getName());
}
use of io.quarkus.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method producesJobRunrProducerUsesMongoDBStorageProviderIfMongoDBClientCapabilityIsPresent.
@Test
void producesJobRunrProducerUsesMongoDBStorageProviderIfMongoDBClientCapabilityIsPresent() {
lenient().when(capabilities.isPresent(Capability.MONGODB_CLIENT)).thenReturn(true);
final AdditionalBeanBuildItem additionalBeanBuildItem = jobRunrExtensionProcessor.produce(capabilities);
assertThat(additionalBeanBuildItem.getBeanClasses()).contains(JobRunrMongoDBStorageProviderProducer.class.getName());
}
use of io.quarkus.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method addMetricsDoesAddStorageProviderMetricsIfEnabledAndMicroMeterSupport.
@Test
void addMetricsDoesAddStorageProviderMetricsIfEnabledAndMicroMeterSupport() {
final AdditionalBeanBuildItem metricsBeanBuildItem = jobRunrExtensionProcessor.addMetrics(Optional.of(new MetricsCapabilityBuildItem(toSupport -> toSupport.equals(MetricsFactory.MICROMETER))), jobRunrConfiguration);
assertThat(metricsBeanBuildItem.getBeanClasses()).contains(JobRunrMetricsStarter.class.getName()).contains(JobRunrMetricsProducer.StorageProviderMetricsProducer.class.getName()).doesNotContain(JobRunrMetricsProducer.BackgroundJobServerMetricsProducer.class.getName());
}
use of io.quarkus.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method producesJobRunrProducerUsesSqlStorageProviderIfAgroalCapabilityIsPresent.
@Test
void producesJobRunrProducerUsesSqlStorageProviderIfAgroalCapabilityIsPresent() {
lenient().when(capabilities.isPresent(Capability.AGROAL)).thenReturn(true);
final AdditionalBeanBuildItem additionalBeanBuildItem = jobRunrExtensionProcessor.produce(capabilities);
assertThat(additionalBeanBuildItem.getBeanClasses()).contains(JobRunrSqlStorageProviderProducer.class.getName());
}
use of io.quarkus.arc.deployment.AdditionalBeanBuildItem in project jobrunr by jobrunr.
the class JobRunrExtensionProcessorTest method producesJobRunrProducerUsesJacksonIfCapabilityPresent.
@Test
void producesJobRunrProducerUsesJacksonIfCapabilityPresent() {
Mockito.reset(capabilities);
lenient().when(capabilities.isPresent(Capability.JACKSON)).thenReturn(true);
final AdditionalBeanBuildItem additionalBeanBuildItem = jobRunrExtensionProcessor.produce(capabilities);
assertThat(additionalBeanBuildItem.getBeanClasses()).contains(JobRunrProducer.JobRunrJacksonJsonMapperProducer.class.getName());
}
Aggregations