ZMWSLI0-SL2021-GR11/cw1/clock/Library/PackageCache/com.unity.test-framework@1.1.22/UnityEngine.TestRunner/Assertions/UnexpectedLogMessageException.cs

30 lines
744 B
C#
Raw Normal View History

2021-04-10 17:27:42 +02:00
using NUnit.Framework;
using NUnit.Framework.Interfaces;
using UnityEngine.TestTools.Logging;
namespace UnityEngine.TestTools.TestRunner
{
internal class UnexpectedLogMessageException : ResultStateException
{
public LogMatch LogEvent;
public UnexpectedLogMessageException(LogMatch log)
: base(BuildMessage(log))
{
LogEvent = log;
}
private static string BuildMessage(LogMatch log)
{
return string.Format("Expected log did not appear: {0}", log);
}
public override ResultState ResultState
{
get { return ResultState.Failure; }
}
public override string StackTrace { get { return null; } }
}
}