@Test public void addTest1() { MinimiKeko<Node> keko = new MinimiKeko(new Node[10]); Node n = new Node(3, 7); keko.add(n); assertEquals(n, keko.peek()); }
@Test public void addTest2() { MinimiKeko<Node> keko = new MinimiKeko(new Node[10]); Node maali = new Node(0, 0); for (int i = 0; i < 5; i++) { Node a = new Node(3, i); a.setfScore(maali); keko.add(a); } assertEquals(new Node(3, 0), keko.peek()); }
@Test public void addTest3() { MinimiKeko<Node> keko = new MinimiKeko(new Node[150]); Node maali = new Node(0, 0); for (int i = 3; i < 15; i++) { for (int j = 3; j < 15; j++) { Node a = new Node(i, j); a.setfScore(maali); keko.add(a); } } assertEquals(new Node(3, 3), keko.peek()); }