Skip to content

Commit

Permalink
[fix] according to dynamic change
Browse files Browse the repository at this point in the history
  • Loading branch information
i4004 committed Jan 22, 2024
1 parent 560cc95 commit 4b516fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Simplify.Web.Tests/Routing/RouteMatcherTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -325,13 +325,13 @@ public void Match_DecimalArrayShortVersionParameter_True()
// Act

var result = _matcher.Match("/1,2,3", "/{foo:decimal[]}");
var routeParameters = (dynamic)result.RouteParameters!;
var routeParameters = result.RouteParameters!;

// Assert

Assert.IsTrue(result.Success);

var items = (IList<decimal>)routeParameters.foo;
var items = (IList<decimal>)routeParameters["foo"];

Assert.AreEqual(3, items.Count);
Assert.AreEqual(1, items[0]);
Expand All @@ -349,13 +349,13 @@ public void Match_BoolArrayShortVersionParameterWithTypeMismatch_True()
// Act

var result = _matcher.Match("/true,false,asdasd", "/{foo:bool[]}");
var routeParameters = (dynamic)result.RouteParameters!;
var routeParameters = result.RouteParameters!;

// Assert

Assert.IsTrue(result.Success);

var items = (IList<bool>)routeParameters.foo;
var items = (IList<bool>)routeParameters["foo"];

Assert.AreEqual(2, items.Count);
Assert.AreEqual(true, items[0]);
Expand Down

0 comments on commit 4b516fc

Please sign in to comment.