public PersistantQueueIntegrationTests()
 {
     _path = Path.GetTempFileName();
     File.Delete(_path);
     _path = _path.Remove(_path.Length - 4, 4);
     Directory.CreateDirectory(_path);
     _queue = new PersistantQueue(_path, "TestQueue");
     _queue.Open();
 }
 public MeassuredIntegrationTest()
 {
     _path = Path.GetTempFileName();
     File.Delete(_path);
     _path = _path.Remove(_path.Length - 4, 4);
     Directory.CreateDirectory(_path);
     _queue = new PersistantQueue(_path, "TestQueue");
     _queue.MaxFileSizeInBytes = 50000000;
     _queue.Open();
 }
        public void Peeking_from_an_empty_queue_should_return_zero_records()
        {
            var qfm = Substitute.For<IQueueFileManager>();
            var reader = Substitute.For<IPersistantQueueFileReader>();
            qfm.OpenCurrentReadFile().Returns(reader);
            var messages = new List<byte[]>();

            var sut = new PersistantQueue(qfm);
            sut.Open();
            sut.Peek(messages, 100);

            messages.Should().BeEmpty();
        }