FillPairTests.cs 831 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. namespace Terminal.Gui.DrawingTests;
  7. public class FillPairTests
  8. {
  9. [Fact]
  10. public void GetAttribute_ReturnsCorrectColors ()
  11. {
  12. // Arrange
  13. var foregroundColor = new Color (100, 150, 200);
  14. var backgroundColor = new Color (50, 75, 100);
  15. var foregroundFill = new SolidFill (foregroundColor);
  16. var backgroundFill = new SolidFill (backgroundColor);
  17. var fillPair = new FillPair (foregroundFill, backgroundFill);
  18. // Act
  19. Attribute resultAttribute = fillPair.GetAttribute (new (0, 0));
  20. // Assert
  21. Assert.Equal (foregroundColor, resultAttribute.Foreground);
  22. Assert.Equal (backgroundColor, resultAttribute.Background);
  23. }
  24. }