arrange act assert - Rhino Mock AAA expectation inside of expectation -


is possible mock following situation, using rhino mock aaa syntax:

// interface interface ifoo {     void executefoo( expression<action> action );     void increment(out int value); // value++ }  // situation mock: var foo = new foo(); int value = 7; foo.executefoo( () => foo.increment( out value ) );      // , here mock needs remade: foomock.expect( f => f.executefoo( arg<expression<action>>.is.notnull )); foomock.executefoo( () => foo.increment( out value ) );    

but instead of .is.notnull constraint somehow need pass expectation:

foomock.expect(f => f.increment(out arg<int>.out(8).dummy)); 

i know may seem little bit odd, let's executefoo crucial , has done this.

you can't set expectations on lambdas because of way handled compiler. see: http://weblogs.asp.net/psteele/archive/2010/06/18/rhino-mocks-lambdas-and-expectations.aspx


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -