Example #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void testInMemoryLogChannel() throws Exception
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void TestInMemoryLogChannel()
        {
            InMemoryClosableChannel channel = new InMemoryClosableChannel();

            for (int i = 0; i < 25; i++)
            {
                channel.PutInt(i);
            }
            for (int i = 0; i < 25; i++)
            {
                assertEquals(i, channel.Int);
            }
            channel.Reset();
            for (long i = 0; i < 12; i++)
            {
                channel.PutLong(i);
            }
            for (long i = 0; i < 12; i++)
            {
                assertEquals(i, channel.Long);
            }
            channel.Reset();
            for (long i = 0; i < 8; i++)
            {
                channel.PutLong(i);
                channel.PutInt(( int )i);
            }
            for (long i = 0; i < 8; i++)
            {
                assertEquals(i, channel.Long);
                assertEquals(i, channel.Int);
            }
            channel.Dispose();
        }