示例#1
0
        public void ConfigurationLoadObjectTripleStoreEmpty2()
        {
            String graph = ConfigLookupTests.Prefixes + @"
_:a a dnr:TripleStore ;
  dnr:type ""VDS.RDF.WebDemandTripleStore"" .";

            Graph g = new Graph();

            g.LoadFromString(graph);

            ITripleStore result = ConfigurationLoader.LoadObject(g, g.GetBlankNode("a")) as ITripleStore;

            Assert.IsNotNull(result);
            Assert.AreEqual(typeof(WebDemandTripleStore), result.GetType());
        }
示例#2
0
        public void ConfigurationLoadObjectTripleStoreEmpty3()
        {
            String graph = ConfigLookupTests.Prefixes + @"
_:a a dnr:TripleStore ;
  dnr:type ""VDS.RDF.TripleStore"" ;
  dnr:usingGraphCollection _:b .
_:b a dnr:GraphCollection ;
  dnr:type ""VDS.RDF.ThreadSafeGraphCollection"" .";

            Graph g = new Graph();

            g.LoadFromString(graph);

            ITripleStore result = ConfigurationLoader.LoadObject(g, g.GetBlankNode("a")) as ITripleStore;

            Assert.IsNotNull(result);
            Assert.AreEqual(typeof(TripleStore), result.GetType());
            Assert.AreEqual(typeof(ThreadSafeGraphCollection), result.Graphs.GetType());
        }