Skip to content

Commit

Permalink
Update ValuesJsonConverterTest.cs
Browse files Browse the repository at this point in the history
Removing slash so it doesn't think it's a file on some environments.
  • Loading branch information
dermotblairca authored and RehanSaeed committed Feb 22, 2022
1 parent 14e3a40 commit f64670f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Tests/Schema.NET.Test/ValuesJsonConverterTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ public void ReadJson_ParseValueToken_UriAsString()
[Fact]
public void ReadJson_ParseValueToken_RelativeUriAsString()
{
var json = "{\"Property\":\"/Thing\"}";
var json = "{\"Property\":\"thing\"}";
var result = DeserializeObject<Values<string, Uri>>(json);
Assert.Equal(new Uri("/Thing", UriKind.RelativeOrAbsolute), result.Value2.First());
Assert.Equal(new Uri("thing", UriKind.Relative), result.Value2.First());
}

[Fact]
Expand All @@ -281,7 +281,7 @@ public void ReadJson_Values_SingleValue_ThingInterface()
"\"@id\":\"https://example.com/book/1\"," +
"\"name\":\"The Catcher in the Rye\"," +
"\"url\":\"https://www.barnesandnoble.com/store/info/offer/JDSalinger\"," +
"\"image\":\"/images/book/1\"," +
"\"image\":\"book1.jpg\"," +
"\"author\":{" +
"\"@type\":\"Person\"," +
"\"name\":\"J.D. Salinger\"" +
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.RelativeOrAbsolute), (Uri)actual.Image!);
Assert.Equal(new Uri("book1.jpg", UriKind.Relative), (Uri)actual.Image!);
var author = Assert.Single(actual.Author.Value2);
Assert.Equal("J.D. Salinger", author.Name);
}
Expand Down

0 comments on commit f64670f

Please sign in to comment.