public void ItShouldBePossibleToImplicitlyCastNonNegativeDecimalToDecimal() { var value = Extensions.GetValue(() => NonNegativeDecimal.TryCreate(1, (NonEmptyString)"Value")); decimal castResult = value; castResult.ShouldBeOfType <decimal>(); }
public void NonNegativeDecimalCannotBeCreatedFromNegativeValue() { var result = NonNegativeDecimal.TryCreate(-1, (NonEmptyString)"Value"); result.IsSuccess.ShouldBeFalse(); }