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); }
public void Negate_WithMinValue_ShouldThrow() { var v = new TokenAmount(long.MinValue); Assert.Throws <OverflowException>(() => TokenAmount.Negate(v)); }