Reputation: 605
I'm a newbie using IntelliJ + Corda + Kotlin.
I just have installed IntelliJ IDEA, cloned the Corda Git Repository BootCamp (https://github.com/corda/bootcamp-cordapp), and the first thing that IntelliJ shows me are some Errors, claiming what I think are Kotlin packages and classes.
This are some of the Error messages:
Error:(6, 30) java: package net.corda.testing.core does not exist
Error:(12, 37) java: cannot find symbol
...symbol: class TestIdentity
...location: class test.java.java_bootcamp.StateTests
package test.java.java_bootcamp;
import net.corda.core.contracts.ContractState;
import net.corda.core.identity.CordaX500Name;
import net.corda.core.identity.Party;
import net.corda.testing.core.TestIdentity;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class StateTests {
private final Party alice = new TestIdentity(new CordaX500Name("Alice", "", "GB")).getParty();
private final Party bob = new TestIdentity(new CordaX500Name("Bob", "", "GB")).getParty();
@Test
public void tokenStateHasIssuerOwnerAndAmountParamsOfCorrectTypeInConstructor() {
new TokenState(alice, bob, 1);
}
@Test
public void tokenStateImplementsContractState() {
assert(new TokenState(alice, bob, 1) instanceof ContractState);
}
}
What am I doing wrong or missing?
BTW, I'm using a Mac
Upvotes: 0
Views: 415
Reputation: 605
After a 4 hour pain, I discovered that I need to add two JAR's, that solved my problem (for now).
These were them, from Maven Repository:
<!-- https://mvnrepository.com/artifact/net.corda/corda-test-utils -->
<dependency>
<groupId>net.corda</groupId>
<artifactId>corda-test-utils</artifactId>
<version>3.3-corda</version>
</dependency>
<!-- https://mvnrepository.com/artifact/net.corda/corda-node-driver -->
<dependency>
<groupId>net.corda</groupId>
<artifactId>corda-node-driver</artifactId>
<version>3.3-corda</version>
</dependency>
Upvotes: 1