//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldFlush() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldFlush() { PackOutput output = mock(typeof(PackOutput)); Org.Neo4j.Bolt.messaging.Neo4jPack_Packer packer = mock(typeof(Org.Neo4j.Bolt.messaging.Neo4jPack_Packer)); BoltResponseMessageWriterV1 writer = NewWriter(output, packer); writer.Flush(); verify(packer).flush(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private <T extends org.neo4j.bolt.messaging.ResponseMessage> T serializeAndDeserialize(T msg) throws java.io.IOException private T SerializeAndDeserialize <T>(T msg) where T : Org.Neo4j.Bolt.messaging.ResponseMessage { RecordingByteChannel channel = new RecordingByteChannel(); BoltResponseMessageReader reader = new BoltResponseMessageReader(_neo4jPack.newUnpacker((new BufferedChannelInput(16)).reset(channel))); BufferedChannelOutput output = new BufferedChannelOutput(channel); BoltResponseMessageWriterV1 writer = new BoltResponseMessageWriterV1(_neo4jPack.newPacker, output, NullLogService.Instance); writer.Write(msg); writer.Flush(); channel.Eof(); return(Unpack(reader, channel)); }