Exemplo n.º 1
0
        [InlineData("\u00BD")] // 1/2 character
        public void ToClrDecimal_Invalid(string text)
        {
            var proto = new Google.Type.Decimal {
                Value = text
            };

            Assert.Throws <FormatException>(() => proto.ToClrDecimal());
        }
Exemplo n.º 2
0
        public void ToClrDecimal_Overflow(string text)
        {
            var proto = new Google.Type.Decimal {
                Value = text
            };

            Assert.Throws <OverflowException>(() => proto.ToClrDecimal());
        }
Exemplo n.º 3
0
        public void ToClrDecimal(string text, decimal expectedValue)
        {
            var proto = new Google.Type.Decimal {
                Value = text
            };
            var clr = proto.ToClrDecimal();

            Assert.Equal(expectedValue, clr);
        }