Exemplo n.º 1
0
 public void Money_has_value_based_equality()
 {
     var m1 = new Money("GBP", 12.34m);
     var m2 = new Money("GBP", 12.34m);
     Assert.False(object.ReferenceEquals(m1, m2));
     Assert.True(m1.Equals(m2));
     Assert.True(m1.GetHashCode() == m2.GetHashCode());
 }
Exemplo n.º 2
0
        public void Money_has_value_based_equality()
        {
            var m1 = new Money("GBP", 12.34m);
            var m2 = new Money("GBP", 12.34m);

            Assert.False(object.ReferenceEquals(m1, m2));
            Assert.True(m1.Equals(m2));
            Assert.True(m1.GetHashCode() == m2.GetHashCode());
        }