public void FoldersShouldBeIncludedWhenSparseFolderDataIsEmpty()
        {
            SortedFolderEntries sfe  = SetupDefaultEntries();
            LazyUTF8String      name = ConstructLazyUTF8String("IsIncludedFalse");

            sfe.GetOrAddFolder(new[] { name }, partIndex: 0, parentIsIncluded: false, rootSparseFolderData: new SparseFolderData());
            ValidateFolder(sfe, name, isIncludedValue: true);
        }
 private static void AddFolders(SortedFolderEntries entries, params string[] names)
 {
     for (int i = 0; i < names.Length; i++)
     {
         LazyUTF8String entryString = ConstructLazyUTF8String(names[i]);
         entries.GetOrAddFolder(new[] { entryString }, partIndex: 0, parentIsIncluded: true, rootSparseFolderData: new SparseFolderData());
         ValidateFolder(entries, entryString, isIncludedValue: true);
     }
 }
        public void AddFolderWhereParentIncludedIsTrueAndChildIsNotIncluded()
        {
            SortedFolderEntries sfe              = SetupDefaultEntries();
            LazyUTF8String      name             = ConstructLazyUTF8String("ChildNotIncluded");
            SparseFolderData    sparseFolderData = new SparseFolderData();

            sparseFolderData.Children.Add("Child", new SparseFolderData());
            sfe.GetOrAddFolder(new[] { name }, partIndex: 0, parentIsIncluded: true, rootSparseFolderData: sparseFolderData);
            ValidateFolder(sfe, name, isIncludedValue: false);
        }
        public void AddFolderBelowTopLevelNotIncluded()
        {
            SortedFolderEntries sfe              = SetupDefaultEntries();
            LazyUTF8String      name             = ConstructLazyUTF8String("Child");
            LazyUTF8String      name2            = ConstructLazyUTF8String("GrandChild");
            SparseFolderData    sparseFolderData = new SparseFolderData();

            sparseFolderData.Children.Add("Child", new SparseFolderData());
            sfe.GetOrAddFolder(new[] { name, name2 }, partIndex: 1, parentIsIncluded: true, rootSparseFolderData: sparseFolderData);
            ValidateFolder(sfe, name2, isIncludedValue: false);
        }