/// public void RunFinished(ITestResult testResults)
/// {
/// Debug.Log($"Run finished with result {testResults.ResultState}.");
/// }
///
/// public void TestStarted(ITest test)
/// {
///
/// }
///
/// public void TestFinished(ITestResult result)
/// {
///
/// }
///}
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Assembly)]
publicclassTestRunCallbackAttribute:Attribute
{
privateTypem_Type;
/// <summary>
/// Constructs a new instance of the <see cref="TestRunCallbackAttribute"/> class.
/// </summary>
/// <param name="type">A target type that implements <see cref="ITestRunCallback"/>.</param>
/// <exception cref="ArgumentException">Throws an ArgumentException if the provided type does not implement <see cref="ITestRunCallback"/>.</exception>
publicTestRunCallbackAttribute(Typetype)
{
varinterfaceType=typeof(ITestRunCallback);
if(!interfaceType.IsAssignableFrom(type))
{
thrownewArgumentException(string.Format(
"Type {2} provided to {0} does not implement {1}. If the stripping level is set to high, the implementing class should have the {3}.",