当前位置: 首页>>代码示例>>C#>>正文


C# Core.TestName类代码示例

本文整理汇总了C#中NUnit.Core.TestName的典型用法代码示例。如果您正苦于以下问题:C# TestName类的具体用法?C# TestName怎么用?C# TestName使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TestName类属于NUnit.Core命名空间,在下文中一共展示了TestName类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: TestStarted

 /// <summary>
 /// Called when a test case is starting
 /// </summary>
 /// <param name="testName">The name of the test case</param>
 public void TestStarted(TestName testName)
 {
     if (this.eventListener != null)
     {
         this.eventListener.TestStarted(testName);
     }
 }
开发者ID:ssboisen,项目名称:AutoFixture,代码行数:11,代码来源:EventListenerWrapper.cs

示例2: SetUp

 public void SetUp()
 {
     testCommand = MockRepository.GenerateStub<ITestCommand>();
     testName = new TestName { TestID = new TestID(), FullName = "fullName" };
     var testCommandsByTestName = new Dictionary<TestName, ITestCommand> { { testName, testCommand } };
     testFilter = new NUnitTestFilter(testCommandsByTestName);
     test = MockRepository.GenerateStub<ITest>();
 }
开发者ID:dougrathbone,项目名称:mbunit-v3,代码行数:8,代码来源:NUnitTestFilterTest.cs

示例3: AggregatingTestRunner

 public AggregatingTestRunner(int runnerID)
 {
     this.runnerID = runnerID;
     this.testName = new TestName();
     testName.TestID = new TestID(AggregateTestID);
     testName.RunnerID = this.runnerID;
     testName.FullName = testName.Name = "Not Loaded";
 }
开发者ID:kurman,项目名称:mt-nunit-console,代码行数:8,代码来源:AggregatingTestRunner.cs

示例4: Test

		/// <summary>
		/// Constructs a test given its name
		/// </summary>
		/// <param name="name">The name of the test</param>
		protected Test( string name )
		{
			this.testName = new TestName();
			this.testName.FullName = name;
			this.testName.Name = name;
			this.testName.TestID = new TestID();

            this.runState = RunState.Runnable;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:13,代码来源:Test.cs

示例5: Test

        /// <summary>
        /// Constructs a test given the path through the
        /// test hierarchy to its parent and a name.
        /// </summary>
        /// <param name="pathName">The parent tests full name</param>
        /// <param name="name">The name of the test</param>
        protected Test( string pathName, string name )
        {
            this.testName = new TestName();
            this.testName.FullName = pathName == null || pathName == string.Empty
                ? name : pathName + "." + name;
            this.testName.Name = name;
            this.testName.TestID = new TestID();

            this.runState = RunState.Runnable;
        }
开发者ID:scottwis,项目名称:eddie,代码行数:16,代码来源:Test.cs

示例6: BuildError

        private TestResult BuildError(Exception e, TestConsoleAccess consoleAccess)
        {
            TestName testName = new TestName();
            testName.Name = mPNUnitTestInfo.TestName;
            testName.FullName = mPNUnitTestInfo.TestName;
            testName.TestID = new TestID();

            TestResult result = new PNUnitTestResult(testName, consoleAccess.GetTestOutput());
            result.Error(e);
            return result;
        }
开发者ID:bogavante,项目名称:AutoMapper,代码行数:11,代码来源:PNUnitTestRunner.cs

示例7: TestStarted

        public void TestStarted(TestName testName)
        {
            TestCase ourCase = testConverter.GetCachedTestCase(testName.UniqueName);

            // Simply ignore any TestName not found in the cache
            if (ourCase != null)
            {
                this.testLog.RecordStart(ourCase);
                // Output = testName.FullName + "\r";
            }

        }
开发者ID:methosat,项目名称:nunit-vs-adapter,代码行数:12,代码来源:NUnitEventListener.cs

示例8: TestInfo

		/// <summary>
		/// Construct from an ITest
		/// </summary>
		/// <param name="test">Test from which a TestNode is to be constructed</param>
		public TestInfo( ITest test )
		{
			this.testName = (TestName)test.TestName.Clone();
			this.testType = test.TestType;

            this.runState = test.RunState;
			this.ignoreReason = test.IgnoreReason;
			this.description = test.Description;
			this.isSuite = test.IsSuite;

			if (test.Categories != null) 
				this.categories.AddRange(test.Categories);
			if (test.Properties != null)
			{
				this.properties = new ListDictionary();
				foreach( DictionaryEntry entry in test.Properties )
					this.properties.Add( entry.Key, entry.Value );
			}

			this.testCaseCount = test.TestCount;
		}
开发者ID:Phaiax,项目名称:dotnetautoupdate,代码行数:25,代码来源:TestInfo.cs

示例9: MockTest

        public static ITest MockTest(string name, ITest parentFixture)
        {
            var m = new Mock<ITest>();

            var tn = new TestName
                {
                    FullName = name,
                    Name = name
                };
            var ptn = new TestName
                {
                    FullName = parentFixture.TestName.FullName,
                    Name = parentFixture.TestName.Name,
                };


            m.Setup(_ => _.TestName).Returns(tn);
            m.Setup(_ => _.Parent.TestName).Returns(ptn);
            m.Setup(_ => _.TestType).Returns("Test");
            return m.Object;
        }
开发者ID:Refresh06,项目名称:visualmutator,代码行数:21,代码来源:TestWrapperMocking.cs

示例10: MockTestFixture

        public static ITest MockTestFixture(string name, string namespaceName)
        {
            var m = new Mock<ITest>();

            var tn = new TestName
                {
                    FullName = name,
                    Name = name
                };
            var ptn = new TestName
                {
                    FullName = namespaceName,
                    Name = namespaceName
                };


            m.Setup(_ => _.TestName).Returns(tn);
            m.Setup(_ => _.Parent.TestName).Returns(ptn);
            m.Setup(_ => _.Tests).Returns(new ArrayList());
            m.Setup(_ => _.TestType).Returns("TestFixture");
            return m.Object;
        }
开发者ID:Refresh06,项目名称:visualmutator,代码行数:22,代码来源:TestWrapperMocking.cs

示例11: TestStarted

 public void TestStarted(TestName testName)
 {
     log(" • {0}".Fmt(testName.Name));
 }
开发者ID:RT-Projects,项目名称:RT.NUnitDirect,代码行数:4,代码来源:Direct.cs

示例12: TestResult

 /// <summary>
 /// Construct a TestResult given a TestName
 /// </summary>
 /// <param name="testName">A TestName</param>
 public TestResult(TestName testName)
     : this(new TestInfo( testName ))
 {
 }
开发者ID:julianhaslinger,项目名称:shouldly,代码行数:8,代码来源:TestResult.cs

示例13: TestStarted

 public void TestStarted(TestName testName)
 {
     mPerfCollector.Collect(false, testName.FullName);
 }
开发者ID:jeromerg,项目名称:nunit-monitor,代码行数:4,代码来源:NunitMonitorAddin.cs

示例14:

 void EventListener.TestStarted(TestName testName)
 {
     this.FireTestStarting( testName );
 }
开发者ID:Phaiax,项目名称:dotnetautoupdate,代码行数:4,代码来源:MockTestEventSource.cs

示例15: SuiteStarted

 public void SuiteStarted(TestName testName)
 {
 }
开发者ID:jorgelusar,项目名称:sctestrunner,代码行数:3,代码来源:RunnerHandler.cs


注:本文中的NUnit.Core.TestName类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。