public async Task CreateFolderAsync_IncludesFolderInProjectNonRecusively()
        {
            bool? result = null;
            var project = UnconfiguredProjectFactory.Create(filePath: @"C:\Root.csproj");
            var folderManager = IFolderManagerFactory.IncludeFolderInProjectAsync((path, recursive) => { result = recursive; return Task.CompletedTask; });

            var storage = CreateInstance(folderManager: folderManager, project: project);

            await storage.CreateFolderAsync("Folder");

            Assert.False(result);
        }
        public async Task CreateFolderAsync_IncludesFolderInProject()
        {
            string result        = null;
            var    project       = UnconfiguredProjectFactory.Create(filePath: @"C:\Root.csproj");
            var    folderManager = IFolderManagerFactory.IncludeFolderInProjectAsync((path, recursive) => { result = path; return(Task.CompletedTask); });

            var storage = CreateInstance(folderManager: folderManager, project: project);

            await storage.CreateFolderAsync("Folder");

            Assert.Equal(@"C:\Folder", result);
        }
        private PhysicalProjectTreeStorage CreateInstance(IProjectTreeService treeService = null, IProjectTreeProvider treeProvider = null, IFileSystem fileSystem = null, IFolderManager folderManager = null, UnconfiguredProject project = null)
        {
            treeService = treeService ?? IProjectTreeServiceFactory.Create(ProjectTreeParser.Parse("Root"));
            treeProvider = treeProvider ?? IProjectTreeProviderFactory.Create();
            fileSystem = fileSystem ?? IFileSystemFactory.Create();
            folderManager = folderManager ?? IFolderManagerFactory.Create();
            project = project ?? UnconfiguredProjectFactory.Create();

            return new PhysicalProjectTreeStorage(new Lazy<IProjectTreeService>(() => treeService),
                                                  new Lazy<IProjectTreeProvider>(() => treeProvider),
                                                  new Lazy<IFileSystem>(() => fileSystem),
                                                  ActiveConfiguredProjectFactory.ImplementValue(() => folderManager),
                                                  project);
        }