Exemplo n.º 1
0
        private static void SendToChannel(GetIndexFilesRequest expectedIndexSnapshotRequest, EmbeddedChannel embeddedChannel)
        {
            embeddedChannel.writeOutbound(expectedIndexSnapshotRequest);

            ByteBuf @object = embeddedChannel.readOutbound();

            embeddedChannel.writeInbound(@object);
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test public void getsTransmitted()
        public virtual void GetsTransmitted()
        {
            // given
            GetIndexFilesRequest expectedIndexSnapshotRequest = new GetIndexFilesRequest(_expectedStore, EXEPCTED_INDEX_ID, EXPECTED_LAST_TRANSACTION.Value);

            // when
            SendToChannel(expectedIndexSnapshotRequest, _embeddedChannel);

            // then
            GetIndexFilesRequest actualIndexRequest = _embeddedChannel.readInbound();

            assertEquals(_expectedStore, actualIndexRequest.ExpectedStoreId());
            assertEquals(EXEPCTED_INDEX_ID, actualIndexRequest.IndexId());
            assertEquals(EXPECTED_LAST_TRANSACTION.Value, actualIndexRequest.RequiredTransactionId());
        }
Exemplo n.º 3
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: protected void decode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf in, java.util.List<Object> out) throws Exception
            protected internal override void Decode(ChannelHandlerContext ctx, ByteBuf @in, IList <object> @out)
            {
                GetIndexFilesRequest getIndexFilesRequest = (new IndexSnapshotRequestMarshall()).Unmarshal0(new NetworkReadableClosableChannelNetty4(@in));

                @out.Add(getIndexFilesRequest);
            }