BorderTests.cs 667 B

123456789101112131415161718192021222324
  1. // Copyright (c) The Avalonia Project. All rights reserved.
  2. // Licensed under the MIT license. See licence.md file in the project root for full license information.
  3. using Xunit;
  4. namespace Avalonia.Controls.UnitTests
  5. {
  6. public class BorderTests
  7. {
  8. [Fact]
  9. public void Measure_Should_Return_BorderThickness_Plus_Padding_When_No_Child_Present()
  10. {
  11. var target = new Border
  12. {
  13. Padding = new Thickness(6),
  14. BorderThickness = new Thickness(4)
  15. };
  16. target.Measure(new Size(100, 100));
  17. Assert.Equal(new Size(20, 20), target.DesiredSize);
  18. }
  19. }
  20. }