File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
src/test/kotlin/io/github/tobi/laa/spring/boot/embedded/redis Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ package io.github.tobi.laa.spring.boot.embedded.redis
2+
3+ import io.mockk.impl.annotations.MockK
4+ import io.mockk.junit5.MockKExtension
5+ import org.assertj.core.api.Assertions
6+ import org.junit.jupiter.api.DisplayName
7+ import org.junit.jupiter.api.Test
8+ import org.junit.jupiter.api.extension.ExtendWith
9+ import org.springframework.context.ApplicationContext
10+
11+ @ExtendWith(MockKExtension ::class )
12+ @DisplayName(" RedisStore tests" )
13+ internal class RedisStoreTest {
14+
15+ @MockK
16+ private lateinit var context: ApplicationContext
17+
18+ @Test
19+ @DisplayName(" Unknown application context should yield null server" )
20+ fun unknownAppContext_serverIsNull () {
21+ Assertions .assertThat(RedisStore .server(context)).isNull()
22+ }
23+
24+ @Test
25+ @DisplayName(" Unknown application context should yield null conf" )
26+ fun unknownAppContext_confIsNull () {
27+ Assertions .assertThat(RedisStore .conf(context)).isNull()
28+ }
29+
30+ @Test
31+ @DisplayName(" Unknown application context should yield null client" )
32+ fun unknownAppContext_clientIsNull () {
33+ Assertions .assertThat(RedisStore .client(context)).isNull()
34+ }
35+ }
You can’t perform that action at this time.
0 commit comments