public void Equals_DifferentObjectWithSameValue_True() { var stringCassetteBody = new StringCassetteBody("some text"); var differentStringCassetteBody = new StringCassetteBody("some text"); Assert.That(stringCassetteBody.Equals(differentStringCassetteBody), Is.True); Assert.That(stringCassetteBody.Equals((object)differentStringCassetteBody), Is.True); Assert.That(stringCassetteBody == differentStringCassetteBody, Is.True); Assert.That(stringCassetteBody != differentStringCassetteBody, Is.False); }
public void Equals_Null_False() { var stringCassetteBody = new StringCassetteBody("some text"); var differentStringCassetteBody = (StringCassetteBody)null; Assert.That(stringCassetteBody.Equals(differentStringCassetteBody), Is.False); Assert.That(stringCassetteBody.Equals((object)differentStringCassetteBody), Is.False); Assert.That(stringCassetteBody == differentStringCassetteBody, Is.False); Assert.That(stringCassetteBody != differentStringCassetteBody, Is.True); }
public void Equals_String_False() { var stringCassetteBody = new StringCassetteBody("some text"); Assert.That(stringCassetteBody.Equals("String"), Is.False); }