From 9adf6f2dedb9a5a316a223f0a32f535c17d5092d Mon Sep 17 00:00:00 2001 From: Giuseppe Lippolis Date: Tue, 9 Apr 2024 17:47:46 +0200 Subject: [PATCH] test: Automatic Routed Event Handler Genration --- .../Avalonia.Markup.Xaml.UnitTests.csproj | 10 +++++ .../Xaml/EventTests.cs | 44 +++++++++++++++++++ 2 files changed, 54 insertions(+) diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj b/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj index 6c488ec94f7e..4c0217bcc7bc 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Avalonia.Markup.Xaml.UnitTests.csproj @@ -36,5 +36,15 @@ PlatformFactAttribute.cs + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/EventTests.cs b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/EventTests.cs index c9e0a3d5f0ad..304da097c09d 100644 --- a/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/EventTests.cs +++ b/tests/Avalonia.Markup.Xaml.UnitTests/Xaml/EventTests.cs @@ -39,6 +39,23 @@ public void Attached_Event_Is_Assigned() Assert.True(target.WasTapped); } + [Fact] + public void Attached_Event_Is_Assigned_Generic() + { + var xaml = @"