예제 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void shouldWriteOnNettyChannel()
        public virtual void ShouldWriteOnNettyChannel()
        {
            // given
            SimpleNettyChannel channel = new SimpleNettyChannel(_nettyChannel, NullLog.Instance);

            // when
            object        msg           = new object();
            Future <Void> writeComplete = channel.Write(msg);

            // then
            assertNull(_nettyChannel.readOutbound());
            assertFalse(writeComplete.Done);

            // when
            _nettyChannel.flush();

            // then
            assertTrue(writeComplete.Done);
            assertEquals(msg, _nettyChannel.readOutbound());
        }