Open anatoly-scherbakov opened 1 year ago
You could have different entities making the same assertion, but just using different anchor/aliases and verify that it results in only a single triple.
@gkellogg Indeed, thank you for the suggestion — it is probably easier to implement.
The randomization approach tests that among different test runs while your approach works within one test run. I do not have any strong preference between the two.
Generate a YAML-LD document with an anchor, and an alias to that anchor, where the anchor name is a random string such that is a valid YAML identifier.
Convert that document into RDF.
Compare the result against the predefined sample to ensure that, with any anchor name, the document still represents the same RDF.