public void SparqlUpdateDeleteWithGraphClause2() { Graph g = new Graph(); g.Assert(g.CreateUriNode(UriFactory.Create("http://subject")), g.CreateUriNode(UriFactory.Create("http://predicate")), g.CreateUriNode(UriFactory.Create("http://object"))); Graph h = new Graph(); h.Merge(g); h.BaseUri = UriFactory.Create("http://subject"); InMemoryDataset dataset = new InMemoryDataset(g); dataset.AddGraph(h); dataset.Flush(); Assert.Equal(2, dataset.GraphUris.Count()); String updates = "DELETE { GRAPH ?s { ?s ?p ?o } } INSERT { GRAPH ?o { ?s ?p ?o } } WHERE { ?s ?p ?o }"; SparqlUpdateCommandSet commands = new SparqlUpdateParser().ParseFromString(updates); LeviathanUpdateProcessor processor = new LeviathanUpdateProcessor(dataset); processor.ProcessCommandSet(commands); Assert.Equal(3, dataset.GraphUris.Count()); Assert.True(dataset.HasGraph(UriFactory.Create("http://subject"))); Assert.True(dataset.HasGraph(UriFactory.Create("http://object"))); Assert.Equal(0, dataset[UriFactory.Create("http://subject")].Triples.Count); }