/
ExampleTestCase2.kt
34 lines (29 loc) · 1001 Bytes
/
ExampleTestCase2.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.asarkar.grpc.test.ignore
import com.asarkar.grpc.test.GrpcCleanupExtension
import com.asarkar.grpc.test.Resources
import com.asarkar.grpc.test.TestUtils
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.extension.ExtendWith
import org.mockito.Mockito
@ExtendWith(GrpcCleanupExtension::class)
class ExampleTestCase2 {
private lateinit var resources: Resources
private val setOfResources: MutableSet<Resources> = mutableSetOf()
private val set = Mockito.spy(setOfResources)
@Test
fun test1() {
resources.register(TestUtils.randomChannel())
assertThat(setOfResources.add(resources)).isTrue
}
@Test
fun test2() {
resources.register(TestUtils.randomChannel())
assertThat(setOfResources.add(resources)).isTrue
}
@Test
fun test3() {
resources.register(TestUtils.randomChannel())
assertThat(setOfResources.add(resources)).isTrue
}
}