本文整理汇总了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);
}
}
示例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>();
}
示例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";
}
示例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;
}
示例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;
}
示例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;
}
示例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";
}
}
示例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;
}
示例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;
}
示例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;
}
示例11: TestStarted
public void TestStarted(TestName testName)
{
log(" • {0}".Fmt(testName.Name));
}
示例12: TestResult
/// <summary>
/// Construct a TestResult given a TestName
/// </summary>
/// <param name="testName">A TestName</param>
public TestResult(TestName testName)
: this(new TestInfo( testName ))
{
}
示例13: TestStarted
public void TestStarted(TestName testName)
{
mPerfCollector.Collect(false, testName.FullName);
}
示例14:
void EventListener.TestStarted(TestName testName)
{
this.FireTestStarting( testName );
}
示例15: SuiteStarted
public void SuiteStarted(TestName testName)
{
}