public void ShouldCorrectlyPerformRoundtripConversionOfSingleValuedNodesRegardlessOfCulture() { foreach (var ci in TestedCultureInfos) { TestTools.ExecuteWithChangedCulture(ci, () => RoundTripValuedNodeConversion(3.4f, n => n.AsFloat())); } }
public void ShouldCorrectlyPerformRoundtripConversionOfDecimalValuedNodesRegardlessOfCulture() { foreach (var ci in TestedCultureInfos) { TestTools.ExecuteWithChangedCulture(ci, () => RoundTripValuedNodeConversion(3.4m, n => n.AsDecimal())); TestTools.ExecuteWithChangedCulture(ci, () => RoundTripValuedNodeConversion(1000000.0m, n => n.AsDecimal())); } }
public void ShouldSuccesfullyCompareDoubleNodeRegardlessOfCulture() { foreach (var ci in TestedCultureInfos) { TestTools.ExecuteWithChangedCulture(ci, () => { const double left = 1.4d; const double right = 3.55d; Assert.Equal(-1, ComparisonHelper.CompareLiterals(left.ToLiteral(_graph), right.ToLiteral(_graph))); }); } }
public void ShouldApplyInvariantFormattingToLongLiteralStringRegardlessOfCulture(CultureInfo ci) { TestTools.ExecuteWithChangedCulture(ci, () => AssertLiteralString("3400000", () => new LongNode(_graph, 3400000L))); }
public void ShouldApplyInvariantFormattingToFloatLiteralStringRegardlessOfCulture(CultureInfo ci) { TestTools.ExecuteWithChangedCulture(ci, () => AssertLiteralString("3.4", () => new FloatNode(_graph, 3.4f))); }