Ejemplo n.º 1
0
        public void TryWrite_should_release_buffer_to_pool_when_record_serialization_fails()
        {
            recordSerializer
            .TrySerialize(item, itemSerializer, timestamp, buffer)
            .Returns(false);

            TryWrite();

            bufferPool.Received(1).Release(buffer);
        }
Ejemplo n.º 2
0
        public void Should_release_the_buffer_back_to_pool()
        {
            sink.Put(Stream, _ => {});

            pool.Received(1).Release(buffer);
        }