FrameViewTests.cs 801 B

1234567891011121314151617181920212223242526272829303132
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Xunit;
  7. namespace Terminal.Gui.ViewTests {
  8. public class FrameViewTests {
  9. [Fact]
  10. public void Constuctors_Defaults ()
  11. {
  12. var fv = new FrameView ();
  13. Assert.Equal (string.Empty, fv.Title);
  14. Assert.Equal (string.Empty, fv.Text);
  15. Assert.NotNull (fv.Border);
  16. fv = new FrameView ("Test");
  17. Assert.Equal ("Test", fv.Title);
  18. Assert.Equal (string.Empty, fv.Text);
  19. Assert.NotNull (fv.Border);
  20. fv = new FrameView (new Rect (1, 2, 10, 20), "Test");
  21. Assert.Equal ("Test", fv.Title);
  22. Assert.Equal (string.Empty, fv.Text);
  23. Assert.NotNull (fv.Border);
  24. fv.BeginInit ();
  25. fv.EndInit ();
  26. Assert.Equal (new Rect (1, 2, 10, 20), fv.Frame);
  27. }
  28. }
  29. }