jump-game/Jump Game/Library/PackageCache/com.unity.test-framework@1.0.13/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs

27 lines
710 B
C#
Raw Normal View History

2020-01-29 08:05:38 +00:00
using NUnit.Framework.Interfaces;
using NUnit.Framework.Internal;
using NUnit.Framework.Internal.Commands;
namespace UnityEngine.TestRunner.NUnitExtensions.Runner
{
internal class FailCommand : TestCommand
{
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;
}
}
}