SliderTests.cs 935 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. using Avalonia.Layout;
  5. using Xunit;
  6. namespace Avalonia.Controls.UnitTests
  7. {
  8. public class SliderTests
  9. {
  10. [Fact]
  11. public void Default_Orientation_Should_Be_Horizontal()
  12. {
  13. var slider = new Slider();
  14. Assert.Equal(Orientation.Horizontal, slider.Orientation);
  15. }
  16. [Fact]
  17. public void Should_Set_Horizontal_Class()
  18. {
  19. var slider = new Slider
  20. {
  21. Orientation = Orientation.Horizontal
  22. };
  23. Assert.Contains(slider.Classes, ":horizontal".Equals);
  24. }
  25. [Fact]
  26. public void Should_Set_Vertical_Class()
  27. {
  28. var slider = new Slider
  29. {
  30. Orientation = Orientation.Vertical
  31. };
  32. Assert.Contains(slider.Classes, ":vertical".Equals);
  33. }
  34. }
  35. }