本文整理汇总了C#中TestStatus类的典型用法代码示例。如果您正苦于以下问题:C# TestStatus类的具体用法?C# TestStatus怎么用?C# TestStatus使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TestStatus类属于命名空间,在下文中一共展示了TestStatus类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetTests
public List<Test> GetTests(TestStatus testStatus = TestStatus.Ready)
{
using (var context = GetContext())
{
return context.Tests.Where(t => t.Status == (byte)testStatus).ToList();
}
}
示例2: InvokeCurrentCallback
public static void InvokeCurrentCallback(string testName, TestStatus status, ExceptionDetails exceptionDetails, string traceLog)
{
if (_currentCallback == null)
return;
_currentCallback(testName, status, exceptionDetails, traceLog);
}
示例3: StepRunnerEventArgs
public StepRunnerEventArgs(Guid scenarioId, Guid criterionId, Guid stepId, DateTime now, double duration, TestStatus status, string screenShotUrl=null):
this(scenarioId, criterionId,stepId,now)
{
Duration = duration;
Status = status;
ScreenShotUrl = screenShotUrl;
}
示例4: ProjectFinishedRunning
public ProjectFinishedRunning(Guid projectId, TestStatus status, DateTime finishedAt, string screenShotUrl)
{
ProjectId = projectId;
Status = status;
FinishedAt = finishedAt;
ScreenShotUrl = screenShotUrl;
}
示例5: Run
public async Task<bool> Run()
{
this.Status = TestStatus.Running;
if (this.TestStatusChanged != null)
{
this.TestStatusChanged(this, new TestStatusChangedEventArgs(this.Status));
}
bool passed;
try
{
passed = await this.execution(this);
this.Status = passed ? TestStatus.Passed : TestStatus.Failed;
this.AddLog("Test {0}", this.Status);
}
catch (Exception ex)
{
this.AddLog("Test failed with exception: {0}", ex);
passed = false;
this.Status = TestStatus.Failed;
}
if (this.TestStatusChanged != null)
{
this.TestStatusChanged(this, new TestStatusChangedEventArgs(this.Status));
}
return passed;
}
示例6: TestResult
public TestResult(TestStatus status, string name, string message, IStackLine[] stackTrace)
{
_status = status;
_name = name;
_message = message;
_stackTrace = stackTrace;
}
示例7: queryByStatus
private TestResult[] queryByStatus(TestStatus status)
{
var query = from t in _testResults
where t.Status.Equals(status)
select t;
return query.ToArray();
}
示例8: Status_ConstructorWithTwoArguments_ReturnsConstructorArgumentStatus
public void Status_ConstructorWithTwoArguments_ReturnsConstructorArgumentStatus(TestStatus status)
{
// Arrange N/A
ResultState resultState = new ResultState(status, string.Empty);
Assert.AreEqual(status, resultState.Status);
}
示例9: ZumoTest
public ZumoTest(string name, TestExecution execution)
{
this.Name = name;
this.Data = new Dictionary<string, object>();
this.logs = new List<string>();
this.execution = execution;
this.Status = TestStatus.NotRun;
}
示例10: TestSuiteResult
public TestSuiteResult(TestStatus status, long timeTaken, uint total, uint passes, uint skipped)
{
Status = status;
TimeTaken = timeTaken;
Total = total;
Passes = passes;
Skipped = skipped;
}
示例11: TestedAttribute
/// <summary>
/// Default Constructor
/// </summary>
public TestedAttribute(string reference, string description, TestStatus status = TestStatus.Tested)
{
TestReference = reference;
TestDescription = description;
Status = status;
if (status == TestStatus.Undocumented)
throw new ArgumentException("TestStatus.Undocumented should not be used. This is for Audit purposes only.");
}
示例12: CriterionFinishedRunning
public CriterionFinishedRunning(Guid projectId, Guid scenarioId, Guid criterionId, TestStatus status, DateTime finishedAt, string screenShotUrl)
{
ProjectId = projectId;
ScenarioId = scenarioId;
CriterionId = criterionId;
Status = status;
FinishedAt = finishedAt;
ScreenShotUrl = screenShotUrl;
}
示例13: Reset
public void Reset()
{
this.logs.Clear();
this.Status = TestStatus.NotRun;
if (this.TestStatusChanged != null)
{
this.TestStatusChanged(this, new TestStatusChangedEventArgs(this.Status));
}
}
示例14: ScenarioFinishedRunning
public ScenarioFinishedRunning(Guid projectId, Guid scenarioId, string scenarioName, TestStatus status, DateTime finishedAt, string screenShotUrl)
{
ProjectId = projectId;
ScenarioId = scenarioId;
ScenarioName = scenarioName;
Status = status;
FinishedAt = finishedAt;
ScreenShotUrl = screenShotUrl;
}
示例15: GetTestStepFinished
private static TestStepFinished GetTestStepFinished(TestStatus testStatus)
{
var testStepRun = new TestStepRun(new TestStepData("id", "name", "fullName", "testId"))
{
Step = new TestStepData("id", "name", "fullName", "testId") { IsTestCase = true },
Result = new TestResult(new TestOutcome(testStatus))
};
return new TestStepFinished(null, testStepRun);
}