problem about rhino-mocks-3.5-Collection of common programming errors
Larsenal
c# visual-studio-2008 rhino-mocks rhino-mocks-3.5
I have a property in an interface that I have mocked using Rhino Mocks. I want to know if it was accessed in my unit test.Is there a way to see if the property was accessed via Rhino Mocks?I found this code here but it does not seem to work:string name = customerMock.Name; customerMock.AssertWasCalled(x => {var ignored = x.Name;});I reproduced this code and I get the following:Rhino.Mocks.Exceptions.ExpectationViolationException: IAddAddressForm.get_FirstName(); Expected #1, Actual #0..I wou
Chad Kapatch
unit-testing rhino-mocks-3.5 partial-mocks
I am trying to test a class similar to the example below:public class Service : IService {public string A(string input){ int attemptCount = 5;while (attemptCount > 0){try{return TryA(input);}catch (ArgumentOutOfRangeException){attemptCount–;if (attemptCount == 0){throw;}// Attempt 5 more timesThread.Sleep(1000); } }throw new ArgumentOutOfRangeException(); }public string TryA(string input){// try actions, if fail will throw Argum
Web site is in building