Show / Hide Table of Contents

Class BinarySearchTests

Tests the methods in BinarySearch class.

Inheritance
System.Object
BinarySearchTests
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: AlgorithmsAndDataStructuresTests.Algorithms.Search
Assembly: AlgorithmsAndDataStructuresTests.dll
Syntax
[TestClass]
public class BinarySearchTests

Methods

| Improve this Doc View Source

Search_DistinctElements()

Tests the correctness of binary search algorithm on an array with distinct elements. To visualize step by step how Binary Search finds a distinct element (int value of 3) in List see: .

Declaration
[TestMethod]
public void Search_DistinctElements()
| Improve this Doc View Source

Search_DuplicateElements()

Tests the correctness of binary search algorithm on an array with duplicate elements. To visualize step by step how Binary Search finds a duplicate element (int value of 90) in List see: .

Declaration
[TestMethod]
public void Search_DuplicateElements()
| Improve this Doc View Source

Search_NonExistingElements()

Tests the correctness of binary search algorithm when the key does not exist in the array. To visualize step by step how Binary Search terminates without finding a missing element (int value of 15) in List see: .

Declaration
[TestMethod]
public void Search_NonExistingElements()
  • Improve this Doc
  • View Source
Back to top Generated by DocFX