Ejemplo n.º 1
0
        public void LoadRdfOntologies()
        {
            var feClient = new CogniPySvr();

            Assert.DoesNotThrow(() => feClient.LoadRdf(Path.Combine(AssemblyDirectory, "TestFiles", "AEO.owl"), true, true, true));
            Assert.DoesNotThrow(() => feClient.LoadRdf(Path.Combine(AssemblyDirectory, "TestFiles", "BAMS.owl"), true, true, true));
        }
Ejemplo n.º 2
0
        public void AnnotationsTest()
        {
            var feClient = new CogniPySvr();

            feClient.LoadRdf(Path.Combine(AssemblyDirectory, "TestFiles", "TestAnnotations.owl"), true, true, true);

            var toRdf = feClient.ToRDF(true);

            var annotations = new List <string>()
            {
                "<rdf:Description rdf:about=\"http://www.cognitum.eu/onto#bela\">",
                "<rdfs:comment rdf:datatype=\"http://www.w3.org/2001/XMLSchema#string\">kaka maka</rdfs:comment>",
                "<rdfs:comment xml:lang=\"en\">biba</rdfs:comment>",
                "<rdf:Description rdf:about=\"http://www.cognitum.eu/onto#Ala\">",
                "<owl:backwardCompatibleWith xml:lang=\"ar\">sdsgd</owl:backwardCompatibleWith>"
            };

            Assert.IsTrue(annotations.All(s => toRdf.Contains(s)));
        }