Skip to content

Commit 01aeae0

Browse files
committed
Coverage
1 parent 83502b1 commit 01aeae0

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
}

0 commit comments

Comments
 (0)