Skip to content

Commit 1349958

Browse files
committed
Updated event trigger help tests to make the sync now that async triggers are private
1 parent ac6c8a1 commit 1349958

12 files changed

Lines changed: 25 additions & 25 deletions

tests/bunit.web.tests/EventDispatchExtensions/ClipboardEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ public class ClipboardEventDispatchExtensionsTest : EventDispatchExtensionsTest<
1111

1212
[Theory(DisplayName = "Clipboard events are raised correctly through helpers")]
1313
[MemberData(nameof(GetEventHelperMethods), typeof(ClipboardEventDispatchExtensions))]
14-
public async Task CanRaiseEvents(MethodInfo helper)
14+
public void CanRaiseEvents(MethodInfo helper)
1515
{
1616
var expected = new ClipboardEventArgs()
1717
{
1818
Type = "SOME TYPE"
1919
};
2020

21-
await VerifyEventRaisesCorrectly(helper, expected);
21+
VerifyEventRaisesCorrectly(helper, expected);
2222
}
2323
}
2424
}

tests/bunit.web.tests/EventDispatchExtensions/DragEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class DragEventDispatchExtensionsTest : EventDispatchExtensionsTest<DragE
1111

1212
[Theory(DisplayName = "Drag events are raised correctly through helpers")]
1313
[MemberData(nameof(GetEventHelperMethods), typeof(DragEventDispatchExtensions))]
14-
public async Task CanRaiseEvents(MethodInfo helper)
14+
public void CanRaiseEvents(MethodInfo helper)
1515
{
1616
var expected = new DragEventArgs()
1717
{
@@ -30,7 +30,7 @@ public async Task CanRaiseEvents(MethodInfo helper)
3030
DataTransfer = new DataTransfer()
3131
};
3232

33-
await VerifyEventRaisesCorrectly(helper, expected);
33+
VerifyEventRaisesCorrectly(helper, expected);
3434
}
3535
}
3636

tests/bunit.web.tests/EventDispatchExtensions/EventDispatchExtensionsTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ protected TriggerEventSpy<EventArgs> CreateTriggerSpy(string element, string eve
2222
return new TriggerEventSpy<EventArgs>(p => RenderComponent<TriggerTester<EventArgs>>(p), element, eventName);
2323
}
2424

25-
protected async Task VerifyEventRaisesCorrectly(MethodInfo helper, TEventArgs expected, params (string methodName, string eventName)[] methodNameEventMap)
25+
protected void VerifyEventRaisesCorrectly(MethodInfo helper, TEventArgs expected, params (string methodName, string eventName)[] methodNameEventMap)
2626
{
2727
if (helper is null)
2828
throw new ArgumentNullException(nameof(helper));

tests/bunit.web.tests/EventDispatchExtensions/FocusEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@ public class FocusEventDispatchExtensionsTest : EventDispatchExtensionsTest<Focu
1212

1313
[Theory(DisplayName = "Focus events are raised correctly through helpers")]
1414
[MemberData(nameof(GetEventHelperMethods), typeof(FocusEventDispatchExtensions))]
15-
public async Task CanRaiseEvents(MethodInfo helper)
15+
public void CanRaiseEvents(MethodInfo helper)
1616
{
1717
var expected = new FocusEventArgs()
1818
{
1919
Type = "SOME TYPE"
2020
};
2121

22-
await VerifyEventRaisesCorrectly(helper, expected);
22+
VerifyEventRaisesCorrectly(helper, expected);
2323
}
2424
}
2525

tests/bunit.web.tests/EventDispatchExtensions/GeneralEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ public class GeneralEventDispatchExtensionsTest : EventDispatchExtensionsTest<Ev
1616

1717
[Theory(DisplayName = "General events are raised correctly through helpers")]
1818
[MemberData(nameof(GetEventHelperMethods), typeof(GeneralEventDispatchExtensions))]
19-
public async Task CanRaiseEvents(MethodInfo helper)
19+
public void CanRaiseEvents(MethodInfo helper)
2020
{
2121
if (helper is null)
2222
throw new ArgumentNullException(nameof(helper));
2323

2424
if (helper.Name == nameof(GeneralEventDispatchExtensions.TriggerEventAsync))
2525
return;
2626

27-
await VerifyEventRaisesCorrectly(helper, EventArgs.Empty);
27+
VerifyEventRaisesCorrectly(helper, EventArgs.Empty);
2828
}
2929

3030
[Fact(DisplayName = "TriggerEventAsync throws element is null")]

tests/bunit.web.tests/EventDispatchExtensions/InputEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ public class InputEventDispatchExtensionsTest : EventDispatchExtensionsTest<Chan
1111

