Exemplo n.º 1
0
        public void GetProjectPaths_Returns_Paths_Included_Glob_Patterns()
        {
            var subject = new ProjectSearchProvider(CreateFileSystem()
                                                    , new Mock <ILogger>().Object
                                                    , new OptionsProvider(new RunOptions
            {
                SourceDirectories = { "/src" },
                IncludeGlobs      = { "/src/core/*.csproj" },
                ExcludeGlobs      = { }
            }, new Mock <IDirectory>().Object));

            subject.GetProjectPaths().ShouldBe(new[]
            {
                "/src/core/diagnostics.csproj",
                "/src/core/logging.csproj",
                "/src/core/security.csproj"
            });
        }
Exemplo n.º 2
0
        public void GetProjectPaths_Returns_Paths_Filtered_By_Excluded_Glob_Patterns()
        {
            var subject = new ProjectSearchProvider(CreateFileSystem()
                                                    , new Mock <ILogger>().Object
                                                    , new OptionsProvider(new RunOptions
            {
                SourceDirectories = { "/src" },
                IncludeGlobs      = { "/src/**/*.csproj" },
                ExcludeGlobs      = { "/**/logging*" }
            }, new FileSystem().Directory));

            subject.GetProjectPaths().ShouldBe(new[]
            {
                "/src/core/diagnostics.csproj",
                "/src/core/security.csproj",
                "/src/services/dataAccess.csproj",
                "/src/services/workQueue.csproj"
            });
        }