Skip to content

IItemContext<TFixtureItem,TPathProvider>.Verify<TReturnType> method (1 of 2)

Start the verification of a property.

csharp
var sut = new ItemBuilder<IMyType>()
    .Build(out var scope);

var a = sut.MyProp;

scope.Verify(p => p.MyProp)
    .Get()
    .Called();
var sut = new ItemBuilder<IMyType>()
    .Build(out var scope);

var a = sut.MyProp;

scope.Verify(p => p.MyProp)
    .Get()
    .Called();
csharp
public IPropertyVerifier<TReturnType> Verify<TReturnType>(
    Func<TPathProvider, PropertyMemberPath<TFixtureItem, TReturnType>> selector)
public IPropertyVerifier<TReturnType> Verify<TReturnType>(
    Func<TPathProvider, PropertyMemberPath<TFixtureItem, TReturnType>> selector)
parameterdescription
TReturnType
selector

Return Value

Verifier for further configuration.

See Also


IItemContext<TFixtureItem,TPathProvider>.Verify<TMethodMemberPath> method (2 of 2)

Start the verification of a method.

csharp
var sut = new ItemBuilder<IMyType>()
    .Build(out var scope);

sut.MyMethod();

scope.Verify(p => p.MyMethod)
    .Called();
var sut = new ItemBuilder<IMyType>()
    .Build(out var scope);

sut.MyMethod();

scope.Verify(p => p.MyMethod)
    .Called();
csharp
public IMethodVerifier<TFixtureItem, TPathProvider, TMethodMemberPath> Verify<TMethodMemberPath>(
    Func<TPathProvider, TMethodMemberPath> selector)
    where TMethodMemberPath : IMethodMemberPath<TFixtureItem>
public IMethodVerifier<TFixtureItem, TPathProvider, TMethodMemberPath> Verify<TMethodMemberPath>(
    Func<TPathProvider, TMethodMemberPath> selector)
    where TMethodMemberPath : IMethodMemberPath<TFixtureItem>
parameterdescription
TMethodMemberPath
selectorFunction for selecting a method.

Return Value

Verifier for further configuration.

See Also