Commit 423a3160 authored by Michel Schudel's avatar Michel Schudel

wrote some unit tests to check p2p behaviour

parent 154cf858
package nl.craftsmen.blockchain.craftscoinnode;
import nl.craftsmen.blockchain.craftscoinnode.util.InstanceInfo;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import static org.assertj.core.api.Assertions.assertThat;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class BlockchainServiceApplicationTests {
InstanceInfo instanceInfo;
public void nodeInformationIsAvailable() throws UnknownHostException {
String host = Inet4Address
//spring server properties aren't injected when running a springboot integration test so we check for 0.
assertThat(instanceInfo.getNode()).isEqualTo(host + ":" + 0);
public void wiring() {
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment