public class UnstartedMockNode
A class that represents an unstarted mock node for testing.
public int getId()
An identifier for the node. By default this is allocated sequentially in a class MockNetwork
class MockNetwork
@NotNull public <T extends SerializeAsToken> T installCordaService(@NotNull java.lang.Class<T> serviceClass)
Install a custom test-only annotationclass CordaService
.
NOTE: There is no need to call this method if the service class is defined in the CorDapp and the class TestCordapp
API is used.
annotationclass CordaService
,
class TestCordapp
@NotNull public StartedMockNode start()
Start the node
class StartedMockNode
object.@NotNull public StartedMockNode getStarted()
A class StartedMockNode
object for this running node.
IllegalStateException
- if the node is not running yet.class StartedMockNode
public boolean isStarted()
Whether this node has been started yet.