UnexpectedLogMessageException.cs 744 B

1234567891011121314151617181920212223242526272829
  1. using NUnit.Framework;
  2. using NUnit.Framework.Interfaces;
  3. using UnityEngine.TestTools.Logging;
  4. namespace UnityEngine.TestTools.TestRunner
  5. {
  6. internal class UnexpectedLogMessageException : ResultStateException
  7. {
  8. public LogMatch LogEvent;
  9. public UnexpectedLogMessageException(LogMatch log)
  10. : base(BuildMessage(log))
  11. {
  12. LogEvent = log;
  13. }
  14. private static string BuildMessage(LogMatch log)
  15. {
  16. return string.Format("Expected log did not appear: {0}", log);
  17. }
  18. public override ResultState ResultState
  19. {
  20. get { return ResultState.Failure; }
  21. }
  22. public override string StackTrace { get { return null; } }
  23. }
  24. }