public void SparqlOperatorRegistration2() { try { MockSparqlOperator op = new MockSparqlOperator(); SparqlOperators.AddOperator(op); Assert.True(SparqlOperators.IsRegistered(op)); SparqlOperators.RemoveOperatorByType(new MockSparqlOperator()); Assert.False(SparqlOperators.IsRegistered(op)); } finally { SparqlOperators.Reset(); } }
public void SparqlOperatorRegistration3() { try { MockSparqlOperator op = new MockSparqlOperator(); SparqlOperators.AddOperator(op); Assert.IsTrue(SparqlOperators.IsRegistered(op)); SparqlOperators.Reset(); Assert.IsFalse(SparqlOperators.IsRegistered(op)); } finally { SparqlOperators.Reset(); } }
public void ConfigurationAutoOperators2() { try { String data = @"@prefix dnr: <http://www.dotnetrdf.org/configuration#> . _:a a dnr:SparqlOperator ; dnr:type ""VDS.RDF.Query.Operators.DateTime.DateTimeAddition"" ; dnr:enabled false ."; Graph g = new Graph(); g.LoadFromString(data); ConfigurationLoader.AutoConfigureSparqlOperators(g); Assert.IsFalse(SparqlOperators.IsRegistered(new DateTimeAddition())); } finally { SparqlOperators.Reset(); } }