Beispiel #1
0
        public void ConfigurationLoadObjectGraphCollection1()
        {
            String graph = ConfigLookupTests.Prefixes + @"
_:a a dnr:GraphCollection ;
  dnr:type ""VDS.RDF.GraphCollection"" .";

            Graph g = new Graph();

            g.LoadFromString(graph);

            BaseGraphCollection collection = ConfigurationLoader.LoadObject(g, g.GetBlankNode("a")) as BaseGraphCollection;

            Assert.IsNotNull(collection);
            Assert.AreEqual(typeof(GraphCollection), collection.GetType());
        }
Beispiel #2
0
        public void ConfigurationLoadObjectGraphCollection5()
        {
            String graph = ConfigLookupTests.Prefixes + @"
_:a a dnr:GraphCollection ;
  dnr:type ""VDS.RDF.WebDemandGraphCollection"" ;
  dnr:usingGraphCollection _:b .
_:b a dnr:GraphCollection ;
  dnr:type ""VDS.RDF.ThreadSafeGraphCollection"" ;
  dnr:usingGraphCollection _:c .
_:c a dnr:GraphCollection ;
  dnr:type ""VDS.RDF.GraphCollection"" .";

            Graph g = new Graph();

            g.LoadFromString(graph);

            BaseGraphCollection collection = ConfigurationLoader.LoadObject(g, g.GetBlankNode("a")) as BaseGraphCollection;

            Assert.NotNull(collection);
            Assert.Equal(typeof(WebDemandGraphCollection), collection.GetType());
        }