TypefaceTests.cs 506 B

123456789101112131415161718192021
  1. using System;
  2. using Avalonia.Media;
  3. using Xunit;
  4. namespace Avalonia.Visuals.UnitTests.Media
  5. {
  6. public class TypefaceTests
  7. {
  8. [Fact]
  9. public void Exception_Should_Be_Thrown_If_FontSize_0()
  10. {
  11. Assert.Throws<ArgumentException>(() => new Typeface("foo", 0));
  12. }
  13. [Fact]
  14. public void Exception_Should_Be_Thrown_If_FontWeight_0()
  15. {
  16. Assert.Throws<ArgumentException>(() => new Typeface("foo", 12, weight: 0));
  17. }
  18. }
  19. }