public void op_FromString_stringZz() { const long expected = (36 * 36) - 1; long actual = AlphaDecimal.FromString("zz"); Assert.Equal(expected, actual); }
public void op_FromString_stringLongMin() { const long expected = long.MinValue + 1; long actual = AlphaDecimal.FromString("-1y2p0ij32e8e7"); Assert.Equal(expected, actual); }
public void op_FromString_stringIntMin() { const long expected = int.MinValue + 1; long actual = AlphaDecimal.FromString("-zik0zj"); Assert.Equal(expected, actual); }
public void op_FromString_string() { const long expected = 0; long actual = AlphaDecimal.FromString("0"); Assert.Equal(expected, actual); }
public void op_FromString_stringBig() { var value = new Guid("f71ae311-462f-4f65-a704-8eb9fe49a679"); AlphaDecimal expected = new BigInteger(value.ToByteArray()); var actual = AlphaDecimal.FromString("779q4dambvi6xhpfak8ne5ekx"); Assert.Equal(expected, actual); }
public void op_FromString_stringNull() { Assert.Throws <ArgumentNullException>(() => AlphaDecimal.FromString(null)); }
public void op_FromString_stringInvalid() { Assert.Throws <FormatException>(() => AlphaDecimal.FromString("!")); }
public void op_FromString_stringEmpty() { Assert.Throws <ArgumentOutOfRangeException>(() => AlphaDecimal.FromString(string.Empty)); }