Пример #1
0
        public void Equals_False()
        {
            var signature = new FieldSignature(typeof(int));

            Assert.That(signature.Equals(null), Is.False);

            var signatureWithDifferentFieldType = new FieldSignature(typeof(string));

            Assert.That(signature.Equals(signatureWithDifferentFieldType), Is.False);
        }
Пример #2
0
        public void Equals_Object()
        {
            var signature = new FieldSignature(typeof(int));

            object otherSignatureAsObject = new FieldSignature(typeof(int));

            Assert.That(signature.Equals(otherSignatureAsObject), Is.True);

            Assert.That(signature.Equals((object)null), Is.False);

            object completelyUnrelatedObject = new object();

            Assert.That(signature.Equals(completelyUnrelatedObject), Is.False);
        }
Пример #3
0
        public void Equals_True()
        {
            var signature1 = new FieldSignature(typeof(int));
            var signature2 = new FieldSignature(typeof(int));

            Assert.That(signature1.Equals(signature2), Is.True);
        }