Refactor :client module into :client:javafx and :client:mock (#388)

* CORDA-304: Refactor :client modules into :client:javafx and :client:mock.

* CORDA-304: Add :client:mock to Dokka tasks, and remove unused integrationTest task.

* CORDA-304: Migrate DriverBasedTest from node into test-utils.

* CORDA-304: Rename .fx. package to .jfx. to prevent confusion with "exchange rate".

* CORDA-304: Rename module to ':client:jfx'.
This commit is contained in:
Chris Rankin
2017-03-21 19:45:12 +00:00
committed by GitHub
parent 26044e543d
commit 9e43df36d3
58 changed files with 154 additions and 107 deletions

View File

@ -13,12 +13,12 @@ import net.corda.core.node.NodeInfo
import net.corda.core.serialization.OpaqueBytes
import net.corda.flows.CashIssueFlow
import net.corda.flows.CashPaymentFlow
import net.corda.node.driver.DriverBasedTest
import net.corda.node.driver.NodeHandle
import net.corda.node.driver.driver
import net.corda.node.services.transactions.RaftValidatingNotaryService
import net.corda.testing.expect
import net.corda.testing.expectEvents
import net.corda.testing.node.DriverBasedTest
import net.corda.testing.replicate
import org.junit.Test
import rx.Observable

View File

@ -1,39 +0,0 @@
package net.corda.node.driver
import org.junit.After
import org.junit.Before
import java.util.concurrent.CountDownLatch
import kotlin.concurrent.thread
abstract class DriverBasedTest {
private val stopDriver = CountDownLatch(1)
private var driverThread: Thread? = null
private lateinit var driverStarted: CountDownLatch
protected sealed class RunTestToken {
internal object Token : RunTestToken()
}
protected abstract fun setup(): RunTestToken
protected fun DriverDSLExposedInterface.runTest(): RunTestToken {
driverStarted.countDown()
stopDriver.await()
return RunTestToken.Token
}
@Before
fun start() {
driverStarted = CountDownLatch(1)
driverThread = thread {
setup()
}
driverStarted.await()
}
@After
fun stop() {
stopDriver.countDown()
driverThread?.join()
}
}