Help save net neutrality! Learn more.
Close

EasyMock.Net usage

Help
2005-09-22
2013-03-22
  • Nicolas Michael Diaz

    I have some questions about this:

    1) Can I assume the interfaces are similar to EasyMock's interfaces?

    2) Does EasyMock.Net support ordered/unordered expects?

    3) Can I setup a call to return different values for different parameters?

    Nick

     
    • Jon Skeet

      Jon Skeet - 2005-09-23

      > I have some questions about this:

      > 1) Can I assume the interfaces are similar to EasyMock's interfaces?

      Currently, they're very similar. I have a development version which is much more ".NET-ified" and rather more powerful. I'm testing it at work, and will probably release it as EasyMock.NET at some stage. Alternatively, as the interface has changed significantly, I may just release a few bug fixes to EasyMock.NET and start a separate project.

      > 2) Does EasyMock.Net support ordered/unordered expects?

      Yes.

      > 3) Can I setup a call to return different values for different parameters?

      Well, you can set up multiple calls and return different values from each call. You can't (in the current version) return different values based on actual parameters. You will be able to (using delegates to provide custom actual behaviour) in the more powerful version, whatever that ends up being released as.

      Jon

       
    • Nicolas Michael Diaz

      I was also curious about something else, is it true EasyMock & EasyMock.Net do not support mocks of a class?

      Nick

       
      • Jon Skeet

        Jon Skeet - 2005-09-28

        Sorry for not replying before - I thought I had done so, but evidently I hadn't.

        EasyMock itself doesn't support mocking classes without using an extension.

        EasyMock.NET only supports mocking classes that derive (directly or indirectly) from MarshalByRefObject (and interfaces, of course). There are no extensions available to allow mocking of other classes at all.

        Jon

         

Log in to post a comment.