public void NodeLiteralLanguageSpecifierCase3()
        {
            IGraph       g     = new Graph();
            ILiteralNode lcase = g.CreateLiteralNode("example", "en-gb");
            ILiteralNode ucase = g.CreateLiteralNode("example", "en-GB");
            INode        s     = g.CreateBlankNode();
            INode        p     = g.CreateUriNode(UriFactory.Create("http://predicate"));

            g.Assert(s, p, lcase);
            g.Assert(s, p, ucase);

            Assert.Equal(1, g.Triples.Count);
            Assert.Single(g.GetTriplesWithObject(lcase));
            Assert.Single(g.GetTriplesWithObject(ucase));
        }
Example #2
0
        public void NodeLiteralLanguageSpecifierCase3()
        {
            IGraph       g     = new Graph();
            ILiteralNode lcase = g.CreateLiteralNode("example", "en-gb");
            ILiteralNode ucase = g.CreateLiteralNode("example", "en-GB");
            INode        s     = g.CreateBlankNode();
            INode        p     = g.CreateUriNode(UriFactory.Create("http://predicate"));

            g.Assert(s, p, lcase);
            g.Assert(s, p, ucase);

            Assert.AreEqual(1, g.Triples.Count, "Triples should be treated as equivalent");
            Assert.AreEqual(1, g.GetTriplesWithObject(lcase).Count(), "Lower case search failed");
            Assert.AreEqual(1, g.GetTriplesWithObject(ucase).Count(), "Upper case search failed");
        }