1212
[Theory(DisplayName = "Input events are raised correctly through helpers")]
1313
[MemberData(nameof(GetEventHelperMethods), typeof(InputEventDispatchExtensions))]
14-
public async Task CanRaiseEvents(MethodInfo helper)
14+
public void CanRaiseEvents(MethodInfo helper)
1515
{
1616
var expected = new ChangeEventArgs()
1717
{
1818
Value = "SOME VALUE"
1919
};
2020

21-
await VerifyEventRaisesCorrectly(helper, expected);
21+
VerifyEventRaisesCorrectly(helper, expected);
2222
}
2323

2424
}

tests/bunit.web.tests/EventDispatchExtensions/KeyboardEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class KeyboardEventDispatchExtensionsTest : EventDispatchExtensionsTest<K
1111

1212
[Theory(DisplayName = "Keyboard events are raised correctly through helpers")]
1313
[MemberData(nameof(GetEventHelperMethods), typeof(KeyboardEventDispatchExtensions))]
14-
public async Task CanRaiseEvents(MethodInfo helper)
14+
public void CanRaiseEvents(MethodInfo helper)
1515
{
1616
var expected = new KeyboardEventArgs()
1717
{
@@ -26,7 +26,7 @@ public async Task CanRaiseEvents(MethodInfo helper)
2626
Type = "ASDF"
2727
};
2828

29-
await VerifyEventRaisesCorrectly(helper, expected);
29+
VerifyEventRaisesCorrectly(helper, expected);
3030
}
3131

3232

tests/bunit.web.tests/EventDispatchExtensions/MediaEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ public class MediaEventDispatchExtensionsTest : EventDispatchExtensionsTest<Even
1111

1212
[Theory(DisplayName = "Media events are raised correctly through helpers")]
1313
[MemberData(nameof(GetEventHelperMethods), typeof(MediaEventDispatchExtensions))]
14-
public async Task CanRaiseEvents(MethodInfo helper)
14+
public void CanRaiseEvents(MethodInfo helper)
1515
{
16-
await VerifyEventRaisesCorrectly(helper, EventArgs.Empty);
16+
VerifyEventRaisesCorrectly(helper, EventArgs.Empty);
1717
}
1818
}
1919
}

tests/bunit.web.tests/EventDispatchExtensions/MouseEventDispatchExtensionsTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class MouseEventDispatchExtensionsTest : EventDispatchExtensionsTest<Mous
1515

1616
[Theory(DisplayName = "Mouse events are raised correctly through helpers")]
1717
[MemberData(nameof(Helpers))]
18-
public async Task CanRaiseEvents(MethodInfo helper)
18+
public void CanRaiseEvents(MethodInfo helper)
1919
{
2020
var expected = new MouseEventArgs
2121
{
@@ -33,7 +33,7 @@ public async Task CanRaiseEvents(MethodInfo helper)
3333
Type = "TYPE"
3434
};
3535

36-
await VerifyEventRaisesCorrectly(helper, expected,
36+
VerifyEventRaisesCorrectly(helper, expected,
3737
(nameof(MouseEventDispatchExtensions.DoubleClick), "ondblclick")
3838
);
3939
}
@@ -47,7 +47,7 @@ public class WheelEventDispatchExtensionsTest : EventDispatchExtensionsTest<Whee
4747

4848
[Theory(DisplayName = "Mouse wheel/wheel events are raised correctly through helpers")]
4949
[MemberData(nameof(Helpers))]
50-
public async Task CanRaiseEvents(MethodInfo helper)
50+
public void CanRaiseEvents(MethodInfo helper)
5151
{
5252
var expected = new WheelEventArgs
5353
{
@@ -68,7 +68,7 @@ public async Task CanRaiseEvents(MethodInfo helper)
6868
Type = "TYPE"
6969
};
7070

71-
await VerifyEventRaisesCorrectly(helper, expected);
71+
VerifyEventRaisesCorrectly(helper, expected);
7272
}
7373
}
7474
}

tests/bunit.web.tests/EventDispatchExtensions/PointerEventDispatchExtensionsTest.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class PointerEventDispatchExtensionsTest : EventDispatchExtensionsTest<Po
1111

1212
[Theory(DisplayName = "Pointer events are raised correctly through helpers")]
1313
[MemberData(nameof(GetEventHelperMethods), typeof(PointerEventDispatchExtensions))]
14-
public async Task CanRaiseEvents(MethodInfo helper)
14+
public void CanRaiseEvents(MethodInfo helper)
1515
{
1616
var expected = new PointerEventArgs()
1717
{
@@ -40,7 +40,7 @@ public async Task CanRaiseEvents(MethodInfo helper)
4040
PointerType = "MOUSE"
4141
};
4242

43-
await VerifyEventRaisesCorrectly(helper, expected);
43+
VerifyEventRaisesCorrectly(helper, expected);
4444
}
4545
}
4646
}

0 commit comments

Comments
 (0)