public void GivenAnImageObject_WhenItIsComparedToAnotherMedia_AndTheIdsAreEqual_ThenTheyAreEqual() { var id = Guid.NewGuid(); var img1 = new Media { Id = id }; var img2 = new Media { Id = id }; img1.Equals(img2).Should().BeTrue(); }
public void GivenTwoImageObjects_WhenOneIsNull_AndItIsCastToObject_ThenTheyAreNotEqual() { var img = new Media(); bool actual = img.Equals((object) null); Assert.That(actual, Is.False); }
public void GivenAnImageObject_WhenItIsComparedToItself_ThenTheyAreEqual() { var img = new Media(); bool actual = img.Equals(img); Assert.That(actual, Is.True); }
public void GivenAnImageObject_WhenItIsComparedToAnotherType_ThenTheyAreNotEqual() { var img = new Media(); bool actual = img.Equals("string"); Assert.That(actual, Is.False); }