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