コード例 #1
0
ファイル: ValuedNodeTests.cs プロジェクト: yuryk53/dotnetrdf
 public void ShouldCorrectlyPerformRoundtripConversionOfSingleValuedNodesRegardlessOfCulture()
 {
     foreach (var ci in TestedCultureInfos)
     {
         TestTools.ExecuteWithChangedCulture(ci, () => RoundTripValuedNodeConversion(3.4f, n => n.AsFloat()));
     }
 }
コード例 #2
0
 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()));
     }
 }
コード例 #3
0
 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)));
         });
     }
 }
コード例 #4
0
 public void ShouldApplyInvariantFormattingToLongLiteralStringRegardlessOfCulture(CultureInfo ci)
 {
     TestTools.ExecuteWithChangedCulture(ci, () => AssertLiteralString("3400000", () => new LongNode(_graph, 3400000L)));
 }
コード例 #5
0
 public void ShouldApplyInvariantFormattingToFloatLiteralStringRegardlessOfCulture(CultureInfo ci)
 {
     TestTools.ExecuteWithChangedCulture(ci, () => AssertLiteralString("3.4", () => new FloatNode(_graph, 3.4f)));
 }