Skip to content

Commit

Permalink
Update ValuesJsonConverterTest.cs
Browse files Browse the repository at this point in the history
Seeing if RelativeOrAbsolute fixes unit tests
  • Loading branch information
dermotblairca authored and RehanSaeed committed Feb 22, 2022
1 parent c32d98a commit 14e3a40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Tests/Schema.NET.Test/ValuesJsonConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ public void ReadJson_ParseValueToken_RelativeUriAsString()
{
var json = "{\"Property\":\"/Thing\"}";
var result = DeserializeObject<Values<string, Uri>>(json);
Assert.Equal(new Uri("/Thing", UriKind.Relative), result.Value2.First());
Assert.Equal(new Uri("/Thing", UriKind.RelativeOrAbsolute), result.Value2.First());
}

[Fact]
Expand All @@ -294,7 +294,7 @@ public void ReadJson_Values_SingleValue_ThingInterface()
Assert.Equal(new Uri("https://example.com/book/1"), ((Book)actual).Id);
Assert.Equal("The Catcher in the Rye", actual.Name);
Assert.Equal(new Uri("https://www.barnesandnoble.com/store/info/offer/JDSalinger"), (Uri)actual.Url!);
Assert.Equal(new Uri("/images/book/1", UriKind.Relative), (Uri)actual.Image!);
Assert.Equal(new Uri("/images/book/1", UriKind.RelativeOrAbsolute), (Uri)actual.Image!);
var author = Assert.Single(actual.Author.Value2);
Assert.Equal("J.D. Salinger", author.Name);
}
Expand Down

0 comments on commit 14e3a40

Please sign in to comment.