You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
965 B
C#
34 lines
965 B
C#
|
|
using System.Collections;
|
|
using NUnit.Framework.Interfaces;
|
|
using NUnit.Framework.Internal;
|
|
using NUnit.Framework.Internal.Commands;
|
|
|
|
namespace UnityEngine.TestRunner.NUnitExtensions.Runner
|
|
{
|
|
internal class FailCommand : TestCommand, IEnumerableTestMethodCommand
|
|
{
|
|
private ResultState m_ResultState;
|
|
private string m_Message;
|
|
|
|
public FailCommand(Test test, ResultState resultState, string message)
|
|
: base(test)
|
|
{
|
|
m_ResultState = resultState;
|
|
m_Message = message;
|
|
}
|
|
|
|
public override TestResult Execute(ITestExecutionContext context)
|
|
{
|
|
context.CurrentResult.SetResult(m_ResultState, m_Message);
|
|
return context.CurrentResult;
|
|
}
|
|
|
|
public IEnumerable ExecuteEnumerable(ITestExecutionContext context)
|
|
{
|
|
context.CurrentResult.SetResult(m_ResultState, m_Message);
|
|
yield return null;
|
|
}
|
|
}
|
|
|
|
} |