Incorporate comments from PR

This commit is contained in:
Matthew Nesbit
2016-07-28 16:30:53 +01:00
parent 601b2faf5f
commit a462bb1d6a
11 changed files with 17 additions and 38 deletions

View File

@ -117,7 +117,7 @@ abstract class Simulation(val networkSendManuallyPumped: Boolean,
return object : SimulatedNode(dir, cfg, network, networkMapAddr, advertisedServices, id, keyPair) {
override fun start(): MockNetwork.MockNode {
super.start()
getCustomService<NodeInterestRates.Service>().upload(javaClass.getResourceAsStream("example.rates.txt"))
findService<NodeInterestRates.Service>().upload(javaClass.getResourceAsStream("example.rates.txt"))
return this
}
}

View File

@ -9,10 +9,7 @@ import com.r3corda.protocols.NotaryChangeProtocol
object NotaryChange {
class Plugin : CordaPluginRegistry {
override val webApis: List<Class<*>> = emptyList()
override val requiredProtocols: Map<String, Set<String>> = emptyMap()
override val staticServeDirs: Map<String, String> = emptyMap()
class Plugin : CordaPluginRegistry() {
override val servicePlugins: List<Class<*>> = listOf(Service::class.java)
}

View File

@ -13,10 +13,7 @@ import com.r3corda.protocols.TwoPartyDealProtocol
* TODO: This will be replaced with the automatic sessionID / session setup work.
*/
object FixingSessionInitiation {
class Plugin: CordaPluginRegistry {
override val webApis: List<Class<*>> = emptyList()
override val staticServeDirs: Map<String, String> = emptyMap()
override val requiredProtocols: Map<String, Set<String>> = emptyMap()
class Plugin: CordaPluginRegistry() {
override val servicePlugins: List<Class<*>> = listOf(Service::class.java)
}

View File

@ -46,9 +46,7 @@ object NodeInterestRates {
/**
* Register the protocol that is used with the Fixing integration tests.
*/
class Plugin : CordaPluginRegistry {
override val webApis: List<Class<*>> = emptyList()
override val staticServeDirs: Map<String, String> = emptyMap()
class Plugin : CordaPluginRegistry() {
override val requiredProtocols: Map<String, Set<String>> = mapOf(Pair(TwoPartyDealProtocol.FixingRoleDecider::class.java.name, setOf(Duration::class.java.name, StateRef::class.java.name)))
override val servicePlugins: List<Class<*>> = listOf(NodeInterestRates.Service::class.java)
}

View File

@ -16,10 +16,7 @@ import javax.annotation.concurrent.ThreadSafe
object DataVending {
class Plugin : CordaPluginRegistry {
override val webApis: List<Class<*>> = emptyList()
override val staticServeDirs: Map<String, String> = emptyMap()
override val requiredProtocols: Map<String, Set<String>> = emptyMap()
class Plugin : CordaPluginRegistry() {
override val servicePlugins: List<Class<*>> = listOf(Service::class.java)
}

View File

@ -105,7 +105,7 @@ class NodeInterestRatesTest {
fun network() {
val net = MockNetwork()
val (n1, n2) = net.createTwoNodes()
n2.getCustomService<NodeInterestRates.Service>().oracle.knownFixes = TEST_DATA
n2.findService<NodeInterestRates.Service>().oracle.knownFixes = TEST_DATA
val tx = TransactionType.General.Builder()
val fixOf = NodeInterestRates.parseFixOf("LIBOR 2016-03-16 1M")