예제 #1
0
        public SolutionDriver(
            NuGetConfigGenerator nuGetConfigGenerator,
            TestRunConfiguration testRunConfiguration,
            ProjectBuilderFactory projectBuilderFactory,
            Folders folders,
            TestProjectFolders testProjectFolders,
            SolutionNamingConvention solutionNamingConvention)
        {
            _nuGetConfigGenerator  = nuGetConfigGenerator;
            _testRunConfiguration  = testRunConfiguration;
            _projectBuilderFactory = projectBuilderFactory;
            _folders = folders;
            _solutionNamingConvention = solutionNamingConvention;
            NuGetSources = new List <NuGetSource>
            {
                new NuGetSource("LocalSpecFlowDevPackages", _folders.NuGetFolder),
                new NuGetSource("SpecFlow CI", "https://www.myget.org/F/specflow/api/v3/index.json"),
                new NuGetSource("SpecFlow Unstable", "https://www.myget.org/F/specflow-unstable/api/v3/index.json")
            };

            if (testRunConfiguration.UnitTestProvider == UnitTestProvider.SpecRun)
            {
                NuGetSources.Add(new NuGetSource("SpecFlow CI", "https://www.myget.org/F/specflow/api/v3/index.json"));
                NuGetSources.Add(new NuGetSource("SpecFlow Unstable", "https://www.myget.org/F/specflow-unstable/api/v3/index.json"));
            }
            if (testRunConfiguration.TargetFramework == TargetFramework.Net50 && testRunConfiguration.UnitTestProvider == UnitTestProvider.NUnit3)
            {
                //NUnit is not supporting .NET 5 in the latest release (3.12.0), so add the myget feed for the pre-release versions
                NuGetSources.Add(new NuGetSource("NUnit Dev", "https://www.myget.org/F/nunit/api/v3/index.json"));
            }

            _solution = new Solution(SolutionName);
            testProjectFolders.PathToSolutionFile = Path.Combine(_folders.FolderToSaveGeneratedSolutions, SolutionName, $"{SolutionName}.sln");
        }
예제 #2
0
        public SolutionDriver(
            NuGetConfigGenerator nuGetConfigGenerator,
            TestRunConfiguration testRunConfiguration,
            ProjectBuilderFactory projectBuilderFactory,
            Folders folders,
            TestProjectFolders testProjectFolders,
            SolutionNamingConvention solutionNamingConvention)
        {
            _nuGetConfigGenerator  = nuGetConfigGenerator;
            _testRunConfiguration  = testRunConfiguration;
            _projectBuilderFactory = projectBuilderFactory;
            _folders = folders;
            _solutionNamingConvention = solutionNamingConvention;
            NuGetSources = new List <NuGetSource>
            {
                new NuGetSource("LocalSpecFlowDevPackages", _folders.NuGetFolder)
            };

            if (testRunConfiguration.UnitTestProvider == UnitTestProvider.SpecRun)
            {
                NuGetSources.Add(new NuGetSource("SpecFlow CI", "https://www.myget.org/F/specflow/api/v3/index.json"));
                NuGetSources.Add(new NuGetSource("SpecFlow Unstable", "https://www.myget.org/F/specflow-unstable/api/v3/index.json"));
            }

            _solution = new Solution(SolutionName);
            testProjectFolders.PathToSolutionFile = Path.Combine(_folders.FolderToSaveGeneratedSolutions, SolutionName, $"{SolutionName}.sln");
        }
 public SolutionDriver(NuGetConfigGenerator nuGetConfigGenerator, TestRunConfiguration testRunConfiguration, ProjectBuilderFactory projectBuilderFactory, Folders folders, NuGet nuGet, TestProjectFolders testProjectFolders, Compiler compiler, IOutputWriter outputWriter)
 {
     _nuGetConfigGenerator  = nuGetConfigGenerator;
     _testRunConfiguration  = testRunConfiguration;
     _projectBuilderFactory = projectBuilderFactory;
     _folders            = folders;
     _nuGet              = nuGet;
     _testProjectFolders = testProjectFolders;
     _compiler           = compiler;
     _outputWriter       = outputWriter;
     NuGetSources        = new List <NuGetSource>
     {
         new NuGetSource("LocalSpecFlowDevPackages", _folders.NuGetFolder),
         new NuGetSource("SpecFlow CI", "https://www.myget.org/F/specflow/api/v3/index.json")
     };
     _solution = new Solution(SolutionName);
     testProjectFolders.PathToSolutionFile = Path.Combine(_folders.FolderToSaveGeneratedSolutions, SolutionName, $"{SolutionName}.sln");
 }
예제 #4
0
 public NuGetConfigGeneratorTests()
 {
     _nuGetConfigGenerator = new NuGetConfigGenerator();
 }