public override void Context() { var methodInfo = ReflectionHelper.GetMethod(() => NonVoidMethod()); var returnType = methodInfo.ReturnType; _call = mock <ICall>(); _call.stub(x => x.GetMethodInfo()).Return(methodInfo); _defaultForType = mock <IDefaultForType>(); _defaultForType.stub(x => x.GetDefaultFor(returnType)).Return(_expectedDefault); }
public override void Context() { _defaultForType = mock <IDefaultForType>(); _defaultForType.stub(x => x.GetDefaultFor(DefaultIntValue.GetType())).Return(DefaultIntValue); }