示例#1
0
        public void EvaluateReturnsTrueIfSubExpressionReturnsTypedLiteral()
        {
            IsLiteral expression = new IsLiteral(new GraphMemberExpression(new TypedLiteral("scooby", "http://example.com/dog")));
            Bindings  bindings   = new Bindings();

            Assert.AreEqual(true, expression.Evaluate(bindings));
        }
示例#2
0
        public void EvaluateReturnsFalseIfSubExpressionDoesntReturnPlainLiteralOrTypedLiteral()
        {
            IsLiteral expression = new IsLiteral(new GraphMemberExpression(new BlankNode()));
            Bindings  bindings   = new Bindings();

            Assert.AreEqual(false, expression.Evaluate(bindings));
        }
示例#3
0
        public void EvaluateReturnsTrueIfSubExpressionReturnsPlainLiteral()
        {
            IsLiteral expression = new IsLiteral(new GraphMemberExpression(new PlainLiteral("scooby")));
            Bindings  bindings   = new Bindings();

            Assert.AreEqual(true, expression.Evaluate(bindings));
        }