FillPairTests.cs 864 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 Terminal.Gui.Drawing;
  7. namespace Terminal.Gui.DrawingTests;
  8. public class FillPairTests
  9. {
  10. [Fact]
  11. public void GetAttribute_ReturnsCorrectColors ()
  12. {
  13. // Arrange
  14. var foregroundColor = new Color (100, 150, 200);
  15. var backgroundColor = new Color (50, 75, 100);
  16. var foregroundFill = new SolidFill (foregroundColor);
  17. var backgroundFill = new SolidFill (backgroundColor);
  18. var fillPair = new FillPair (foregroundFill, backgroundFill);
  19. // Act
  20. var resultAttribute = fillPair.GetAttribute (new Point (0, 0));
  21. // Assert
  22. Assert.Equal (foregroundColor, resultAttribute.Foreground);
  23. Assert.Equal (backgroundColor, resultAttribute.Background);
  24. }
  25. }