示例#1
0
        public void Negate_WithNagatableAmount_ShouldReturnNagatedValue(long value, long expected)
        {
            // Arrange.
            var amount = new TokenAmount(value);

            // Act.
            var negated = TokenAmount.Negate(amount);

            // Assert.
            Assert.Equal(new TokenAmount(expected), negated);
        }
示例#2
0
        public void Negate_WithMinValue_ShouldThrow()
        {
            var v = new TokenAmount(long.MinValue);

            Assert.Throws <OverflowException>(() => TokenAmount.Negate(v));
        }