Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Unfortunately our syntax gets more complex and we need to turn on the stub using
mocks.ReplayAll();

Mocking void Methods()

Methods without return values are easy. You get default implementation doing nothing (smile)

Code Block

        interface IInterface
        {
            void Go();
        }

We can use it like this in test

Code Block

        var mock = mocks.Stub<IInterface>();
        mock.Go();