protected virtual void InstallSpecFlowPackages(string packagesFolder, ProjectChanger projectChanger) { var sourcePlatform = _options.SpecFlowVersion >= new Version("2.0") ? "net45" : "net35"; InstallNuGetPackage(projectChanger, packagesFolder, "SpecFlow", sourcePlatform, _options.SpecFlowPackageVersion); if (_options.SpecFlowVersion >= new Version("3.1")) { InstallNuGetPackage(projectChanger, packagesFolder, "Cucumber.Messages", dependency: true, packageVersion: "6.0.1"); InstallNuGetPackage(projectChanger, packagesFolder, "Google.Protobuf", dependency: true, packageVersion: "3.7.0"); } if (_options.SpecFlowVersion >= new Version("3.0.188")) { InstallNuGetPackage(projectChanger, packagesFolder, "BoDi", dependency: true, packageVersion: "1.4.1"); InstallNuGetPackage(projectChanger, packagesFolder, "Gherkin", dependency: true, packageVersion: "6.0.0"); InstallNuGetPackage(projectChanger, packagesFolder, "Utf8Json", "net45", dependency: true, packageVersion: "1.3.7"); InstallNuGetPackage(projectChanger, packagesFolder, "System.ValueTuple", "netstandard1.0", dependency: true); } else if (_options.SpecFlowVersion >= new Version("3.0")) { InstallNuGetPackage(projectChanger, packagesFolder, "BoDi", dependency: true, packageVersion: "1.4.0-alpha1"); InstallNuGetPackage(projectChanger, packagesFolder, "Gherkin", dependency: true, packageVersion: "6.0.0-beta1"); InstallNuGetPackage(projectChanger, packagesFolder, "Utf8Json", "net45", dependency: true, packageVersion: "1.3.7"); InstallNuGetPackage(projectChanger, packagesFolder, "System.ValueTuple", "netstandard1.0", dependency: true); } else if (_options.SpecFlowVersion >= new Version("2.3")) { InstallNuGetPackage(projectChanger, packagesFolder, "Newtonsoft.Json", dependency: true); InstallNuGetPackage(projectChanger, packagesFolder, "System.ValueTuple", "netstandard1.0", dependency: true); } }
protected virtual void SetSpecFlowUnitTestProvider(ProjectChanger projectChanger, string packagesFolder) { if (_options.SpecFlowVersion >= new Version("3.0")) { return; } projectChanger.SetSpecFlowConfig("unitTestProvider", "name", _options.UnitTestProvider); }
protected void InstallNuGetPackage(ProjectChanger projectChanger, string packagesFolder, string packageName, string sourcePlatform = "net45", string packageVersion = null, bool dependency = false) { var package = projectChanger.InstallNuGetPackage(packagesFolder, packageName, sourcePlatform, packageVersion, dependency); if (package != null) { InstalledNuGetPackages.Add(package); } }
protected override void SetSpecFlowUnitTestProvider(ProjectChanger projectChanger, string packagesFolder) { if (_options.SpecFlowVersion >= new Version("3.0.0")) { InstallNuGetPackage(projectChanger, packagesFolder, $"SpecFlow.{_options.UnitTestProvider}", "net45", _options.SpecFlowPackageVersion); return; } base.SetSpecFlowUnitTestProvider(projectChanger, packagesFolder); }
protected virtual void SetSpecFlowUnitTestProvider(ProjectChanger projectChanger, string packagesFolder) { if (_options.SpecFlowVersion >= new Version("3.0")) { var sourcePlatform = GetSpecFlowSourcePlatform(); ExecNuGetInstall("SpecFlow.Tools.MsBuild.Generation", packagesFolder, "-Version", _options.SpecFlowPackageVersion); InstallNuGetPackage(projectChanger, packagesFolder, "SpecFlow.Tools.MsBuild.Generation", sourcePlatform, _options.SpecFlowPackageVersion); ExecNuGetInstall("SpecFlow." + _options.UnitTestProvider, packagesFolder, "-Version", _options.SpecFlowPackageVersion); InstallNuGetPackage(projectChanger, packagesFolder, "SpecFlow." + _options.UnitTestProvider, sourcePlatform, _options.SpecFlowPackageVersion); return; } projectChanger.SetSpecFlowConfig("unitTestProvider", "name", _options.UnitTestProvider); }
protected override void InstallSpecFlowPackages(string packagesFolder, ProjectChanger projectChanger) { InstallNuGetPackage(projectChanger, packagesFolder, "SpecFlow.Tools.MsBuild.Generation", "net45", _options.SpecFlowPackageVersion); }