public void TagsAreNotReWrittenOnOpen() { var tags = new[] { "alpha", "beta", "charlie", "delta", "echo", "foxtrot", "golf" }; foreach (var tag in tags) { _cache.AddOrGet(tag); } _cache.Dispose(); _cache = null; using (var opened = new TagsCache()) { opened.Open(_path); opened.Dispose(); } using (var file = new RecordStream <int>()) { file.Open(_path); file.DeclareRecordType(0, typeof(TagStorageClass)); Assert.That(file.ReadRecords <TagStorageClass>().Count(t => t.Tag == "charlie"), Is.EqualTo(1)); } }
private void DeclareRecordType() { _file.DeclareRecordType(0, typeof(PathStorageClass)); }