2
0

BasicFluentAssertionTests.cs 826 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using TerminalGuiFluentAssertions;
  7. namespace UnitTests.FluentTests;
  8. public class BasicFluentAssertionTests
  9. {
  10. [Fact]
  11. public void GuiTestContext_StartsAndStopsWithoutError ()
  12. {
  13. var context = With.A<Window> (40, 10);
  14. // No actual assertions are needed — if no exceptions are thrown, it's working
  15. context.Stop ();
  16. }
  17. [Fact]
  18. public void Test ()
  19. {
  20. var myView = new TextField () { Width = 10 };
  21. /*
  22. using var ctx = With.A<Window> (20, 10)
  23. .Add (myView, 3, 2)
  24. .Focus (myView)
  25. .Type ("Hello");
  26. Assert.Equal ("Hello", myView.Text);*/
  27. }
  28. }