Esempio n. 1
0
 public void NormalInput()
 {
     Assert.True(VerifySequenceForBinarySearchTree.Verify(new[] { 5, 7, 6, 9, 11, 10, 8 }));
     Assert.False(VerifySequenceForBinarySearchTree.Verify(new[] { 7, 4, 6, 5 }));
 }
Esempio n. 2
0
 public void BinarySearchTreeWithOnlyOneNode()
 {
     Assert.True(VerifySequenceForBinarySearchTree.Verify(new[] { 30 }));
 }
Esempio n. 3
0
 public void InvalidInput()
 {
     Assert.Throws <ArgumentNullException>(() => VerifySequenceForBinarySearchTree.Verify(null));
     Assert.False(VerifySequenceForBinarySearchTree.Verify(new int[0]));
 }
Esempio n. 4
0
 public void BinarySearchTreeWithOnlyLeftChileNode()
 {
     Assert.True(VerifySequenceForBinarySearchTree.Verify(new[] { 30, 23, 22, 18, 11 }));
     Assert.False(VerifySequenceForBinarySearchTree.Verify(new[] { 30, 23, 22, 10, 11 }));
 }