private void BinaryReadOnlyStorer_OneFile_Test(bool enableCompression, Func <BinaryReadOnlyStorerEntry, object> selectValue, object value)
        {
            IReadOnlyDataStorer       storer = BinaryReadOnlyStorer.FromData(enableCompression ? binaryOneFileDeflate : binaryOneFileStore);
            BinaryReadOnlyStorerEntry entry  = storer.Entries.FindOrDefault(e => e.Path == filePath1) as BinaryReadOnlyStorerEntry;

            Assert.AreEqual(value, selectValue(entry));
        }
        private void BinaryReadOnlyStorer_OneFile_Test(bool enableCompression)
        {
            IReadOnlyDataStorer       storer = BinaryReadOnlyStorer.FromData(enableCompression ? binaryOneFileDeflate : binaryOneFileStore);
            BinaryReadOnlyStorerEntry entry  = storer.Entries.FindOrDefault(e => e.Path == filePath1) as BinaryReadOnlyStorerEntry;

            Assert.NotNull(fileData.SequenceEqual(storer.Read(entry)));
        }
        private void BinaryReadOnlyStorer_TwoFiles_Test(bool enableCompression)
        {
            IReadOnlyDataStorer storer = BinaryReadOnlyStorer.FromData(enableCompression ? binaryTwoFilesDeflate : binaryTwoFilesStore);

            IReadOnlyList <IDataStorerEntry> entries = storer.Entries;
            BinaryReadOnlyStorerEntry        entry1  = entries.FindOrDefault(e => e.Path == filePath1) as BinaryReadOnlyStorerEntry;
            BinaryReadOnlyStorerEntry        entry2  = entries.FindOrDefault(e => e.Path == filePath2) as BinaryReadOnlyStorerEntry;

            Assert.NotNull(fileData.SequenceEqual(storer.Read(entry1)));
            Assert.NotNull(fileData.SequenceEqual(storer.Read(entry2)));
        }
 /// <inheritdoc/>
 protected override IReadOnlyDataStorer CreateReadOnlyDataStorer(byte[] data)
 {
     return(BinaryReadOnlyStorer.FromData(data));
 }
        public void BinaryReadOnlyStorer_Empty_NoEntries()
        {
            IReadOnlyDataStorer storer = BinaryReadOnlyStorer.FromData(new byte[0]);

            Assert.Zero(storer.Entries.Count);
        }