Skip to content

Commit

Permalink
chore: update NavigationParameter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dansiegel committed Jan 20, 2024
1 parent f73a1d7 commit acb118a
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Prism.Forms.Tests.Navigation
{
// TODO: This can probably be deleted as a duplicate. Determine if there are any non-duplicate tests.
public class NavigationParametersFixture
{
const string _uri = "?id=3&name=brian";
Expand Down Expand Up @@ -196,15 +197,16 @@ public void GetValuesReturnsArrayWhenParametersParsedFromQuery()
[Fact]
public void GetValuesReturnsArrayWhenNotUsingQuery()
{
var parameters = new NavigationParameters();
parameters.Add("id", new Person());
parameters.Add("id", new Person());
parameters.Add("id", null);
var parameters = new NavigationParameters
{
{ "id", new Person() },
{ "id", new Person() },
{ "id", null }
};
var result = parameters.GetValues<Person>("id").ToArray();
Assert.Equal(3, result.Count());
Assert.Equal(2, result.Length);
Assert.IsType<Person>(result[0]);
Assert.IsType<Person>(result[1]);
Assert.Null(result[2]);
}

[Fact]
Expand Down

0 comments on commit acb118a

Please sign in to comment.