private static void ApplyOutputArguments(IWritableFakeObjectCall call, CallDataMetadata callToApply)
 {
     foreach (var outputArgument in GetIndicesAndValuesOfOutputParameters(call, callToApply.RecordedCall))
     {
         call.SetArgumentValue(outputArgument.First, outputArgument.Second);
     }
 }
 private static void AssertThatMethodsMatches(IWritableFakeObjectCall call, CallDataMetadata callToApply)
 {
     if (!callToApply.RecordedCall.Method.Equals(call.Method))
     {
         throw new RecordingException(ExceptionMessages.MethodMissmatchWhenPlayingBackRecording);
     }
 }
Beispiel #3
0
 private static void ApplyOutputArguments(IInterceptedFakeObjectCall call, CallDataMetadata callToApply)
 {
     foreach (var outputArgument in GetIndicesAndValuesOfOutputParameters(call, callToApply.RecordedCall))
     {
         call.SetArgumentValue(outputArgument.Item1, outputArgument.Item2);
     }
 }
Beispiel #4
0
 private static void ApplyOutputArguments(IInterceptedFakeObjectCall call, CallDataMetadata callToApply)
 {
     foreach (var outputArgument in call.Method.GetParameters()
              .Select((parameter, index) => new { Parameter = parameter, Index = index })
              .Where(argument => argument.Parameter.ParameterType.IsByRef)
              .Select(argument => argument.Index).Zip(callToApply.RecordedCall.OutputArguments, (index, outputArgument) => new { Index = index, Value = outputArgument }))
     {
         call.SetArgumentValue(outputArgument.Index, outputArgument.Value);
     }
 }
 private static void ApplyOutputArguments(IInterceptedFakeObjectCall call, CallDataMetadata callToApply)
 {
     foreach (var outputArgument in call.Method.GetParameters()
         .Select((parameter, index) => new { Parameter = parameter, Index = index })
         .Where(argument => argument.Parameter.ParameterType.IsByRef)
         .Select(argument => argument.Index).Zip(callToApply.RecordedCall.OutputArguments, (index, outputArgument) => new { Index = index, Value = outputArgument }))
     {
         call.SetArgumentValue(outputArgument.Index, outputArgument.Value);
     }
 }
 private static void AssertThatMethodsMatches(IInterceptedFakeObjectCall call, CallDataMetadata callToApply)
 {
     if (!callToApply.RecordedCall.Method.Equals(call.Method))
     {
         throw new RecordingException(ExceptionMessages.MethodMissmatchWhenPlayingBackRecording);
     }
 }
 private static void ApplyOutputArguments(IInterceptedFakeObjectCall call, CallDataMetadata callToApply)
 {
     foreach (var outputArgument in GetIndicesAndValuesOfOutputParameters(call, callToApply.RecordedCall))
     {
         call.SetArgumentValue(outputArgument.Item1, outputArgument.Item2);
     }
 }