MainLoopTTests.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System;
  2. using System.Collections.Concurrent;
  3. using System.Collections.Generic;
  4. using Moq;
  5. namespace UnitTests.ApplicationTests;
  6. public class MainLoopTTests
  7. {
  8. //[Fact]
  9. //public void MainLoopT_NotInitialized_Throws()
  10. //{
  11. // var m = new MainLoop<int> ();
  12. // Assert.Throws<NotInitializedException> (() => m.TimedEvents);
  13. // Assert.Throws<NotInitializedException> (() => m.InputBuffer);
  14. // Assert.Throws<NotInitializedException> (() => m.InputProcessor);
  15. // Assert.Throws<NotInitializedException> (() => m.Out);
  16. // Assert.Throws<NotInitializedException> (() => m.AnsiRequestScheduler);
  17. // Assert.Throws<NotInitializedException> (() => m.WindowSizeMonitor);
  18. // var componentFactory = new Mock<IComponentFactory<int>> ();
  19. // componentFactory.Setup (
  20. // c => c.CreateWindowSizeMonitor (
  21. // It.IsAny<IConsoleOutput> (),
  22. // It.IsAny<IOutputBuffer> ()))
  23. // .Returns (Mock.Of <IWindowSizeMonitor>());
  24. // m.Initialize (new TimedEvents (),
  25. // new ConcurrentQueue<int> (),
  26. // Mock.Of <IInputProcessor>(),
  27. // Mock.Of<IConsoleOutput>(),
  28. // componentFactory.Object
  29. // );
  30. // Assert.NotNull (m.TimedEvents);
  31. // Assert.NotNull (m.InputBuffer);
  32. // Assert.NotNull (m.InputProcessor);
  33. // Assert.NotNull (m.Out);
  34. // Assert.NotNull (m.AnsiRequestScheduler);
  35. // Assert.NotNull (m.WindowSizeMonitor);
  36. //}
  37. }