Skip to content

Commit 0659464

Browse files
committed
refactor: made parameter names explicit for better readability
1 parent 0656c2b commit 0659464

File tree

2 files changed

+38
-38
lines changed

2 files changed

+38
-38
lines changed

tests/bunit.web.tests/JSInterop/BunitJSInteropTest.net5.cs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,10 @@ public void Test310(string identifier)
128128
.ShouldHaveSingleItem()
129129
.ShouldBe(new JSRuntimeInvocation(
130130
identifier,
131-
null,
131+
cancellationToken: null,
132132
Array.Empty<object>(),
133133
typeof(string),
134-
"InvokeUnmarshalled"));
134+
invocationMethodName: "InvokeUnmarshalled"));
135135
}
136136

137137
[Theory(DisplayName = "When calling InvokeUnmarshalled(identifier, arg0), then the invocation should be visible from the Invocations list"), AutoData]
@@ -146,10 +146,10 @@ public void Test306(string identifier, string arg0)
146146
.ShouldHaveSingleItem()
147147
.ShouldBe(new JSRuntimeInvocation(
148148
identifier,
149-
null,
150-
new[] { arg0 },
151-
typeof(string),
152-
"InvokeUnmarshalled"));
149+
cancellationToken: null,
150+
args: new[] { arg0 },
151+
resultType: typeof(string),
152+
invocationMethodName: "InvokeUnmarshalled"));
153153
}
154154

155155
[Theory(DisplayName = "When calling InvokeUnmarshalled(identifier, arg0, arg1), then the invocation should be visible from the Invocations list"), AutoData]
@@ -164,10 +164,10 @@ public void Test307(string identifier, string arg0, string arg1)
164164
.ShouldHaveSingleItem()
165165
.ShouldBe(new JSRuntimeInvocation(
166166
identifier,
167-
null,
168-
new[] { arg0, arg1 },
169-
typeof(string),
170-
"InvokeUnmarshalled"));
167+
cancellationToken: null,
168+
args: new[] { arg0, arg1 },
169+
resultType: typeof(string),
170+
invocationMethodName: "InvokeUnmarshalled"));
171171
}
172172

173173
[Theory(DisplayName = "When calling InvokeUnmarshalled(identifier, arg0, arg1, arg2), then the invocation should be visible from the Invocations list"), AutoData]
@@ -183,10 +183,10 @@ public void Test308(string identifier, string arg0, string arg1, string arg2)
183183
.ShouldHaveSingleItem()
184184
.ShouldBe(new JSRuntimeInvocation(
185185
identifier,
186-
null,
187-
new[] { arg0, arg1, arg2 },
188-
typeof(string),
189-
"InvokeUnmarshalled"));
186+
cancellationToken: null,
187+
args: new[] { arg0, arg1, arg2 },
188+
resultType: typeof(string),
189+
invocationMethodName: "InvokeUnmarshalled"));
190190
}
191191
}
192192
}

tests/bunit.web.tests/JSInterop/BunitJSObjectReferenceTest.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -325,10 +325,10 @@ public void Test310(string identifier)
325325
.ShouldHaveSingleItem()
326326
.ShouldBe(new JSRuntimeInvocation(
327327
identifier,
328-
null,
329-
Array.Empty<object>(),
330-
typeof(string),
331-
"InvokeUnmarshalled"));
328+
cancellationToken: null,
329+
args: Array.Empty<object>(),
330+
resultType: typeof(string),
331+
invocationMethodName: "InvokeUnmarshalled"));
332332
}
333333

334334
[Theory(DisplayName = "When calling InvokeUnmarshalled(identifier, arg0), then the invocation should be visible from the Invocations list"), AutoData]
@@ -343,10 +343,10 @@ public void Test306(string identifier, string arg0)
343343
.ShouldHaveSingleItem()
344344
.ShouldBe(new JSRuntimeInvocation(
345345
identifier,
346-
null,
347-
new[] { arg0 },
348-
typeof(string),
349-
"InvokeUnmarshalled"));
346+
cancellationToken: null,
347+
args: new[] { arg0 },
348+
resultType: typeof(string),
349+
invocationMethodName: "InvokeUnmarshalled"));
350350
}
351351

352352
[Theory(DisplayName = "When calling InvokeUnmarshalled(identifier, arg0, arg1), then the invocation should be visible from the Invocations list"), AutoData]
@@ -361,10 +361,10 @@ public void Test307(string identifier, string arg0, string arg1)
361361
.ShouldHaveSingleItem()
362362
.ShouldBe(new JSRuntimeInvocation(
363363
identifier,
364-
null,
365-
new[] { arg0, arg1 },
366-
typeof(string),
367-
"InvokeUnmarshalled"));
364+
cancellationToken: null,
365+
args: new[] { arg0, arg1 },
366+
resultType: typeof(string),
367+
invocationMethodName: "InvokeUnmarshalled"));
368368
}
369369

370370
[Theory(DisplayName = "When calling InvokeUnmarshalled(identifier, arg0, arg1, arg2), then the invocation should be visible from the Invocations list"), AutoData]
@@ -380,10 +380,10 @@ public void Test308(string identifier, string arg0, string arg1, string arg2)
380380
.ShouldHaveSingleItem()
381381
.ShouldBe(new JSRuntimeInvocation(
382382
identifier,
383-
null,
384-
new[] { arg0, arg1, arg2 },
385-
typeof(string),
386-
"InvokeUnmarshalled"));
383+
cancellationToken: null,
384+
args: new[] { arg0, arg1, arg2 },
385+
resultType: typeof(string),
386+
invocationMethodName: "InvokeUnmarshalled"));
387387
}
388388

389389
[Theory(DisplayName = "When calling InvokeVoidAsync, then the invocation should be visible from the Invocations list"), AutoData]
@@ -434,10 +434,10 @@ public void Test304(string identifier, string[] args)
434434
.ShouldHaveSingleItem()
435435
.ShouldBe(new JSRuntimeInvocation(
436436
identifier,
437-
null,
438-
args,
439-
typeof(object),
440-
"InvokeVoid"));
437+
cancellationToken: null,
438+
args: args,
439+
resultType: typeof(object),
440+
invocationMethodName: "InvokeVoid"));
441441
}
442442

443443
[Theory(DisplayName = "When calling Invoke, then the invocation should be visible from the Invocations list"), AutoData]
@@ -452,10 +452,10 @@ public void Test305(string identifier, string[] args)
452452
.ShouldHaveSingleItem()
453453
.ShouldBe(new JSRuntimeInvocation(
454454
identifier,
455-
null,
456-
args,
457-
typeof(int),
458-
"Invoke"));
455+
cancellationToken: null,
456+
args: args,
457+
resultType: typeof(int),
458+
invocationMethodName: "Invoke"));
459459
}
460460

461461
private BunitJSObjectReference GetBunitJSObjectReference()

0 commit comments

Comments
 (0)