When migrating from system.out to logging framework , it is usual to have the code like this
assertFalse(errContent.toString().contains("Multiple (2) .dbc spec files found"),
"Should print an error message to System.err");
It would be easy to make such asserts migration easy, with simple method that checks if the .out and .err strings exists in the inmemory version of the log-capter.. do consider to provide such method.
i.e. have method like logCaptor.inErrorHas("abc string") etc..
When migrating from system.out to logging framework , it is usual to have the code like this
It would be easy to make such asserts migration easy, with simple method that checks if the .out and .err strings exists in the inmemory version of the log-capter.. do consider to provide such method.
i.e. have method like logCaptor.inErrorHas("abc string") etc..