示例#1
0
        public void neverEqualsInstanceOfSameClassWithDifferentLexicalValueAndSameDataType()
        {
            TypedLiteral instance = new TypedLiteral("whizz", "http://example.com/datatype");
            TypedLiteral other    = new TypedLiteral("bang", "http://example.com/datatype");

            Assert.IsFalse(instance.Equals(other));
        }
示例#2
0
        public void neverEqualsInstanceOfDifferentClass()
        {
            TypedLiteral instance = new TypedLiteral("whizz", "http://example.com/datatype");
            Object       obj      = new Object();

            Assert.IsFalse(instance.Equals(obj));
        }
示例#3
0
        public void alwaysEqualsInstanceOfSameClassWithSameLexicalValueAndSameDataType()
        {
            TypedLiteral instance = new TypedLiteral("whizz", "http://example.com/datatype");
            TypedLiteral other    = new TypedLiteral("whizz", "http://example.com/datatype");

            Assert.IsTrue(instance.Equals(other));
        }
示例#4
0
        public void alwaysEqualsSelf()
        {
            TypedLiteral instance = new TypedLiteral("whizz", "http://example.com/datatype");

            Assert.IsTrue(instance.Equals(instance));
        }
示例#5
0
        public void neverEqualsNull()
        {
            TypedLiteral instance = new TypedLiteral("whizz", "http://example.com/datatype");

            Assert.IsFalse(instance.Equals(null));
        }