Table of Contents

Interface ITestStore<T>

Namespace
Cuemon.Extensions.Xunit
Assembly
Cuemon.Extensions.Xunit.dll

Represents the members needed for adding and querying a store tailored for unit testing.

public interface ITestStore<T>

Type Parameters

T

The type of the object to reference in the store.

Properties

Count

Gets the number of elements contained in the ITestStore<T>.

int Count { get; }

Property Value

Int32

The number of elements contained in the ITestStore<T>.

Methods

Add(T)

Adds an item to the ITestStore<T>.

void Add(T item)

Parameters

item T

The object to add to the ITestStore<T>.

Query(Func<T, Boolean>)

Filters the elements contained in the ITestStore<T> based on an optional predicate.

IEnumerable<T> Query(Func<T, bool> predicate = null)

Parameters

predicate Func<T, Boolean>

The function delegate to test each element for a condition.

Returns

IEnumerable<T>

An System.Collections.Generic.IEnumerable<T> that satisfies the condition.

QueryFor<TResult>()

Filters the elements contained in the ITestStore<T> based on the type T.

IEnumerable<TResult> QueryFor<TResult>()
    where TResult : T

Returns

IEnumerable<TResult>

An System.Collections.Generic.IEnumerable<T> that satisfies the condition.

Type Parameters

TResult

The concrete type that implements T.