Validating
Method |
Description |
Isolate.Verify<Verification_Kind>(() => fakeDependancy.<method>); |
Verifies a method call. |
Isolate.Verify<Verification_Kind>(() => <static_method>); |
Verifies a static method. |
static Isolate.Verify.NonPublic.<WasCalled>(typeof(Dependency), "PrivateMethodname"); instance Isolate.Verify.NonPublic.WasCalled(<instance>, "PrivateMethodname"); property Isolate.Verify.NonPublic.Property.WasCalledGet(realDependency, "PrivateProp"); Isolate.Verify.NonPublic.Indexer.WasCalledGet(realDependency); |
Verifies a non-public method. |
int count = Isolate.Verify.GetTimesCalled(() => <method>); |
Verifies the number of times a method was called. |
Isolate.Fake.NextInstances<type>(); Isolate.Verify.WasCalledWithAnyArguments (() => new Dependency()); |
Verifies that a future instance was created. |
Isolate.Fake.AllInstances<type>(); … Isolate.Verify.GetTimesCalled(() => new Dependency()); |
Verifies the number of created instances. |
var fake = Isolate.Fake.NextInstances<type>(); var instance = Isolate.Verify.GetInstancesOf(fake)[index]; |
Retrieves the ith instance by creation order of type. |
Isolate.Verify.OnBase().<Verification_Kind>(() => fake.<method>); Isolate.Verify.OnBase(type).<Verification_Kind>(() => fake.<method>); |
Verify that a method was called on a base. |