AttachedPropertyTests.cs 631 B

12345678910111213141516171819202122232425
  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.Base.UnitTests
  5. {
  6. public class AttachedPropertyTests
  7. {
  8. [Fact]
  9. public void IsAttached_Returns_True()
  10. {
  11. var property = new AttachedProperty<string>(
  12. "Foo",
  13. typeof(Class1),
  14. new StyledPropertyMetadata<string>());
  15. Assert.True(property.IsAttached);
  16. }
  17. private class Class1 : AvaloniaObject
  18. {
  19. }
  20. }
  21. }