Skip to content

Commit 31c44e2

Browse files
committed
More tests.
1 parent 9ec9bde commit 31c44e2

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

  • WpfAnalyzers.Test/WPF0092RegisterClassHandlerDelegateType

WpfAnalyzers.Test/WPF0092RegisterClassHandlerDelegateType/CodeFix.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,28 @@ static C()
7373
}";
7474
RoslynAssert.CodeFix(Analyzer, Fix, ExpectedDiagnostic, before, after);
7575
}
76+
77+
[Test]
78+
public static void CastAction()
79+
{
80+
var code = @"
81+
namespace N;
82+
83+
using System;
84+
using System.Windows;
85+
using System.Windows.Controls;
86+
87+
public static class C
88+
{
89+
static C()
90+
{
91+
EventManager.RegisterClassHandler(
92+
typeof(PasswordBox),
93+
PasswordBox.PasswordChangedEvent,
94+
↓(Action<object, RoutedEventArgs>)((sender, e) => { }));
95+
}
96+
}";
97+
98+
RoslynAssert.NoFix(Analyzer, Fix, ExpectedDiagnostic, code);
99+
}
76100
}

0 commit comments

Comments
 (0)