diff --git a/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java b/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java index ea2c679..6d526f0 100644 --- a/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java +++ b/gclc.system/src/test/java/net/bigeon/gclc/system/ForwardingRunnableTest.java @@ -19,8 +19,6 @@ import net.bigeon.gclc.utils.StreamConsoleOutput; /** @author Emmanuel Bigeon */ public class ForwardingRunnableTest { - /** Test method for {@link net.bigeon.gclc.system.ForwardingRunnable#run()}. */ - @Test public void testClosedOutput() { final StreamConsoleOutput out = new StreamConsoleOutput(); out.close(); @@ -43,16 +41,4 @@ public class ForwardingRunnableTest { runnable.run(); assertTrue("Error should be an IO", runnable.getError() instanceof IOException); } - - @Test - public void testIOInClose() throws IOException { - final InputStream is = Mockito.mock(InputStream.class); - Mockito.when(is.read()).thenReturn(-1); - Mockito.doThrow(new IOException()).when(is).close(); - final ForwardingRunnable runnable = new ForwardingRunnable(SinkOutput.INSTANCE, - is); - // Runnable should close immediatly. - runnable.run(); - assertTrue("Error should be an IO", runnable.getError() instanceof IOException); - } }