Ejemplo n.º 1
0
 public static void AssertIsEqual(ModelWithAutoIncrement actual, ModelWithAutoIncrement expected)
 {
     if (actual == null || expected == null)
     {
         Assert.That(actual == expected, Is.True);
         return;
     }
     Assert.That(actual.Id, Is.EqualTo(expected.Id));
     Assert.That(actual.Name, Is.EqualTo(expected.Name));
 }
Ejemplo n.º 2
0
 public bool Equals(ModelWithAutoIncrement other)
 {
     if (object.ReferenceEquals(null, other))
     {
         return(false);
     }
     if (object.ReferenceEquals(this, other))
     {
         return(true);
     }
     if (other.Id == this.Id)
     {
         return(object.Equals(other.Name, this.Name));
     }
     return(false);
 }