Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import org.junit.Assert;
- import org.junit.Test;
- import java.util.ArrayList;
- import java.util.List;
- public class TestFloor1_shouldWorkCorrectly {
- @Test
- public void testFloor1_shouldWorkCorrectly() {
- BinarySearchTree<Integer> bst = new BinarySearchTree<>();
- bst.insert(12);
- bst.insert(21);
- bst.insert(5);
- bst.insert(1);
- bst.insert(8);
- bst.insert(18);
- bst.insert(23);
- Assert.assertEquals(7, bst.count());
- Integer floor = bst.floor(0);
- Assert.assertNull(floor);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement