DEV Community

Discussion on: How to write testable code

ddarrko profile image
Daniel Benzie Author

I use a mocking framework because it is consistent with what other developers I work alongside will use.

I would have no problems using an anonymous class but I don't see the benefit it offers over a mature, well tested and known library.