2 ms·
> There is no way to test it apart from reading stdout (or god forbid, having your test harness somehow intercept/mock the print call). It's trivial to change
by viraptor 2y ago
> There is no way to test it apart from reading stdout (or god forbid, having your test harness somehow intercept/mock the print call).
It's trivial to change if you care about that part. DI - pass in a ConsoleWriter. It also solves the test without mocking.