public DispatchCallBenchmark() { _interfaceProxy = Substitute.For <IInterfaceWithSingleMethod>(); _abstractClassProxy = Substitute.For <AbstractClassWithSingleMethod>(); _classPartialProxy = Substitute.For <ClassWithSingleMethod>(); _delegateProxy = Substitute.For <CustomDelegate>(); }
public ToStringCallBenchmark() { _interfaceProxy = Substitute.For <IInterfaceWithSingleMethod>(); _abstractClassProxy = Substitute.For <AbstractClassWithSingleMethod>(); _regularClassWithoutToStringProxy = Substitute.For <ClassWithSingleMethod>(); _regularClassWithToStringProxy = Substitute.For <ClassWithToStringImplementation>(); }
public DispatchNonConfiguredCallBenchmark() { _interfaceProxy = Substitute.For <IInterfaceWithSingleMethod>(); _abstractClassProxy = Substitute.For <AbstractClassWithSingleMethod>(); _classPartialProxy = Substitute.For <ClassWithSingleMethod>(); _intDelegateProxy = Substitute.For <IntDelegate>(); _voidDelegateProxy = Substitute.For <VoidDelegate>(); }
public DispatchConfiguredMatchingCallBenchmark() { _interfaceProxy = Substitute.For <IInterfaceWithSingleMethod>(); _interfaceProxy.IntMethod("42").Returns(42); _interfaceProxy.When(x => x.VoidMethod("42")).Do(delegate { }); _abstractClassProxy = Substitute.For <AbstractClassWithSingleMethod>(); _abstractClassProxy.IntMethod("42").Returns(42); _abstractClassProxy.When(x => x.VoidMethod("42")).Do(delegate { }); _classPartialProxy = Substitute.For <ClassWithSingleMethod>(); _classPartialProxy.IntMethod("42").Returns(42); _classPartialProxy.When(x => x.VoidMethod("42")).Do(delegate { }); _intDelegateProxy = Substitute.For <IntDelegate>(); _intDelegateProxy.Invoke("42").Returns(42); _voidDelegateProxy = Substitute.For <VoidDelegate>(); _voidDelegateProxy.When(x => x.Invoke("42")).Do(delegate { }); }
public VerifyReceivedCallBenchmark() { _interfaceProxy = Substitute.For <IInterfaceWithSingleMethod>(); _interfaceProxy.IntMethod("42"); _interfaceProxy.VoidMethod("42"); _abstractClassProxy = Substitute.For <AbstractClassWithSingleMethod>(); _abstractClassProxy.IntMethod("42"); _abstractClassProxy.VoidMethod("42"); _classPartialProxy = Substitute.For <ClassWithSingleMethod>(); _classPartialProxy.IntMethod("42"); _classPartialProxy.VoidMethod("42"); _intDelegateProxy = Substitute.For <IntDelegate>(); _intDelegateProxy("42"); _voidDelegateProxy = Substitute.For <VoidDelegate>(); _voidDelegateProxy("42"); }