@Test public void isBST() { assertTrue(TreeUtilsTest.isBST(TreeUtils.createBSTFromRange(0, 9))); assertTrue(TreeUtilsTest.isBST(TreeUtils.createBSTFromRange(5, 9))); assertTrue(TreeUtilsTest.isBST(TreeUtils.createBSTFromRange(0, 2))); }
@Test public void startEqualsEnd() { Node<Integer> aux = TreeUtils.createBSTFromRange(5, 5); assertTrue(TreeUtilsTest.rootWithNoChild(aux)); }
@Test public void startBiggerThanEnd() { assertEquals(TreeUtils.createBSTFromRange(5, 4), null); }