public void AddItemAtEnd() { SortedFolderEntries sfe = SetupDefaultEntries(); LazyUTF8String name = ConstructLazyUTF8String("{{shouldbeattheend"); sfe.AddFile(name, new byte[20]); sfe[GetDefaultEntriesLength()].Name.ShouldEqual(name, "Item added at incorrect index."); }
public void AddItemAtTheBeginning() { SortedFolderEntries sfe = SetupDefaultEntries(); LazyUTF8String name = ConstructLazyUTF8String("((shouldbeatthestart"); sfe.AddFile(name, new byte[20]); sfe[0].Name.ShouldEqual(name, "Item added at incorrect index."); }
private static void AddFiles(SortedFolderEntries entries, params string[] names) { for (int i = 0; i < names.Length; i++) { LazyUTF8String entryString = ConstructLazyUTF8String(names[i]); entries.AddFile(entryString, new byte[20]); } }
private static void AddFiles(SortedFolderEntries entries, params string[] names) { for (int i = 0; i < names.Length; i++) { LazyUTF8String entryString = ConstructLazyUTF8String(names[i]); entries.AddFile(entryString, new byte[20]); entries.TryGetValue(entryString, out FolderEntryData folderEntryData).ShouldBeTrue(); folderEntryData.ShouldNotBeNull(); folderEntryData.IsFolder.ShouldBeFalse(); } }