
entry-point.sqs.sqs-configTest.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scaffold-clean-architecture Show documentation
Show all versions of scaffold-clean-architecture Show documentation
Gradle plugin to create a clean application in Java that already works, It follows our best practices!
package {{package}}.sqs.listener.config;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
{{#metrics}}
import software.amazon.awssdk.metrics.LoggingMetricPublisher;
{{/metrics}}
import software.amazon.awssdk.services.sqs.SqsAsyncClient;
import static org.junit.jupiter.api.Assertions.assertNotNull;
public class SQSConfigTest {
@Mock
private SqsAsyncClient asyncClient;
@BeforeEach
void setUp(){
MockitoAnnotations.openMocks(this);
}
@Test
void configTest() {
SQSProperties sqsProperties = new SQSProperties();
sqsProperties.setNumberOfThreads(1);
sqsProperties.setRegion("Region");
{{#metrics}}
LoggingMetricPublisher loggingMetricPublisher = LoggingMetricPublisher.create();
{{/metrics}}
SQSConfig sqsConfig = new SQSConfig();
assertNotNull(sqsConfig.sqsListener(asyncClient, sqsProperties, message -> {}));
assertNotNull(sqsConfig.configSqs(sqsProperties{{#metrics}}, loggingMetricPublisher{{/metrics}}));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy