コード例 #1
0
            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);
            }
コード例 #2
0
 public override void Context()
 {
     _defaultForType = mock <IDefaultForType>();
     _defaultForType.stub(x => x.GetDefaultFor(DefaultIntValue.GetType())).Return(DefaultIntValue);
 }