Use UriKind.RelativeOrAbsolute to allow deserializing of relative URIs#401
Use UriKind.RelativeOrAbsolute to allow deserializing of relative URIs#401RehanSaeed merged 4 commits intoRehanSaeed:mainfrom
Conversation
|
Thanks! Can we also add some tests? |
|
Hi @RehanSaeed I have added a new test to check the relative URI scenario, and also updated an existing test to include a relative URI when deserializing an object of type Thing. It looks like the absolute URI scenarios are already sufficiently tested. However if you would like more test cases, let me know and I can add them. Thanks. |
|
Thanks @dermotblairca. The |
|
@RehanSaeed I can't actually reproduce that failed test. When I do a clean rebuild on my fork, all of the tests run fine including that one. For example: |
Seeing if RelativeOrAbsolute fixes unit tests
Removing slash so it doesn't think it's a file on some environments.
|
Hopefully my last change has fixed the tests. I think when ToString() was implicitly called on the URI of actual/second argument on the Assert call, it seems to prepend it with "file://". I cannot reproduce this though so I'm guessing it only happens on some environments. |
|
Thanks! |
|
No problem! |

Fixing issue where relative URIs in JSON are ignored and not included in the deserialized schema.org objects, as discussed in #391