예제 #1
0
        protected virtual void SetSpecFlowUnitTestProvider(ProjectChanger projectChanger, string packagesFolder)
        {
            if (_options.SpecFlowVersion >= new Version("3.0"))
            {
                return;
            }

            projectChanger.SetSpecFlowConfig("unitTestProvider", "name", _options.UnitTestProvider);
        }
        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);
        }