testing - How do I test a virtual property on an abstract class with Rhino Mocks and MSpec? -



testing - How do I test a virtual property on an abstract class with Rhino Mocks and MSpec? -

i have virtual property, firstname, on abstract class, foo. need test virtual property's behavior. method never fires when test executes (and test fails, no matter what's in method's body). how can create method scheme under test? how can test method?

class="lang-cs prettyprint-override">[subject(typeof(foo))] public class when_whatever { found context = () => { _foosut = _mockrepository.partialmock<foo>(argumentone, argumenttwo); }; because of = () => _result = _foosut.firstname; should_return_not_null = () => _result.shouldnotbenull(); private static string _result; private static foo _foosut; }

i'm using rhino mocks 3.5 , mspec.

are tried partialmock feature? see here

testing virtual rhino-mocks mspec

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -