Class StubPropertiesCommand

Namespace: AutoFixture.AutoMoq
Assembly: AutoFixture.AutoMoq.dll

Stubs a mocked object's properties, giving them "property behavior". Setting a property's value will cause it to be saved and later returned when the property is accessed.

public class StubPropertiesCommand : ISpecimenCommand

Inheritance

objectStubPropertiesCommand

Implements

ISpecimenCommand

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

StubPropertiesCommand()

public StubPropertiesCommand()

Methods

Execute(object, ISpecimenContext)

Stubs a mocked object's properties, giving them "property behavior". Setting a property's value will cause it to be saved and later returned when the property is accessed.

public void Execute(object specimen, ISpecimenContext context)

Parameters

specimen object

The mock to setup.

context ISpecimenContext

The context of the mock.