Skip to content

Commit 1e658c2

Browse files
committed
fix: resolve WinForms test compile errors on Windows CI
1 parent a1316bc commit 1e658c2

4 files changed

Lines changed: 9 additions & 3 deletions

File tree

src/tests/ReactiveUI.Binding.WinForms.Tests/CommandBinding/WinFormsCommandBindingTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public async Task Button_CustomMouseUpEvent_ExecutesCommand()
192192
using var binding = WinFormsCommandScenarios.ButtonCustomEvent(vm, view);
193193

194194
// Raise MouseUp event on the button
195-
var mouseArgs = new MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0);
195+
var mouseArgs = new System.Windows.Forms.MouseEventArgs(MouseButtons.Left, 1, 0, 0, 0);
196196
view.SaveButton.GetType()
197197
.GetMethod("OnMouseUp", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic)!
198198
.Invoke(view.SaveButton, [mouseArgs]);

src/tests/ReactiveUI.Binding.WinForms.Tests/CommandBinding/WinFormsCommandScenarios.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static IDisposable ButtonBasic(WinFormsCommandViewModel vm, WinFormsComma
2626
/// <param name="view">The target view.</param>
2727
/// <returns>A disposable representing the binding.</returns>
2828
public static IDisposable ButtonWithExpressionParam(WinFormsCommandViewModel vm, WinFormsCommandView view)
29-
=> view.BindCommand(vm, x => x.Save, x => x.SaveButton, vm, x => x.CurrentItem);
29+
=> view.BindCommand(vm, x => x.Save, x => x.SaveButton, x => x.CurrentItem);
3030

3131
/// <summary>
3232
/// Binds the Save command to a real WinForms Button with an observable parameter.

src/tests/ReactiveUI.Binding.WinForms.Tests/CommandBinding/WinFormsCommandViewModel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ namespace ReactiveUI.Binding.WinForms.Tests.CommandBinding;
1212
/// </summary>
1313
public class WinFormsCommandViewModel : INotifyPropertyChanged
1414
{
15+
/// <summary>
16+
/// The backing field for <see cref="Save"/>.
17+
/// </summary>
1518
private ICommand? _save;
19+
20+
/// <summary>
21+
/// The backing field for <see cref="CurrentItem"/>.
22+
/// </summary>
1623
private string? _currentItem;
1724

1825
/// <inheritdoc/>

src/tests/ReactiveUI.Binding.WinForms.Tests/ReactiveUI.Binding.WinForms.Tests.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
</PropertyGroup>
5050
<ItemGroup>
5151
<Using Include="System.Windows.Forms" />
52-
<Using Include="System.Windows.Input" />
5352
<ProjectReference Include="..\..\ReactiveUI.Binding.WinForms\ReactiveUI.Binding.WinForms.csproj" />
5453
<Compile Include="CommandBinding\**\*.cs" />
5554
</ItemGroup>

0 commit comments

Comments
 (0)