Esempio n. 1
0
        public void Write_FailWithNoGlobalLatestCells()
        {
            var dir = new SubGridDirectory();

            Action act = () => dir.Write(new BinaryWriter(new MemoryStream(Consts.TREX_DEFAULT_MEMORY_STREAM_CAPACITY_ON_CREATION)));

            act.Should().Throw <TRexSubGridIOException>().WithMessage("Cannot write sub grid directory without global latest values available");
        }
Esempio n. 2
0
        public void Creation()
        {
            var dir = new SubGridDirectory();

            dir.ExistsInPersistentStore.Should().BeFalse();
            dir.GlobalLatestCells.Should().BeNull();
            dir.IsMutable.Should().BeFalse();
            dir.SegmentDirectory.Should().NotBeNull();
        }
Esempio n. 3
0
        public void Write_FailWithNoSegmentsInDirectory()
        {
            var dir = new SubGridDirectory();

            dir.AllocateGlobalLatestCells();

            Action act = () => dir.Write(new BinaryWriter(new MemoryStream(Consts.TREX_DEFAULT_MEMORY_STREAM_CAPACITY_ON_CREATION)));

            act.Should().Throw <TRexSubGridIOException>().WithMessage("Writing a segment directory with no segments");
        }