Skip to content

Commit d7b0b06

Browse files
author
Edward Brey
committed
Use ArrayList.Count in unit tests for events.
1 parent 1b7750f commit d7b0b06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Distribution/wwDotnetBridge.PRG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1844,7 +1844,7 @@ ENDFUNC
18441844
*** named On{Event} with event's parameters.
18451845
************************************************************************
18461846
FUNCTION OnCompleted(lvResult, lcMethod)
1847-
LOCAL lParamText,lCount
1847+
LOCAL lParamText
18481848
18491849
IF ISNULL(lvResult) OR VARTYPE(THIS.oHandler) != "O" && If the call to WaitForEvent was canceled or the handler was unsubscribed:
18501850
RETURN

Tests/EventSubscriberTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ public void EventSubscriber_WaitForFutureEvents()
3535
static void VerifyResults(EventSubscriber subscriber)
3636
{
3737
var result = subscriber.WaitForEvent();
38-
Assert.IsTrue(result.Name == nameof(Loopback.NoParams) && result.Params.Length == 0);
38+
Assert.IsTrue(result.Name == nameof(Loopback.NoParams) && result.Params.Count == 0);
3939
result = subscriber.WaitForEvent();
40-
Assert.IsTrue(result.Name == nameof(Loopback.TwoParams) && result.Params.Length == 2 && (string)result.Params[0] == "A" && (int)result.Params[1] == 1);
40+
Assert.IsTrue(result.Name == nameof(Loopback.TwoParams) && result.Params.Count == 2 && (string)result.Params[0] == "A" && (int)result.Params[1] == 1);
4141
}
4242
}
4343

0 commit comments

Comments
 (0)