Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Mock frameworks make it trivial.

  Foo foo = new Foo(mock(Bar.class))

  foo.a(x,y,z)
Not sure what the issue is there really.


> Mock frameworks make it trivial.

In my experience mock objects can be brittle. A few sprinkled in judiciously can be ok, but once the density gets high enough, it starts to feel like the test becomes decoupled from the actual code it's supposed to test.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: