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
{{ message }}
This repository has been archived by the owner on Oct 21, 2018. It is now read-only.
I would like to have access to the rootRecorder so I could be able to remove the expectations and set new ones.
The tests I run are "scenarios" so I don't care about how many times an method would be executed, I would like only to define the returning values and during my scenario execution the value changes. Also the system creates multiple threads during the execution so this make the testing infrastructure more complex.
The text was updated successfully, but these errors were encountered:
I think that could be useful to remove an pre-defined expectation.
public void BackToRecord(object obj, BackToRecordOptions options) { this.IsMockObjectFromThisRepository(obj); if ((options & BackToRecordOptions.Expectations) == BackToRecordOptions.Expectations) { foreach (IExpectation allExpectationsForProxy in this.rootRecorder.GetAllExpectationsForProxy(obj)) { **this.rootRecorder.RemoveExpectation(allExpectationsForProxy);** } this.rootRecorder.RemoveAllRepeatableExpectationsForProxy(obj); } MockRepository.GetMockedObject(obj).ClearState(options); this.proxies[obj] = this.proxies[obj].BackToRecord(); foreach (IMockedObject dependentMock in MockRepository.GetMockedObject(obj).DependentMocks) { this.BackToRecord(dependentMock, options); } }
this.rootRecorder.RemoveExpectation(allExpectationsForProxy);
I would like to have access to the rootRecorder so I could be able to remove the expectations and set new ones.
The tests I run are "scenarios" so I don't care about how many times an method would be executed, I would like only to define the returning values and during my scenario execution the value changes. Also the system creates multiple threads during the execution so this make the testing infrastructure more complex.
The text was updated successfully, but these errors were encountered: