public void GraphCollectionWebDemand1() { TripleStore store = new TripleStore(new WebDemandGraphCollection()); Graph g = new Graph(); Uri u = new Uri("http://www.dotnetrdf.org/configuration#"); g.LoadFromUri(u); g.BaseUri = u; Assert.True(store.HasGraph(g.BaseUri), "Graph Collection should contain the Graph"); Assert.Equal(g, store[g.BaseUri]); }
public void GraphCollectionWebDemand2() { //Test that on-demand loading does not kick in for pre-existing graphs TripleStore store = new TripleStore(new WebDemandGraphCollection()); Graph g = new Graph(); Uri u = new Uri("http://www.dotnetrdf.org/configuration#"); g.LoadFromUri(u); g.BaseUri = u; Graph empty = new Graph(); empty.BaseUri = g.BaseUri; store.Add(empty); Assert.True(store.HasGraph(g.BaseUri), "Graph Collection should contain the Graph"); Assert.NotEqual(g, store[g.BaseUri]); }