Example #1
0
        public void CanPinMultipleTimes()
        {
            _buffersList = new TransactionBuffersList(_bufferManager);

            var block = new Block(RandomFilename, 0);

            Assert.DoesNotThrow(() =>
            {
                _buffersList.Pin(block);
                _buffersList.Pin(block);
                _buffersList.Pin(block);
            });
        }
Example #2
0
        public void CanGetTransactionBuffer()
        {
            _buffersList = new TransactionBuffersList(_bufferManager);

            _ = _fileManager.Append(RandomFilename, out var block);

            Assert.DoesNotThrow(() =>
            {
                _buffersList.Pin(block);
            });

            var buffer = _buffersList.GetBuffer(block);

            Assert.IsNotNull(buffer);
        }
Example #3
0
 public void Pin(Block block)
 {
     _bufferList.Pin(block);
 }