AttachedPropertyTests.cs 523 B

123456789101112131415161718192021222324
  1. using Avalonia.Controls;
  2. using Xunit;
  3. namespace Avalonia.Base.UnitTests
  4. {
  5. public class AttachedPropertyTests
  6. {
  7. [Fact]
  8. public void IsAttached_Returns_True()
  9. {
  10. var property = new AttachedProperty<string>(
  11. "Foo",
  12. typeof(Class1),
  13. typeof(Control),
  14. new StyledPropertyMetadata<string>());
  15. Assert.True(property.IsAttached);
  16. }
  17. private class Class1 : AvaloniaObject
  18. {
  19. }
  20. }
  21. }