Exemple #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));
        }
Exemple #2
0
        public void neverEqualsInstanceOfDifferentClass()
        {
            TypedLiteral instance = new TypedLiteral("whizz", "http://example.com/datatype");
            Object       obj      = new Object();

            Assert.IsFalse(instance.Equals(obj));
        }
Exemple #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));
        }
Exemple #4
0
        public void alwaysEqualsSelf()
        {
            TypedLiteral instance = new TypedLiteral("whizz", "http://example.com/datatype");

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

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