You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the following statement var initialSetup = CreateInitialSetup(); var setup = initialSetup.AddMethodCallWithResult<Guid, Guid[]>( t => t.GetPhasesByGauge(It.IsAny<Guid>()), (r, id) => r.Complete(_phases[id].Select(t => t.Id).ToArray())); setup.Build();
will result in returning the same value each time
One should use var initialSetup = CreateInitialSetup(); var setup = initialSetup.AddMethodCallWithResult<Guid, Guid[]>( t => t.GetPhasesByGauge(It.IsAny<Guid>()), (r, id) => r.Complete( k => _phases[k].Select(t => t.Id).ToArray())); setup.Build();
instead.
Pay attention to the difference in having the precalculated value and the delegate. It's not so obvious.
The text was updated successfully, but these errors were encountered:
Right now the following statement
var initialSetup = CreateInitialSetup(); var setup = initialSetup.AddMethodCallWithResult<Guid, Guid[]>( t => t.GetPhasesByGauge(It.IsAny<Guid>()), (r, id) => r.Complete(_phases[id].Select(t => t.Id).ToArray())); setup.Build();
will result in returning the same value each time
One should use
var initialSetup = CreateInitialSetup(); var setup = initialSetup.AddMethodCallWithResult<Guid, Guid[]>( t => t.GetPhasesByGauge(It.IsAny<Guid>()), (r, id) => r.Complete( k => _phases[k].Select(t => t.Id).ToArray())); setup.Build();
instead.
Pay attention to the difference in having the precalculated value and the delegate. It's not so obvious.
The text was updated successfully, but these errors were encountered: