Пример #1
0
        public void Equals_WithValueGreaterThan_ShouldReturnFalse(long left, long right)
        {
            var first  = new TokenAmount(left);
            var second = new TokenAmount(right);

            Assert.False(first.Equals(second));
            Assert.False(first.Equals((object)second));
            Assert.False(first == second);
        }
Пример #2
0
        public void Equals_WithSameValue_ShouldReturnTrue(long value)
        {
            var first  = new TokenAmount(value);
            var second = new TokenAmount(value);

            Assert.True(first.Equals(second));
            Assert.True(first.Equals((object)second));
            Assert.True(first == second);
        }
Пример #3
0
        public void Equals_WithDifferentType_ShouldReturnFalse()
        {
            var first = new TokenAmount(0);

            Assert.False(first.Equals(0L));
        }
Пример #4
0
        public void Equals_WithNull_ShouldReturnFalse()
        {
            var first = new TokenAmount(0);

            Assert.False(first.Equals(null));
        }