mil.dod.th.ose.rxtxtty/test/mil/dod/th/ose/rxtxtty/TestRxtxInputStreamWrapper.java
@Test
    public void testReturnZero() throws IOException
    {
        byte[] bytes = new byte[3];
        when(m_In.read(bytes, 0, 3)).thenReturn(0);
        
        try
        {
            m_SUT.read(bytes);
            fail("expecting exception, 0 should throw an exception.");
        }
        catch(TimeoutException e)
        {
            //expected
        }
    }
/**
     * Verify exception is throw if 0 is returned.
     */
Verify exception is throw if 0 is returned.
Verify exception is throw if 0 is returned .
@Test
    public void testReturnZero() throws IOException
    {
        byte[] bytes = new byte[3];
        when(m_In.read(bytes, 0, 3)).thenReturn(0);
        try
        {
            m_SUT.read(bytes);
            fail("expecting exception, 0 should throw an exception.");
        }
        catch(TimeoutException e)
        {
        }
    }
@ Test public void testReturnZero ( ) throws IOException { byte [ ] bytes = new byte [ 3 ] ; when ( m_In . read ( bytes , 0 , 3 ) ) . thenReturn ( 0 ) ; try { m_SUT . read ( bytes ) ; fail ( "expecting exception, 0 should throw an exception." ) ; } catch ( TimeoutException e ) { } }
Verify exception is throw if 0 is returned.
Verify exception is throw if 0 is returned .
//expected