Example #1
0
            public void Should_Use_Default_AppDomainUsage_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.Equal(settings.AppDomainUsage, NUnitAppDomainUsage.Default);
            }
Example #2
0
            public void Should_Use_Single_Process_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.Equal(settings.Process, NUnitProcessOption.Single);
            }
Example #3
0
            public void Should_Not_Use_SingleThreadedApartment_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.False(settings.UseSingleThreadedApartment);
            }
Example #4
0
            public void Should_Enable_Shadow_Copying_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.True(settings.ShadowCopy);
            }
Example #5
0
        public virtual void OneTimeSetUp()
        {
            var settings = new NUnitSettings(TestContext.Parameters);

            //TODO Make it switchable between different factories
            var notepadFactory = new NotepadElementFactory();

            this.testContext = Context.Create(settings, notepadFactory);
        }
Example #6
0
        private void NUnit2Test(List <FilePath> assemblies, FilePath outputFile, string excludeFilter)
        {
            var settings = new NUnitSettings
            {
                NoLogo      = true,
                NoResults   = IsInteractiveBuild,
                ResultsFile = outputFile,
                Exclude     = excludeFilter
            };

            var runner = new NUnitRunner(_fileSystem, _environment, _processRunner, _tools);

            runner.Run(assemblies, settings);
        }
Example #7
0
    static NUnitSettings BuildNUnitSettings(ParsedProject projectUnderTest, AnyUnitTestSettings settings,
                                            DirectoryPath outputDir)
    {
        var s = new NUnitSettings();

        XBuildHelper.ApplyToolSettings(s, NUnitToolArgs);

        if (settings.ExcludedCategories.Count > 0)
        {
            s.Exclude = string.Join(",", settings.ExcludedCategories);
        }
        if (settings.IncludedCategories.Count > 0)
        {
            s.Include = string.Join(",", settings.IncludedCategories);
        }
        s.ShadowCopy = settings.ShadowCopyAssemblies;
        s.UseSingleThreadedApartment = settings.UseSingleThreadedApartment;
        s.X86         = settings.ForceX86 || projectUnderTest.Platform == PlatformTarget.x86;
        s.ResultsFile = outputDir.CombineWithFilePath(projectUnderTest.Project.AssemblyName + ".nunit2.xml");
        return(s);
    }
Example #8
0
 public static void UITest (this ICakeContext context, FilePath testsAssembly, NUnitSettings nunitSettings = null)
 {            
     // Run UITests via NUnit
     context.NUnit (new [] { testsAssembly }, nunitSettings ?? new NUnitSettings ());
 }
 public static void UITest(this ICakeContext context, FilePath testsAssembly, NUnitSettings nunitSettings = null)
 {
     // Run UITests via NUnit
     context.NUnit(new[] { testsAssembly }, nunitSettings ?? new NUnitSettings());
 }