예제 #1
0
        public void Equals_DifferentObjectWithSameValue_True()
        {
            var stringCassetteBody         = new BytesCassetteBody(new byte[] { 1, 2, 3, 4, 5 });
            var differentBytesCassetteBody = new BytesCassetteBody(new byte[] { 1, 2, 3, 4, 5 });

            Assert.That(stringCassetteBody.Equals(differentBytesCassetteBody), Is.True);
            Assert.That(stringCassetteBody.Equals((object)differentBytesCassetteBody), Is.True);
            Assert.That(stringCassetteBody == differentBytesCassetteBody, Is.True);
            Assert.That(stringCassetteBody != differentBytesCassetteBody, Is.False);
        }
예제 #2
0
        public void Equals_Null_False()
        {
            var stringCassetteBody         = new BytesCassetteBody(new byte[] { 1, 2, 3, 4, 5 });
            var differentBytesCassetteBody = (BytesCassetteBody)null;

            Assert.That(stringCassetteBody.Equals(differentBytesCassetteBody), Is.False);
            Assert.That(stringCassetteBody.Equals((object)differentBytesCassetteBody), Is.False);
            Assert.That(stringCassetteBody == differentBytesCassetteBody, Is.False);
            Assert.That(stringCassetteBody != differentBytesCassetteBody, Is.True);
        }
예제 #3
0
        public void Equals_String_False()
        {
            var stringCassetteBody = new BytesCassetteBody(new byte[] { 1, 2, 3, 4, 5 });

            Assert.That(stringCassetteBody.Equals("String"), Is.False);
        }