Reduce output of resource closing tests

This commit is contained in:
ljacqu 2016-02-28 09:05:30 +01:00
parent 90a0202b49
commit 8832c1ac0f

View File

@ -167,7 +167,9 @@ public abstract class AbstractResourceClosingTest {
* Verify that all AutoCloseables that have been created during the method execution have been closed.
*/
private void verifyHaveMocksBeenClosed() {
System.out.println("Found " + closeables.size() + " resources");
if (closeables.isEmpty()) {
System.out.println("Note: detected no AutoCloseables for method '" + method.getName() + "'");
}
try {
for (AutoCloseable autoCloseable : closeables) {
verify(autoCloseable).close();