コード例 #1
0
ファイル: NUnitSettingsTests.cs プロジェクト: qhris/cake
            public void Should_Use_Default_AppDomainUsage_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.Equal(settings.AppDomainUsage, NUnitAppDomainUsage.Default);
            }
コード例 #2
0
ファイル: NUnitSettingsTests.cs プロジェクト: qhris/cake
            public void Should_Use_Single_Process_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.Equal(settings.Process, NUnitProcessOption.Single);
            }
コード例 #3
0
ファイル: NUnitSettingsTests.cs プロジェクト: qhris/cake
            public void Should_Not_Use_SingleThreadedApartment_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.False(settings.UseSingleThreadedApartment);
            }
コード例 #4
0
ファイル: NUnitSettingsTests.cs プロジェクト: qhris/cake
            public void Should_Enable_Shadow_Copying_By_Default()
            {
                // Given, When
                var settings = new NUnitSettings();

                // Then
                Assert.True(settings.ShadowCopy);
            }
コード例 #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);
        }
コード例 #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);
        }
コード例 #7
0
ファイル: UnitTestActions.cs プロジェクト: plcode7/AutoCake
    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);
    }
コード例 #8
0
ファイル: Aliases.cs プロジェクト: mouhamadi/Cake.Xamarin
 public static void UITest (this ICakeContext context, FilePath testsAssembly, NUnitSettings nunitSettings = null)
 {            
     // Run UITests via NUnit
     context.NUnit (new [] { testsAssembly }, nunitSettings ?? new NUnitSettings ());
 }
コード例 #9
0
 public static void UITest(this ICakeContext context, FilePath testsAssembly, NUnitSettings nunitSettings = null)
 {
     // Run UITests via NUnit
     context.NUnit(new[] { testsAssembly }, nunitSettings ?? new NUnitSettings());
 }