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); }
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); }
public void Equals_String_False() { var stringCassetteBody = new BytesCassetteBody(new byte[] { 1, 2, 3, 4, 5 }); Assert.That(stringCassetteBody.Equals("String"), Is.False); }