import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; public class SimpleTest { private static HamiltonianCycle hamiltonianCycle; @BeforeClass public static void init() { hamiltonianCycle = new MyHamiltonianCycle(); } @Test public void test1() { long[] g = {0b110, 0b101, 0b011}; Assert.assertTrue(hamiltonianCycle.hasHamiltonianCycle(g)); } @Test public void test2() { long[] g = {0b1110, 0b1101, 0b1011, 0b0111}; Assert.assertTrue(hamiltonianCycle.hasHamiltonianCycle(g)); } @Test public void test3() { long[] g = {0b010, 0b101, 0b010}; Assert.assertFalse(hamiltonianCycle.hasHamiltonianCycle(g)); } @Test public void test4() { long[] g = {0b11110, 0b00101, 0b00011, 0b10001, 0b01001}; Assert.assertFalse(hamiltonianCycle.hasHamiltonianCycle(g)); } }