cordapp-template-java
cordapp-template-java copied to clipboard
Error: net.corda.core.contracts.AttachmentResolutionException
To reproduce the error:
- Clone this repository.
- Checkout the token-template branch
- Run the below test using
./gradlew test
public class FlowTests {
private final MockNetwork network = new MockNetwork(ImmutableList.of(
"com.template.contracts", "com.template.flows",
"com.r3.corda.lib.tokens.money",
"com.r3.corda.lib.tokens.contracts",
"com.r3.corda.lib.tokens.workflows",
"com.r3.corda.lib.tokens.testing"));
private final StartedMockNode exchangeNode = network.createNode();
private final Party exchange = exchangeNode.getInfo().getLegalIdentities().get(0);
@Before
public void setup() {
network.runNetwork();
}
@After
public void tearDown() {
network.stopNodes();
}
@Test
public void dummyTest() throws ExecutionException, InterruptedException {
ExampleFlowWithFixedToken issueFlow = new ExampleFlowWithFixedToken("USD", 1000L, exchange);
Future<SignedTransaction> future = exchangeNode.startFlow(issueFlow);
network.runNetwork();
SignedTransaction tx = future.get();
System.out.print(tx);
}
}