public void ParseToStringRoundTrip( [CombinatorialValues( "123456789012345678901234567.890123456", "79228162514264337593543950335.000000001", MaxText, EpsilonText, "5", "50", "50.01", "0.1", "0.123", "0.00123" )] string text, bool negate) { if (negate) { text = "-" + text; } BigQueryNumeric numeric = BigQueryNumeric.Parse(text); Assert.Equal(text, numeric.ToString()); // Check that TryParse works too Assert.True(BigQueryNumeric.TryParse(text, out var numeric2)); Assert.Equal(numeric, numeric2); }
public void ConversionFromDecimal( [CombinatorialValues( "1", "10", "1.123456789", "79228162514264337593543950335", // decimal.MaxValue "1234567890123456789012345678" )] string text, bool negate) { if (negate) { text = "-" + text; } decimal parsed = decimal.Parse(text, CultureInfo.InvariantCulture); BigQueryNumeric numeric = (BigQueryNumeric)parsed; Assert.Equal(text, numeric.ToString()); }
public void ConversionFromUInt64(ulong input) { BigQueryNumeric value = input; Assert.Equal(input.ToString(CultureInfo.InvariantCulture), value.ToString()); }
public string ToString_Integer() => IntegerSample.ToString();
public string ToString_Medium() => MediumSample.ToString();
public string ToString_Huge() => HugeSample.ToString();