Skip to content

Commit cd55951

Browse files
committed
Use new methods better in tests
1 parent 0722af5 commit cd55951

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dotnet/test/common/BiDi/Script/CallFunctionLocalValueTest.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ await context.Script.CallFunctionAsync($$"""
314314
[Test]
315315
public void CanCallFunctionWithArgumentArray()
316316
{
317-
var arg = LocalValue.Array([new StringLocalValue("hi")]);
317+
var arg = LocalValue.Array(["hi"]);
318318

319319
Assert.That(async () =>
320320
{
@@ -331,7 +331,7 @@ await context.Script.CallFunctionAsync($$"""
331331
[Test]
332332
public void CanCallFunctionWithArgumentObject()
333333
{
334-
var arg = LocalValue.Object([[new StringLocalValue("objKey"), new StringLocalValue("objValue")]]);
334+
var arg = LocalValue.Object([["objKey", "objValue"]]);
335335

336336
Assert.That(async () =>
337337
{
@@ -348,7 +348,7 @@ await context.Script.CallFunctionAsync($$"""
348348
[Test]
349349
public void CanCallFunctionWithArgumentMap()
350350
{
351-
var arg = LocalValue.Map([[new StringLocalValue("mapKey"), new StringLocalValue("mapValue")]]);
351+
var arg = LocalValue.Map([["mapKey", "mapValue"]]);
352352

353353
Assert.That(async () =>
354354
{
@@ -365,7 +365,7 @@ await context.Script.CallFunctionAsync($$"""
365365
[Test]
366366
public void CanCallFunctionWithArgumentSet()
367367
{
368-
var arg = LocalValue.Set([new StringLocalValue("setKey")]);
368+
var arg = LocalValue.Set(["setKey"]);
369369

370370
Assert.That(async () =>
371371
{

0 commit comments

Comments
 (0)