Re:Generating a Java program with 90% less code
by MockObject on Wednesday December 04, 2019 @12:21PM
(#21704275)
Close! That's Mockito.
Re:Generating a Java program with 90% less code
by organsnyder on Wednesday December 04, 2019 @12:29PM
(#21704401)
Oops. Haven't done Java programming full-time since last year, but I did set up a home MQTT broker recently...
Re:Generating a Java program with 90% less code
by CraigJPerry on Wednesday December 04, 2019 @12:45PM
(#21704657)
It is - but my point is about complexity not ease.
The fact that dependency is versioned separately from your code base is one source of complexity that it adds. The fact that it has many lines of code is another complexity.
It is however often easier, even although i'm advocating very small self-written test doubles, they are still less easy than using mockito.
Re:Generating a Java program with 90% less code
by organsnyder on Wednesday December 04, 2019 @01:42PM
(#21705457)
It's a dependency that's only needed during testing, though—it's not shipped with production artifacts.
Re:Generating a Java program with 90% less code
by CraigJPerry on Wednesday December 04, 2019 @02:43PM
(#21706115)
That argument doesn't address complexity. Tests are part of the system.
edit: Not "Moquitto".