BFTNotaryServiceTests - instantiate MockServices before each test, not at the class level. (#2281)

* change to align with enterprise repo
This commit is contained in:
szymonsztuka 2017-12-21 09:50:21 +00:00 committed by GitHub
parent cb703476a0
commit ad23bb8754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -35,16 +35,22 @@ import net.corda.testing.node.MockNetwork.MockNode
import net.corda.testing.node.MockNodeParameters import net.corda.testing.node.MockNodeParameters
import net.corda.testing.node.startFlow import net.corda.testing.node.startFlow
import org.junit.After import org.junit.After
import org.junit.Before
import org.junit.Test import org.junit.Test
import java.nio.file.Paths import java.nio.file.Paths
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertTrue import kotlin.test.assertTrue
class BFTNotaryServiceTests { class BFTNotaryServiceTests {
private val mockNet = MockNetwork(emptyList()) private lateinit var mockNet: MockNetwork
private lateinit var notary: Party private lateinit var notary: Party
private lateinit var node: StartedNode<MockNode> private lateinit var node: StartedNode<MockNode>
@Before
fun before() {
mockNet = MockNetwork(emptyList())
}
@After @After
fun stopNodes() { fun stopNodes() {
mockNet.stopNodes() mockNet.stopNodes()