JUnit Testing Flashcards

(3 cards)

1
Q

JUnit Test @

A

@Test

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

common assert statements

A

assertEquals(value1, value2)
assertNotEquals(value1, value2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Test a binary search tree with 4 unique nodes

A

@Test
public void testMultipleNodes() {
BinarySearchTree tree = new BinarySearxhTree();
tree.addNode(1);
tree.addNode(2);
.
.
.
Sys.out.println(Test 4 Unjque Nodes…)
assertEquals(“[1, 2, 3, 4]”, tree.toString());

How well did you know this?
1
Not at all
2
3
4
5
Perfectly