Exemple #1
0
        public void Same_Objects_Are_Equal()
        {
            // arrange
            var x        = new Currency("USD");
            var y        = new Currency("USD");
            var comparer = new CurrencyEqualityComparer();

            // act
            var actual = comparer.Equals(x, y);

            // assert
            Assert.True(actual);
        }
Exemple #2
0
        public void Different_Objects_Not_Equal()
        {
            // arrange
            var x        = new Currency("USD");
            var y        = new Currency("EUR");
            var comparer = new CurrencyEqualityComparer();

            // act
            var actual = comparer.Equals(x, y);

            // assert
            Assert.False(actual);
        }