Public API
Every public type of Understudy, by area. Namespace
Understudy, assembly Understudy, except Arg, also in namespace Understudy, which is added to each of your test assemblies.Entry pointsDeclare spies, stubs, fakes and Real, match arguments, and declare non-deterministic members.
Open the Entry points reference →
Roles
staticSpy
staticStub
staticFake
staticReal
Matchers
staticArg
Leak detection
attrNonDeterministicAttribute
SpiesWhat Spy entry points return: the real member runs, and the spy records what the code under test does with it.
Methods
sealedSpiedMethod
sealedSpiedMethod<TResult>
sealedSpiedMethodTable<TInstance>
sealedSpiedMethodTable<TInstance, TResult>
Constructors
sealedSpiedConstructor<TResult>
Fields
sealedSpiedField<TValue>
sealedSpiedFieldTable<TInstance, TValue>
Properties
sealedSpiedProperty<TValue>
sealedSpiedPropertyTable<TInstance, TValue>
Indexers
sealedSpiedIndexer<TValue>
sealedSpiedIndexerTable<TInstance, TValue>
Events
sealedSpiedEvent
sealedSpiedEventTable<TInstance>
Catch blocks
sealedSpiedCatch<TException>
StubsWhat Stub entry points return: the member is replaced with the answers your test sets.
Methods
sealedStubbedMethod
sealedStubbedMethod<TResult>
sealedStubbedMethodTable<TInstance>
sealedStubbedMethodTable<TInstance, TResult>
Constructors
sealedStubbedConstructor<TResult>
Fields
sealedStubbedField<TValue>
sealedStubbedFieldTable<TInstance, TValue>
Properties
sealedStubbedProperty<TValue>
sealedStubbedPropertyTable<TInstance, TValue>
Indexers
sealedStubbedIndexer<TValue>
sealedStubbedIndexerTable<TInstance, TValue>
FakesWhat Fake entry points return: a stored value for a field or property, stored handlers for an event.
Fields
sealedFakedField<TValue>
sealedFakedFieldTable<TInstance, TValue>
Properties
sealedFakedProperty<TValue>
sealedFakedPropertyTable<TInstance, TValue>
Events
sealedFakedEvent
sealedFakedEventTable<TInstance>
RecordingsWhat spies, stubs and fakes record of the calls, reads, writes, subscriptions, raises and catches the code under test makes.
Open the Recordings reference →
Calls
sealedCallList
sealedCallList<TResult>
classRecordedCall
sealedRecordedCall<TResult>
Reads and writes
sealedAccessList<TValue>
sealedRecordedAccess<TValue>
Events
sealedRecordedHandler
sealedRecordedInvocation
Catch blocks
sealedRecordedCatch