예제 #1
0
 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();
 }
예제 #2
0
 public void GivenTwoImageObjects_WhenOneIsNull_AndItIsCastToObject_ThenTheyAreNotEqual()
 {
     var img = new Media();
     bool actual = img.Equals((object) null);
     Assert.That(actual, Is.False);
 }
예제 #3
0
 public void GivenAnImageObject_WhenItIsComparedToItself_ThenTheyAreEqual()
 {
     var img = new Media();
     bool actual = img.Equals(img);
     Assert.That(actual, Is.True);
 }
예제 #4
0
 public void GivenAnImageObject_WhenItIsComparedToAnotherType_ThenTheyAreNotEqual()
 {
     var img = new Media();
     bool actual = img.Equals("string");
     Assert.That(actual, Is.False);
 }