MockConsole.cs 976 B

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using System.Threading;
  3. using System.Collections.Generic;
  4. using System.Text;
  5. namespace OpenSim.Framework.Console
  6. {
  7. /// <summary>
  8. /// This is a Fake console that's used when setting up the Scene in Unit Tests
  9. /// Don't use this except for Unit Testing or you're in for a world of hurt when the
  10. /// sim gets to ReadLine
  11. /// </summary>
  12. public class MockConsole : CommandConsole
  13. {
  14. public MockConsole(string defaultPrompt) : base(defaultPrompt)
  15. {
  16. }
  17. public override void Output(string text)
  18. {
  19. }
  20. public override void Output(string text, string level)
  21. {
  22. }
  23. public override string ReadLine(string p, bool isCommand, bool e)
  24. {
  25. //Thread.CurrentThread.Join(1000);
  26. return string.Empty;
  27. }
  28. public override void UnlockOutput()
  29. {
  30. }
  31. public override void LockOutput()
  32. {
  33. }
  34. }
  35. }