Fixed several bugs in the contract constraints work (#1695)

* Added schedulable flows to cordapp scanning
* Fixed a bug where the core flows are included in every cordapp. 
* Added a test to prove the scheduled flows are loaded correctly. 
* Enabled a negative test to prove that we are not currently dynamically loading attachment classes from the network.
This commit is contained in:
Clinton
2017-09-27 18:34:17 +01:00
committed by GitHub
parent 5ed755d3fe
commit 334164aa86
16 changed files with 193 additions and 100 deletions

View File

@ -14,7 +14,7 @@ class MockCordappProvider(cordappLoader: CordappLoader) : CordappProviderImpl(co
val cordappRegistry = mutableListOf<Pair<Cordapp, AttachmentId>>()
fun addMockCordapp(contractClassName: ContractClassName, services: ServiceHub) {
val cordapp = CordappImpl(listOf(contractClassName), emptyList(), emptyList(), emptyList(), emptyList(), emptySet(), Paths.get(".").toUri().toURL())
val cordapp = CordappImpl(listOf(contractClassName), emptyList(), emptyList(), emptyList(), emptyList(), emptyList(), emptySet(), Paths.get(".").toUri().toURL())
if (cordappRegistry.none { it.first.contractClassNames.contains(contractClassName) }) {
cordappRegistry.add(Pair(cordapp, findOrImportAttachment(contractClassName.toByteArray(), services)))
}