/
TON618OFF
/
Unity-Project-RTU
Обзор
Документация
Войти
/
TON618OFF
/
Unity-Project-RTU
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
Library/PackageCache/com.unity.test-framework@1.1.33/UnityEngine.TestRunner/NUnitExtensions/Runner/FailCommand.cs
33 строки
965 B
TON618OFF
release
03 окт 2024, 22:20
03 окт 2024, 22:20
7c70e9f
Код
Авторство
О чём код?
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; } } }