With.cs 838 B

1234567891011121314151617181920212223242526
  1. using Terminal.Gui;
  2. namespace TerminalGuiFluentTesting;
  3. /// <summary>
  4. /// Entry point to fluent assertions.
  5. /// </summary>
  6. public static class With
  7. {
  8. /// <summary>
  9. /// Entrypoint to fluent assertions
  10. /// </summary>
  11. /// <param name="width"></param>
  12. /// <param name="height"></param>
  13. /// <param name="v2TestDriver">Which v2 v2TestDriver to use for the test</param>
  14. /// <returns></returns>
  15. public static GuiTestContext A<T> (int width, int height, V2TestDriver v2TestDriver) where T : Toplevel, new ()
  16. {
  17. return new (() => new T (), width, height,v2TestDriver);
  18. }
  19. /// <summary>
  20. /// The global timeout to allow for any given application to run for before shutting down.
  21. /// </summary>
  22. public static TimeSpan Timeout { get; set; } = TimeSpan.FromSeconds (30);
  23. }