No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

OutOfOrderExpectedLogMessageException.cs 853B

123456789101112131415161718192021222324252627
  1. using System;
  2. using NUnit.Framework;
  3. using NUnit.Framework.Interfaces;
  4. using UnityEngine.TestTools.Logging;
  5. namespace UnityEngine.TestTools.TestRunner
  6. {
  7. internal class OutOfOrderExpectedLogMessageException : ResultStateException
  8. {
  9. public OutOfOrderExpectedLogMessageException(LogEvent log, LogMatch nextExpected)
  10. : base(BuildMessage(log, nextExpected))
  11. {
  12. }
  13. private static string BuildMessage(LogEvent log, LogMatch nextExpected)
  14. {
  15. return $"Expected {log.LogType} with '{log.Message}' arrived out of order. Expected {nextExpected.LogType} with '{nextExpected.Message}' next.";
  16. }
  17. public override ResultState ResultState
  18. {
  19. get { return ResultState.Failure; }
  20. }
  21. public override string StackTrace { get { return null; } }
  22. }
  23. }