{"id":5851,"date":"2014-04-07T09:39:11","date_gmt":"2014-04-07T09:39:11","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/problem-about-rhino-mocks-3-5-collection-of-common-programming-errors\/"},"modified":"2014-04-07T09:39:11","modified_gmt":"2014-04-07T09:39:11","slug":"problem-about-rhino-mocks-3-5-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/07\/problem-about-rhino-mocks-3-5-collection-of-common-programming-errors\/","title":{"rendered":"problem about rhino-mocks-3.5-Collection of common programming errors"},"content":{"rendered":"<ul>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/61fcda6377c3941f33130902c15ba27e?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nLarsenal<br \/>\nc# visual-studio-2008 rhino-mocks rhino-mocks-3.5<br \/>\nI 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 =&gt; {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<\/li>\n<li><img decoding=\"async\" src=\"http:\/\/www.gravatar.com\/avatar\/b3ff7a4f79647ff0e5484eeccb9dc1f9?s=32&amp;d=identicon&amp;r=PG\" \/><br \/>\nChad Kapatch<br \/>\nunit-testing rhino-mocks-3.5 partial-mocks<br \/>\nI 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 &gt; 0){try{return TryA(input);}catch (ArgumentOutOfRangeException){attemptCount&#8211;;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<\/li>\n<\/ul>\n<p>Web site is in building<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-5851","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=5851"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/5851\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=5851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=5851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=5851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}