FormattedTextTests.cs 657 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using Avalonia.Media;
  3. using Xunit;
  4. namespace Avalonia.Visuals.UnitTests.Media
  5. {
  6. public class FormattedTextTests
  7. {
  8. [Fact]
  9. public void Exception_Should_Be_Thrown_If_FontSize_0()
  10. {
  11. Assert.Throws<ArgumentException>(() => new FormattedText(
  12. "foo",
  13. "Ariel",
  14. 0));
  15. }
  16. [Fact]
  17. public void Exception_Should_Be_Thrown_If_FontWeight_0()
  18. {
  19. Assert.Throws<ArgumentException>(() => new FormattedText(
  20. "foo",
  21. "Ariel",
  22. 12,
  23. fontWeight: 0));
  24. }
  25. }
  26. }