
driven-adapter.redis-reactive.secret.redis-config.unit.test.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}}.redis.config;
import co.com.bancolombia.secretsmanager.api.GenericManagerAsync;
import co.com.bancolombia.secretsmanager.api.exceptions.SecretException;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.mockito.Mock;
import org.mockito.MockitoAnnotations;
import org.springframework.data.redis.connection.ReactiveRedisConnectionFactory;
import org.springframework.data.redis.connection.RedisStandaloneConfiguration;
import static org.junit.jupiter.api.Assertions.assertNotNull;
class RedisConfigTest {
@Mock
private GenericManagerAsync manager;
@Mock
private RedisStandaloneConfiguration redisStandaloneConfiguration;
private RedisConfig redisConfigUnderTest;
@BeforeEach
void setUp() {
MockitoAnnotations.openMocks(this);
redisConfigUnderTest = new RedisConfig();
}
@Test
void testRedisConfig() throws SecretException {
RedisStandaloneConfiguration redisConf = redisConfigUnderTest.redisConfig("secret-test", manager);
assertNotNull(redisConf);
}
@Test
void testRedisConnectionFactory() throws SecretException {
ReactiveRedisConnectionFactory connectionFactory =
redisConfigUnderTest.redisConnectionFactory(redisStandaloneConfiguration);
assertNotNull(connectionFactory);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy