Class LinearSearchTests
Tests methods in LinearSearch class.
Inheritance
Inherited Members
Namespace: AlgorithmsAndDataStructuresTests.Algorithms.Search
Assembly: AlgorithmsAndDataStructuresTests.dll
Syntax
[TestClass]
public class LinearSearchTests
Methods
| Improve this Doc View SourceSearch_DistinctElements_ExpectsToSuccessfullyGetTheIndexOfTheirPosition()
Tests the correctness of Linear search algorithm on an array with distinct elements.
To visualize step by step how Linear Search finds a distinct element (int value of 3) in AlgorithmsAndDataStructuresTests.Algorithms.Search.LinearSearchTests._list see: .
Declaration
[TestMethod]
public void Search_DistinctElements_ExpectsToSuccessfullyGetTheIndexOfTheirPosition()
Search_DuplicateElements_ExpectsToGetTheIndexOfTheFirstOccurrenceNoMatterHowManyTimesSearchIsPerformed()
Tests the correctness of Linear search algorithm on an array with duplicate elements.
To visualize step by step how Linear Search finds a duplicate element (int value of 90) in AlgorithmsAndDataStructuresTests.Algorithms.Search.LinearSearchTests._list see: .
Declaration
[TestMethod]
public void Search_DuplicateElements_ExpectsToGetTheIndexOfTheFirstOccurrenceNoMatterHowManyTimesSearchIsPerformed()
Search_NonExistingElements_ExpectsToGetMinusOne()
Tests the correctness of Linear search algorithm when the key does not exist in the array.
To visualize step by step how Linear Search terminates without finding a missing element (int value of 15) in AlgorithmsAndDataStructuresTests.Algorithms.Search.LinearSearchTests._list see: .
Declaration
[TestMethod]
public void Search_NonExistingElements_ExpectsToGetMinusOne()