Show / Hide Table of Contents

Class SearchTests

Implements test methods for search algorithms.

Inheritance
System.Object
SearchTests
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
public class SearchTests

Fields

| Improve this Doc View Source

List

Sorted array of elements. Note that binary search expects a sorted array.

Declaration
public static readonly List<int> List
Field Value
Type Description
System.Collections.Generic.List<System.Int32>

Methods

| Improve this Doc View Source

DistinctElements_ExpectsToSuccessfullyGetTheIndexOfTheirPosition(Func<List<Int32>, Int32, Int32, Int32, Int32>)

Tests the correctness of searchMethod on an array with distinct elements.

Declaration
public static void DistinctElements_ExpectsToSuccessfullyGetTheIndexOfTheirPosition(Func<List<int>, int, int, int, int> searchMethod)
Parameters
Type Name Description
System.Func<System.Collections.Generic.List<System.Int32>, System.Int32, System.Int32, System.Int32, System.Int32> searchMethod

The search method that is being tested.

| Improve this Doc View Source

DistinctElements_ExpectsToSuccessfullyGetTheIndexOfTheirPosition(Func<List<Int32>, Int32, Int32>)

Tests the correctness of searchMethod on an array with distinct elements.

Declaration
public static void DistinctElements_ExpectsToSuccessfullyGetTheIndexOfTheirPosition(Func<List<int>, int, int> searchMethod)
Parameters
Type Name Description
System.Func<System.Collections.Generic.List<System.Int32>, System.Int32, System.Int32> searchMethod

The search method that is being tested.

| Improve this Doc View Source

DuplicateElements_ExpectsToGetTheIndexOfOneOfTheDupliatesNoMatterHowManyTimeSearchIsPerformed(Func<List<Int32>, Int32, Int32, Int32, Int32>)

Tests the correctness of searchMethod on an array with duplicate elements.

Declaration
public static void DuplicateElements_ExpectsToGetTheIndexOfOneOfTheDupliatesNoMatterHowManyTimeSearchIsPerformed(Func<List<int>, int, int, int, int> searchMethod)
Parameters
Type Name Description
System.Func<System.Collections.Generic.List<System.Int32>, System.Int32, System.Int32, System.Int32, System.Int32> searchMethod

The search method that is being tested.

| Improve this Doc View Source

DuplicateElements_ExpectsToGetTheIndexOfOneOfTheDupliatesNoMatterHowManyTimeSearchIsPerformed(Func<List<Int32>, Int32, Int32>)

Tests the correctness of searchMethod on an array with duplicate elements.

Declaration
public static void DuplicateElements_ExpectsToGetTheIndexOfOneOfTheDupliatesNoMatterHowManyTimeSearchIsPerformed(Func<List<int>, int, int> searchMethod)
Parameters
Type Name Description
System.Func<System.Collections.Generic.List<System.Int32>, System.Int32, System.Int32> searchMethod

The search method that is being tested.

| Improve this Doc View Source

NonExistingElements_ExpectsToGetMinusOne(Func<List<Int32>, Int32, Int32, Int32, Int32>)

Tests the correctness of searchMethod when the key does not exist in the array.

Declaration
public static void NonExistingElements_ExpectsToGetMinusOne(Func<List<int>, int, int, int, int> searchMethod)
Parameters
Type Name Description
System.Func<System.Collections.Generic.List<System.Int32>, System.Int32, System.Int32, System.Int32, System.Int32> searchMethod

The search method that is being tested.

| Improve this Doc View Source

NonExistingElements_ExpectsToGetMinusOne(Func<List<Int32>, Int32, Int32>)

Tests the correctness of searchMethod when the key does not exist in the array.

Declaration
public static void NonExistingElements_ExpectsToGetMinusOne(Func<List<int>, int, int> searchMethod)
Parameters
Type Name Description
System.Func<System.Collections.Generic.List<System.Int32>, System.Int32, System.Int32> searchMethod

The search method that is being tested.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX