kentcb / PCLMock

A simple mocking framework in a PCL.
MIT License
45 stars 8 forks source link

Improve evaluation behavior #5

Closed kentcb closed 9 years ago

kentcb commented 9 years ago

Improve the evaluation behavior significantly. In addition to what is currently possible, the following should be possible:

// calling a method (FromSeconds) to obtain the value
mock.Verify(x => x.SomeMethod(TimeSpan.FromSeconds(1)))
    .WasCalledExactlyOnce();

// performing calculations
mock.Verify(x => x.SomeMethod((37 * 2) / 12))
    .WasCalledExactlyOnce();

Of course, the same should be true in the context of a When() call.