diff --git a/Common/UnitDefinitions/AreaMomentOfInertia.json b/Common/UnitDefinitions/AreaMomentOfInertia.json index 29dd2f5530..3bb85e08f5 100644 --- a/Common/UnitDefinitions/AreaMomentOfInertia.json +++ b/Common/UnitDefinitions/AreaMomentOfInertia.json @@ -17,7 +17,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "m⁴", "m^4" ] + "Abbreviations": [ "m⁴" ] } ] }, @@ -32,7 +32,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "dm⁴", "dm^4" ] + "Abbreviations": [ "dm⁴" ] } ] }, @@ -47,7 +47,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "cm⁴", "cm^4" ] + "Abbreviations": [ "cm⁴" ] } ] }, @@ -62,7 +62,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "mm⁴", "mm^4" ] + "Abbreviations": [ "mm⁴" ] } ] }, @@ -77,7 +77,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "ft⁴", "ft^4" ] + "Abbreviations": [ "ft⁴" ] } ] }, @@ -92,7 +92,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "in⁴", "in^4" ] + "Abbreviations": [ "in⁴" ] } ] } diff --git a/Common/UnitDefinitions/Entropy.json b/Common/UnitDefinitions/Entropy.json index cf45d4be28..b523c8dd49 100644 --- a/Common/UnitDefinitions/Entropy.json +++ b/Common/UnitDefinitions/Entropy.json @@ -44,7 +44,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "J/C" ] + "Abbreviations": [ "J/°C" ] } ] } diff --git a/Common/UnitDefinitions/MolarEntropy.json b/Common/UnitDefinitions/MolarEntropy.json index 53b6c96bd5..5179ead524 100644 --- a/Common/UnitDefinitions/MolarEntropy.json +++ b/Common/UnitDefinitions/MolarEntropy.json @@ -19,7 +19,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "J/(mol*K)" ] + "Abbreviations": [ "J/(mol·K)" ] } ] } diff --git a/Common/UnitDefinitions/SpecificEntropy.json b/Common/UnitDefinitions/SpecificEntropy.json index 1bcecf5c26..998c6e9bd7 100644 --- a/Common/UnitDefinitions/SpecificEntropy.json +++ b/Common/UnitDefinitions/SpecificEntropy.json @@ -17,7 +17,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "J/kg.K" ] + "Abbreviations": [ "J/kg·K" ] } ] }, @@ -30,7 +30,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "J/kg.C" ] + "Abbreviations": [ "J/kg·°C" ] } ] }, @@ -43,7 +43,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "cal/g.K" ] + "Abbreviations": [ "cal/g·K" ] } ] }, diff --git a/Common/UnitDefinitions/SpecificFuelConsumption.json b/Common/UnitDefinitions/SpecificFuelConsumption.json index 52516e863d..82f94b6804 100644 --- a/Common/UnitDefinitions/SpecificFuelConsumption.json +++ b/Common/UnitDefinitions/SpecificFuelConsumption.json @@ -24,7 +24,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "kg/(kgf�h)" ] + "Abbreviations": [ "kg/(kgf·h)" ] } ] }, @@ -37,8 +37,8 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "g/(kN�s)" ], - "AbbreviationsForPrefixes": { "Kilo": [ "kg/(kN�s)" ] } + "Abbreviations": [ "g/(kN·s)" ], + "AbbreviationsForPrefixes": { "Kilo": [ "kg/(kN·s)" ] } } ] } diff --git a/Common/UnitDefinitions/WarpingMomentOfInertia.json b/Common/UnitDefinitions/WarpingMomentOfInertia.json index b8245dc80b..8142bc641d 100644 --- a/Common/UnitDefinitions/WarpingMomentOfInertia.json +++ b/Common/UnitDefinitions/WarpingMomentOfInertia.json @@ -17,7 +17,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "m⁶", "m^6" ] + "Abbreviations": [ "m⁶" ] } ] }, @@ -32,7 +32,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "dm⁶", "dm^6" ] + "Abbreviations": [ "dm⁶" ] } ] }, @@ -47,7 +47,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "cm⁶", "cm^6" ] + "Abbreviations": [ "cm⁶" ] } ] }, @@ -62,7 +62,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "mm⁶", "mm^6" ] + "Abbreviations": [ "mm⁶" ] } ] }, @@ -77,7 +77,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "ft⁶", "ft^6" ] + "Abbreviations": [ "ft⁶"] } ] }, @@ -92,7 +92,7 @@ "Localization": [ { "Culture": "en-US", - "Abbreviations": [ "in⁶", "in^6" ] + "Abbreviations": [ "in⁶" ] } ] } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs index 639b46b8e4..1da7da4d61 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/AreaMomentOfInertiaTestsBase.g.cs @@ -228,13 +228,6 @@ public void Parse() Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = AreaMomentOfInertia.Parse("1 cm^4", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.CentimetersToTheFourth, CentimetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = AreaMomentOfInertia.Parse("1 dm⁴", CultureInfo.GetCultureInfo("en-US")); @@ -242,13 +235,6 @@ public void Parse() Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = AreaMomentOfInertia.Parse("1 dm^4", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.DecimetersToTheFourth, DecimetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = AreaMomentOfInertia.Parse("1 ft⁴", CultureInfo.GetCultureInfo("en-US")); @@ -256,13 +242,6 @@ public void Parse() Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = AreaMomentOfInertia.Parse("1 ft^4", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.FeetToTheFourth, FeetToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = AreaMomentOfInertia.Parse("1 in⁴", CultureInfo.GetCultureInfo("en-US")); @@ -270,13 +249,6 @@ public void Parse() Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = AreaMomentOfInertia.Parse("1 in^4", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.InchesToTheFourth, InchesToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = AreaMomentOfInertia.Parse("1 m⁴", CultureInfo.GetCultureInfo("en-US")); @@ -284,13 +256,6 @@ public void Parse() Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = AreaMomentOfInertia.Parse("1 m^4", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.MetersToTheFourth, MetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = AreaMomentOfInertia.Parse("1 mm⁴", CultureInfo.GetCultureInfo("en-US")); @@ -298,13 +263,6 @@ public void Parse() Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = AreaMomentOfInertia.Parse("1 mm^4", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.MillimetersToTheFourth, MillimetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - } [Fact] @@ -316,72 +274,36 @@ public void TryParse() Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsed.Unit); } - { - Assert.True(AreaMomentOfInertia.TryParse("1 cm^4", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.CentimetersToTheFourth, CentimetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsed.Unit); - } - { Assert.True(AreaMomentOfInertia.TryParse("1 dm⁴", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.DecimetersToTheFourth, DecimetersToTheFourthTolerance); Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsed.Unit); } - { - Assert.True(AreaMomentOfInertia.TryParse("1 dm^4", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.DecimetersToTheFourth, DecimetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsed.Unit); - } - { Assert.True(AreaMomentOfInertia.TryParse("1 ft⁴", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.FeetToTheFourth, FeetToTheFourthTolerance); Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsed.Unit); } - { - Assert.True(AreaMomentOfInertia.TryParse("1 ft^4", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.FeetToTheFourth, FeetToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsed.Unit); - } - { Assert.True(AreaMomentOfInertia.TryParse("1 in⁴", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.InchesToTheFourth, InchesToTheFourthTolerance); Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsed.Unit); } - { - Assert.True(AreaMomentOfInertia.TryParse("1 in^4", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.InchesToTheFourth, InchesToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsed.Unit); - } - { Assert.True(AreaMomentOfInertia.TryParse("1 m⁴", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.MetersToTheFourth, MetersToTheFourthTolerance); Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsed.Unit); } - { - Assert.True(AreaMomentOfInertia.TryParse("1 m^4", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.MetersToTheFourth, MetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsed.Unit); - } - { Assert.True(AreaMomentOfInertia.TryParse("1 mm⁴", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.MillimetersToTheFourth, MillimetersToTheFourthTolerance); Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsed.Unit); } - { - Assert.True(AreaMomentOfInertia.TryParse("1 mm^4", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.MillimetersToTheFourth, MillimetersToTheFourthTolerance); - Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsed.Unit); - } - } [Fact] @@ -393,72 +315,36 @@ public void ParseUnit() Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = AreaMomentOfInertia.ParseUnit("cm^4", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = AreaMomentOfInertia.ParseUnit("dm⁴", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = AreaMomentOfInertia.ParseUnit("dm^4", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = AreaMomentOfInertia.ParseUnit("ft⁴", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = AreaMomentOfInertia.ParseUnit("ft^4", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = AreaMomentOfInertia.ParseUnit("in⁴", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = AreaMomentOfInertia.ParseUnit("in^4", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = AreaMomentOfInertia.ParseUnit("m⁴", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = AreaMomentOfInertia.ParseUnit("m^4", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = AreaMomentOfInertia.ParseUnit("mm⁴", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = AreaMomentOfInertia.ParseUnit("mm^4", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - } [Fact] @@ -469,61 +355,31 @@ public void TryParseUnit() Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsedUnit); } - { - Assert.True(AreaMomentOfInertia.TryParseUnit("cm^4", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(AreaMomentOfInertiaUnit.CentimeterToTheFourth, parsedUnit); - } - { Assert.True(AreaMomentOfInertia.TryParseUnit("dm⁴", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsedUnit); } - { - Assert.True(AreaMomentOfInertia.TryParseUnit("dm^4", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(AreaMomentOfInertiaUnit.DecimeterToTheFourth, parsedUnit); - } - { Assert.True(AreaMomentOfInertia.TryParseUnit("ft⁴", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsedUnit); } - { - Assert.True(AreaMomentOfInertia.TryParseUnit("ft^4", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(AreaMomentOfInertiaUnit.FootToTheFourth, parsedUnit); - } - { Assert.True(AreaMomentOfInertia.TryParseUnit("in⁴", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsedUnit); } - { - Assert.True(AreaMomentOfInertia.TryParseUnit("in^4", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(AreaMomentOfInertiaUnit.InchToTheFourth, parsedUnit); - } - { Assert.True(AreaMomentOfInertia.TryParseUnit("m⁴", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsedUnit); } - { - Assert.True(AreaMomentOfInertia.TryParseUnit("m^4", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(AreaMomentOfInertiaUnit.MeterToTheFourth, parsedUnit); - } - { Assert.True(AreaMomentOfInertia.TryParseUnit("mm⁴", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsedUnit); } - { - Assert.True(AreaMomentOfInertia.TryParseUnit("mm^4", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(AreaMomentOfInertiaUnit.MillimeterToTheFourth, parsedUnit); - } - } [Theory] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs index c2d5bec83d..b30aa5851c 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/EntropyTestsBase.g.cs @@ -240,7 +240,7 @@ public void Parse() try { - var parsed = Entropy.Parse("1 J/C", CultureInfo.GetCultureInfo("en-US")); + var parsed = Entropy.Parse("1 J/°C", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.JoulesPerDegreeCelsius, JoulesPerDegreeCelsiusTolerance); Assert.Equal(EntropyUnit.JoulePerDegreeCelsius, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -261,7 +261,7 @@ public void Parse() try { - var parsed = Entropy.Parse("1 kJ/C", CultureInfo.GetCultureInfo("en-US")); + var parsed = Entropy.Parse("1 kJ/°C", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.KilojoulesPerDegreeCelsius, KilojoulesPerDegreeCelsiusTolerance); Assert.Equal(EntropyUnit.KilojoulePerDegreeCelsius, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -292,7 +292,7 @@ public void TryParse() } { - Assert.True(Entropy.TryParse("1 J/C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(Entropy.TryParse("1 J/°C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.JoulesPerDegreeCelsius, JoulesPerDegreeCelsiusTolerance); Assert.Equal(EntropyUnit.JoulePerDegreeCelsius, parsed.Unit); } @@ -310,7 +310,7 @@ public void TryParse() } { - Assert.True(Entropy.TryParse("1 kJ/C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(Entropy.TryParse("1 kJ/°C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilojoulesPerDegreeCelsius, KilojoulesPerDegreeCelsiusTolerance); Assert.Equal(EntropyUnit.KilojoulePerDegreeCelsius, parsed.Unit); } @@ -340,7 +340,7 @@ public void ParseUnit() try { - var parsedUnit = Entropy.ParseUnit("J/C", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = Entropy.ParseUnit("J/°C", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(EntropyUnit.JoulePerDegreeCelsius, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -358,7 +358,7 @@ public void ParseUnit() try { - var parsedUnit = Entropy.ParseUnit("kJ/C", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = Entropy.ParseUnit("kJ/°C", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(EntropyUnit.KilojoulePerDegreeCelsius, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -385,7 +385,7 @@ public void TryParseUnit() } { - Assert.True(Entropy.TryParseUnit("J/C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(Entropy.TryParseUnit("J/°C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(EntropyUnit.JoulePerDegreeCelsius, parsedUnit); } @@ -400,7 +400,7 @@ public void TryParseUnit() } { - Assert.True(Entropy.TryParseUnit("kJ/C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(Entropy.TryParseUnit("kJ/°C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(EntropyUnit.KilojoulePerDegreeCelsius, parsedUnit); } @@ -617,10 +617,10 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { using var _ = new CultureScope("en-US"); Assert.Equal("1 cal/K", new Entropy(1, EntropyUnit.CaloriePerKelvin).ToString()); - Assert.Equal("1 J/C", new Entropy(1, EntropyUnit.JoulePerDegreeCelsius).ToString()); + Assert.Equal("1 J/°C", new Entropy(1, EntropyUnit.JoulePerDegreeCelsius).ToString()); Assert.Equal("1 J/K", new Entropy(1, EntropyUnit.JoulePerKelvin).ToString()); Assert.Equal("1 kcal/K", new Entropy(1, EntropyUnit.KilocaloriePerKelvin).ToString()); - Assert.Equal("1 kJ/C", new Entropy(1, EntropyUnit.KilojoulePerDegreeCelsius).ToString()); + Assert.Equal("1 kJ/°C", new Entropy(1, EntropyUnit.KilojoulePerDegreeCelsius).ToString()); Assert.Equal("1 kJ/K", new Entropy(1, EntropyUnit.KilojoulePerKelvin).ToString()); Assert.Equal("1 MJ/K", new Entropy(1, EntropyUnit.MegajoulePerKelvin).ToString()); } @@ -632,10 +632,10 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture var swedishCulture = CultureInfo.GetCultureInfo("sv-SE"); Assert.Equal("1 cal/K", new Entropy(1, EntropyUnit.CaloriePerKelvin).ToString(swedishCulture)); - Assert.Equal("1 J/C", new Entropy(1, EntropyUnit.JoulePerDegreeCelsius).ToString(swedishCulture)); + Assert.Equal("1 J/°C", new Entropy(1, EntropyUnit.JoulePerDegreeCelsius).ToString(swedishCulture)); Assert.Equal("1 J/K", new Entropy(1, EntropyUnit.JoulePerKelvin).ToString(swedishCulture)); Assert.Equal("1 kcal/K", new Entropy(1, EntropyUnit.KilocaloriePerKelvin).ToString(swedishCulture)); - Assert.Equal("1 kJ/C", new Entropy(1, EntropyUnit.KilojoulePerDegreeCelsius).ToString(swedishCulture)); + Assert.Equal("1 kJ/°C", new Entropy(1, EntropyUnit.KilojoulePerDegreeCelsius).ToString(swedishCulture)); Assert.Equal("1 kJ/K", new Entropy(1, EntropyUnit.KilojoulePerKelvin).ToString(swedishCulture)); Assert.Equal("1 MJ/K", new Entropy(1, EntropyUnit.MegajoulePerKelvin).ToString(swedishCulture)); } diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs index 5e701983bb..f24b7206e8 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/MolarEntropyTestsBase.g.cs @@ -193,21 +193,21 @@ public void Parse() { try { - var parsed = MolarEntropy.Parse("1 J/(mol*K)", CultureInfo.GetCultureInfo("en-US")); + var parsed = MolarEntropy.Parse("1 J/(mol·K)", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.JoulesPerMoleKelvin, JoulesPerMoleKelvinTolerance); Assert.Equal(MolarEntropyUnit.JoulePerMoleKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = MolarEntropy.Parse("1 kJ/(mol*K)", CultureInfo.GetCultureInfo("en-US")); + var parsed = MolarEntropy.Parse("1 kJ/(mol·K)", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.KilojoulesPerMoleKelvin, KilojoulesPerMoleKelvinTolerance); Assert.Equal(MolarEntropyUnit.KilojoulePerMoleKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = MolarEntropy.Parse("1 MJ/(mol*K)", CultureInfo.GetCultureInfo("en-US")); + var parsed = MolarEntropy.Parse("1 MJ/(mol·K)", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.MegajoulesPerMoleKelvin, MegajoulesPerMoleKelvinTolerance); Assert.Equal(MolarEntropyUnit.MegajoulePerMoleKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -218,19 +218,19 @@ public void Parse() public void TryParse() { { - Assert.True(MolarEntropy.TryParse("1 J/(mol*K)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(MolarEntropy.TryParse("1 J/(mol·K)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.JoulesPerMoleKelvin, JoulesPerMoleKelvinTolerance); Assert.Equal(MolarEntropyUnit.JoulePerMoleKelvin, parsed.Unit); } { - Assert.True(MolarEntropy.TryParse("1 kJ/(mol*K)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(MolarEntropy.TryParse("1 kJ/(mol·K)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilojoulesPerMoleKelvin, KilojoulesPerMoleKelvinTolerance); Assert.Equal(MolarEntropyUnit.KilojoulePerMoleKelvin, parsed.Unit); } { - Assert.True(MolarEntropy.TryParse("1 MJ/(mol*K)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(MolarEntropy.TryParse("1 MJ/(mol·K)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.MegajoulesPerMoleKelvin, MegajoulesPerMoleKelvinTolerance); Assert.Equal(MolarEntropyUnit.MegajoulePerMoleKelvin, parsed.Unit); } @@ -242,19 +242,19 @@ public void ParseUnit() { try { - var parsedUnit = MolarEntropy.ParseUnit("J/(mol*K)", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = MolarEntropy.ParseUnit("J/(mol·K)", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(MolarEntropyUnit.JoulePerMoleKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = MolarEntropy.ParseUnit("kJ/(mol*K)", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = MolarEntropy.ParseUnit("kJ/(mol·K)", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(MolarEntropyUnit.KilojoulePerMoleKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = MolarEntropy.ParseUnit("MJ/(mol*K)", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = MolarEntropy.ParseUnit("MJ/(mol·K)", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(MolarEntropyUnit.MegajoulePerMoleKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -264,17 +264,17 @@ public void ParseUnit() public void TryParseUnit() { { - Assert.True(MolarEntropy.TryParseUnit("J/(mol*K)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(MolarEntropy.TryParseUnit("J/(mol·K)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(MolarEntropyUnit.JoulePerMoleKelvin, parsedUnit); } { - Assert.True(MolarEntropy.TryParseUnit("kJ/(mol*K)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(MolarEntropy.TryParseUnit("kJ/(mol·K)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(MolarEntropyUnit.KilojoulePerMoleKelvin, parsedUnit); } { - Assert.True(MolarEntropy.TryParseUnit("MJ/(mol*K)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(MolarEntropy.TryParseUnit("MJ/(mol·K)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(MolarEntropyUnit.MegajoulePerMoleKelvin, parsedUnit); } @@ -476,9 +476,9 @@ public void BaseDimensionsShouldNeverBeNull() public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { using var _ = new CultureScope("en-US"); - Assert.Equal("1 J/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.JoulePerMoleKelvin).ToString()); - Assert.Equal("1 kJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString()); - Assert.Equal("1 MJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.MegajoulePerMoleKelvin).ToString()); + Assert.Equal("1 J/(mol·K)", new MolarEntropy(1, MolarEntropyUnit.JoulePerMoleKelvin).ToString()); + Assert.Equal("1 kJ/(mol·K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString()); + Assert.Equal("1 MJ/(mol·K)", new MolarEntropy(1, MolarEntropyUnit.MegajoulePerMoleKelvin).ToString()); } [Fact] @@ -487,29 +487,29 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture // Chose this culture, because we don't currently have any abbreviations mapped for that culture and we expect the en-US to be used as fallback. var swedishCulture = CultureInfo.GetCultureInfo("sv-SE"); - Assert.Equal("1 J/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.JoulePerMoleKelvin).ToString(swedishCulture)); - Assert.Equal("1 kJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString(swedishCulture)); - Assert.Equal("1 MJ/(mol*K)", new MolarEntropy(1, MolarEntropyUnit.MegajoulePerMoleKelvin).ToString(swedishCulture)); + Assert.Equal("1 J/(mol·K)", new MolarEntropy(1, MolarEntropyUnit.JoulePerMoleKelvin).ToString(swedishCulture)); + Assert.Equal("1 kJ/(mol·K)", new MolarEntropy(1, MolarEntropyUnit.KilojoulePerMoleKelvin).ToString(swedishCulture)); + Assert.Equal("1 MJ/(mol·K)", new MolarEntropy(1, MolarEntropyUnit.MegajoulePerMoleKelvin).ToString(swedishCulture)); } [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { var _ = new CultureScope(CultureInfo.InvariantCulture); - Assert.Equal("0.1 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s1")); - Assert.Equal("0.12 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s2")); - Assert.Equal("0.123 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3")); - Assert.Equal("0.1235 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s4")); + Assert.Equal("0.1 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s1")); + Assert.Equal("0.12 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s2")); + Assert.Equal("0.123 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3")); + Assert.Equal("0.1235 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s4")); } [Fact] public void ToString_SFormatAndCulture_FormatsNumberWithGivenDigitsAfterRadixForGivenCulture() { var culture = CultureInfo.InvariantCulture; - Assert.Equal("0.1 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s1", culture)); - Assert.Equal("0.12 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s2", culture)); - Assert.Equal("0.123 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3", culture)); - Assert.Equal("0.1235 J/(mol*K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s4", culture)); + Assert.Equal("0.1 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s1", culture)); + Assert.Equal("0.12 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s2", culture)); + Assert.Equal("0.123 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s3", culture)); + Assert.Equal("0.1235 J/(mol·K)", new MolarEntropy(0.123456, MolarEntropyUnit.JoulePerMoleKelvin).ToString("s4", culture)); } [Theory] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs index 820d863f60..fefb655f64 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificEntropyTestsBase.g.cs @@ -267,56 +267,56 @@ public void Parse() try { - var parsed = SpecificEntropy.Parse("1 cal/g.K", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 cal/g·K", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.CaloriesPerGramKelvin, CaloriesPerGramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.CaloriePerGramKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificEntropy.Parse("1 J/kg.C", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 J/kg·°C", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.JoulesPerKilogramDegreeCelsius, JoulesPerKilogramDegreeCelsiusTolerance); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificEntropy.Parse("1 J/kg.K", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 J/kg·K", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.JoulesPerKilogramKelvin, JoulesPerKilogramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificEntropy.Parse("1 kcal/g.K", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 kcal/g·K", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.KilocaloriesPerGramKelvin, KilocaloriesPerGramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.KilocaloriePerGramKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificEntropy.Parse("1 kJ/kg.C", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 kJ/kg·°C", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.KilojoulesPerKilogramDegreeCelsius, KilojoulesPerKilogramDegreeCelsiusTolerance); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificEntropy.Parse("1 kJ/kg.K", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 kJ/kg·K", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.KilojoulesPerKilogramKelvin, KilojoulesPerKilogramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificEntropy.Parse("1 MJ/kg.C", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 MJ/kg·°C", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.MegajoulesPerKilogramDegreeCelsius, MegajoulesPerKilogramDegreeCelsiusTolerance); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificEntropy.Parse("1 MJ/kg.K", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificEntropy.Parse("1 MJ/kg·K", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.MegajoulesPerKilogramKelvin, MegajoulesPerKilogramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramKelvin, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -339,49 +339,49 @@ public void TryParse() } { - Assert.True(SpecificEntropy.TryParse("1 cal/g.K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 cal/g·K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.CaloriesPerGramKelvin, CaloriesPerGramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.CaloriePerGramKelvin, parsed.Unit); } { - Assert.True(SpecificEntropy.TryParse("1 J/kg.C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 J/kg·°C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.JoulesPerKilogramDegreeCelsius, JoulesPerKilogramDegreeCelsiusTolerance); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, parsed.Unit); } { - Assert.True(SpecificEntropy.TryParse("1 J/kg.K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 J/kg·K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.JoulesPerKilogramKelvin, JoulesPerKilogramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramKelvin, parsed.Unit); } { - Assert.True(SpecificEntropy.TryParse("1 kcal/g.K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 kcal/g·K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilocaloriesPerGramKelvin, KilocaloriesPerGramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.KilocaloriePerGramKelvin, parsed.Unit); } { - Assert.True(SpecificEntropy.TryParse("1 kJ/kg.C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 kJ/kg·°C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilojoulesPerKilogramDegreeCelsius, KilojoulesPerKilogramDegreeCelsiusTolerance); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, parsed.Unit); } { - Assert.True(SpecificEntropy.TryParse("1 kJ/kg.K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 kJ/kg·K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilojoulesPerKilogramKelvin, KilojoulesPerKilogramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramKelvin, parsed.Unit); } { - Assert.True(SpecificEntropy.TryParse("1 MJ/kg.C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 MJ/kg·°C", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.MegajoulesPerKilogramDegreeCelsius, MegajoulesPerKilogramDegreeCelsiusTolerance); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, parsed.Unit); } { - Assert.True(SpecificEntropy.TryParse("1 MJ/kg.K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificEntropy.TryParse("1 MJ/kg·K", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.MegajoulesPerKilogramKelvin, MegajoulesPerKilogramKelvinTolerance); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramKelvin, parsed.Unit); } @@ -405,49 +405,49 @@ public void ParseUnit() try { - var parsedUnit = SpecificEntropy.ParseUnit("cal/g.K", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("cal/g·K", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.CaloriePerGramKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificEntropy.ParseUnit("J/kg.C", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("J/kg·°C", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificEntropy.ParseUnit("J/kg.K", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("J/kg·K", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificEntropy.ParseUnit("kcal/g.K", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("kcal/g·K", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.KilocaloriePerGramKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificEntropy.ParseUnit("kJ/kg.C", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("kJ/kg·°C", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificEntropy.ParseUnit("kJ/kg.K", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("kJ/kg·K", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificEntropy.ParseUnit("MJ/kg.C", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("MJ/kg·°C", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificEntropy.ParseUnit("MJ/kg.K", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificEntropy.ParseUnit("MJ/kg·K", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramKelvin, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -467,42 +467,42 @@ public void TryParseUnit() } { - Assert.True(SpecificEntropy.TryParseUnit("cal/g.K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("cal/g·K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.CaloriePerGramKelvin, parsedUnit); } { - Assert.True(SpecificEntropy.TryParseUnit("J/kg.C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("J/kg·°C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramDegreeCelsius, parsedUnit); } { - Assert.True(SpecificEntropy.TryParseUnit("J/kg.K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("J/kg·K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.JoulePerKilogramKelvin, parsedUnit); } { - Assert.True(SpecificEntropy.TryParseUnit("kcal/g.K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("kcal/g·K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.KilocaloriePerGramKelvin, parsedUnit); } { - Assert.True(SpecificEntropy.TryParseUnit("kJ/kg.C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("kJ/kg·°C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius, parsedUnit); } { - Assert.True(SpecificEntropy.TryParseUnit("kJ/kg.K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("kJ/kg·K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.KilojoulePerKilogramKelvin, parsedUnit); } { - Assert.True(SpecificEntropy.TryParseUnit("MJ/kg.C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("MJ/kg·°C", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius, parsedUnit); } { - Assert.True(SpecificEntropy.TryParseUnit("MJ/kg.K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificEntropy.TryParseUnit("MJ/kg·K", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificEntropyUnit.MegajoulePerKilogramKelvin, parsedUnit); } @@ -711,14 +711,14 @@ public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { using var _ = new CultureScope("en-US"); Assert.Equal("1 BTU/lb·°F", new SpecificEntropy(1, SpecificEntropyUnit.BtuPerPoundFahrenheit).ToString()); - Assert.Equal("1 cal/g.K", new SpecificEntropy(1, SpecificEntropyUnit.CaloriePerGramKelvin).ToString()); - Assert.Equal("1 J/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramDegreeCelsius).ToString()); - Assert.Equal("1 J/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString()); - Assert.Equal("1 kcal/g.K", new SpecificEntropy(1, SpecificEntropyUnit.KilocaloriePerGramKelvin).ToString()); - Assert.Equal("1 kJ/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius).ToString()); - Assert.Equal("1 kJ/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramKelvin).ToString()); - Assert.Equal("1 MJ/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius).ToString()); - Assert.Equal("1 MJ/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramKelvin).ToString()); + Assert.Equal("1 cal/g·K", new SpecificEntropy(1, SpecificEntropyUnit.CaloriePerGramKelvin).ToString()); + Assert.Equal("1 J/kg·°C", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramDegreeCelsius).ToString()); + Assert.Equal("1 J/kg·K", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString()); + Assert.Equal("1 kcal/g·K", new SpecificEntropy(1, SpecificEntropyUnit.KilocaloriePerGramKelvin).ToString()); + Assert.Equal("1 kJ/kg·°C", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius).ToString()); + Assert.Equal("1 kJ/kg·K", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramKelvin).ToString()); + Assert.Equal("1 MJ/kg·°C", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius).ToString()); + Assert.Equal("1 MJ/kg·K", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramKelvin).ToString()); } [Fact] @@ -728,34 +728,34 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture var swedishCulture = CultureInfo.GetCultureInfo("sv-SE"); Assert.Equal("1 BTU/lb·°F", new SpecificEntropy(1, SpecificEntropyUnit.BtuPerPoundFahrenheit).ToString(swedishCulture)); - Assert.Equal("1 cal/g.K", new SpecificEntropy(1, SpecificEntropyUnit.CaloriePerGramKelvin).ToString(swedishCulture)); - Assert.Equal("1 J/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramDegreeCelsius).ToString(swedishCulture)); - Assert.Equal("1 J/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString(swedishCulture)); - Assert.Equal("1 kcal/g.K", new SpecificEntropy(1, SpecificEntropyUnit.KilocaloriePerGramKelvin).ToString(swedishCulture)); - Assert.Equal("1 kJ/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius).ToString(swedishCulture)); - Assert.Equal("1 kJ/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramKelvin).ToString(swedishCulture)); - Assert.Equal("1 MJ/kg.C", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius).ToString(swedishCulture)); - Assert.Equal("1 MJ/kg.K", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramKelvin).ToString(swedishCulture)); + Assert.Equal("1 cal/g·K", new SpecificEntropy(1, SpecificEntropyUnit.CaloriePerGramKelvin).ToString(swedishCulture)); + Assert.Equal("1 J/kg·°C", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramDegreeCelsius).ToString(swedishCulture)); + Assert.Equal("1 J/kg·K", new SpecificEntropy(1, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString(swedishCulture)); + Assert.Equal("1 kcal/g·K", new SpecificEntropy(1, SpecificEntropyUnit.KilocaloriePerGramKelvin).ToString(swedishCulture)); + Assert.Equal("1 kJ/kg·°C", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramDegreeCelsius).ToString(swedishCulture)); + Assert.Equal("1 kJ/kg·K", new SpecificEntropy(1, SpecificEntropyUnit.KilojoulePerKilogramKelvin).ToString(swedishCulture)); + Assert.Equal("1 MJ/kg·°C", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramDegreeCelsius).ToString(swedishCulture)); + Assert.Equal("1 MJ/kg·K", new SpecificEntropy(1, SpecificEntropyUnit.MegajoulePerKilogramKelvin).ToString(swedishCulture)); } [Fact] public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { var _ = new CultureScope(CultureInfo.InvariantCulture); - Assert.Equal("0.1 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s1")); - Assert.Equal("0.12 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s2")); - Assert.Equal("0.123 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3")); - Assert.Equal("0.1235 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s4")); + Assert.Equal("0.1 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s1")); + Assert.Equal("0.12 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s2")); + Assert.Equal("0.123 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3")); + Assert.Equal("0.1235 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s4")); } [Fact] public void ToString_SFormatAndCulture_FormatsNumberWithGivenDigitsAfterRadixForGivenCulture() { var culture = CultureInfo.InvariantCulture; - Assert.Equal("0.1 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s1", culture)); - Assert.Equal("0.12 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s2", culture)); - Assert.Equal("0.123 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3", culture)); - Assert.Equal("0.1235 J/kg.K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s4", culture)); + Assert.Equal("0.1 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s1", culture)); + Assert.Equal("0.12 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s2", culture)); + Assert.Equal("0.123 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s3", culture)); + Assert.Equal("0.1235 J/kg·K", new SpecificEntropy(0.123456, SpecificEntropyUnit.JoulePerKilogramKelvin).ToString("s4", culture)); } [Theory] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs index ed5bc81782..c61c4dde7e 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/SpecificFuelConsumptionTestsBase.g.cs @@ -203,21 +203,21 @@ public void Parse() { try { - var parsed = SpecificFuelConsumption.Parse("1 g/(kN�s)", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificFuelConsumption.Parse("1 g/(kN·s)", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.GramsPerKiloNewtonSecond, GramsPerKiloNewtonSecondTolerance); Assert.Equal(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificFuelConsumption.Parse("1 kg/(kgf�h)", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificFuelConsumption.Parse("1 kg/(kgf·h)", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.KilogramsPerKilogramForceHour, KilogramsPerKilogramForceHourTolerance); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsed = SpecificFuelConsumption.Parse("1 kg/(kN�s)", CultureInfo.GetCultureInfo("en-US")); + var parsed = SpecificFuelConsumption.Parse("1 kg/(kN·s)", CultureInfo.GetCultureInfo("en-US")); AssertEx.EqualTolerance(1, parsed.KilogramsPerKiloNewtonSecond, KilogramsPerKiloNewtonSecondTolerance); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -235,19 +235,19 @@ public void Parse() public void TryParse() { { - Assert.True(SpecificFuelConsumption.TryParse("1 g/(kN�s)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificFuelConsumption.TryParse("1 g/(kN·s)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.GramsPerKiloNewtonSecond, GramsPerKiloNewtonSecondTolerance); Assert.Equal(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, parsed.Unit); } { - Assert.True(SpecificFuelConsumption.TryParse("1 kg/(kgf�h)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificFuelConsumption.TryParse("1 kg/(kgf·h)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilogramsPerKilogramForceHour, KilogramsPerKilogramForceHourTolerance); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, parsed.Unit); } { - Assert.True(SpecificFuelConsumption.TryParse("1 kg/(kN�s)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); + Assert.True(SpecificFuelConsumption.TryParse("1 kg/(kN·s)", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.KilogramsPerKiloNewtonSecond, KilogramsPerKiloNewtonSecondTolerance); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, parsed.Unit); } @@ -265,19 +265,19 @@ public void ParseUnit() { try { - var parsedUnit = SpecificFuelConsumption.ParseUnit("g/(kN�s)", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificFuelConsumption.ParseUnit("g/(kN·s)", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificFuelConsumption.ParseUnit("kg/(kgf�h)", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificFuelConsumption.ParseUnit("kg/(kgf·h)", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } try { - var parsedUnit = SpecificFuelConsumption.ParseUnit("kg/(kN�s)", CultureInfo.GetCultureInfo("en-US")); + var parsedUnit = SpecificFuelConsumption.ParseUnit("kg/(kN·s)", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } @@ -293,17 +293,17 @@ public void ParseUnit() public void TryParseUnit() { { - Assert.True(SpecificFuelConsumption.TryParseUnit("g/(kN�s)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificFuelConsumption.TryParseUnit("g/(kN·s)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond, parsedUnit); } { - Assert.True(SpecificFuelConsumption.TryParseUnit("kg/(kgf�h)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificFuelConsumption.TryParseUnit("kg/(kgf·h)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour, parsedUnit); } { - Assert.True(SpecificFuelConsumption.TryParseUnit("kg/(kN�s)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); + Assert.True(SpecificFuelConsumption.TryParseUnit("kg/(kN·s)", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond, parsedUnit); } @@ -511,9 +511,9 @@ public void BaseDimensionsShouldNeverBeNull() public void ToString_ReturnsValueAndUnitAbbreviationInCurrentCulture() { using var _ = new CultureScope("en-US"); - Assert.Equal("1 g/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString()); - Assert.Equal("1 kg/(kgf�h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour).ToString()); - Assert.Equal("1 kg/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond).ToString()); + Assert.Equal("1 g/(kN·s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString()); + Assert.Equal("1 kg/(kgf·h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour).ToString()); + Assert.Equal("1 kg/(kN·s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond).ToString()); Assert.Equal("1 lb/(lbf·h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour).ToString()); } @@ -523,9 +523,9 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture // Chose this culture, because we don't currently have any abbreviations mapped for that culture and we expect the en-US to be used as fallback. var swedishCulture = CultureInfo.GetCultureInfo("sv-SE"); - Assert.Equal("1 g/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString(swedishCulture)); - Assert.Equal("1 kg/(kgf�h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour).ToString(swedishCulture)); - Assert.Equal("1 kg/(kN�s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond).ToString(swedishCulture)); + Assert.Equal("1 g/(kN·s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString(swedishCulture)); + Assert.Equal("1 kg/(kgf·h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKilogramForceHour).ToString(swedishCulture)); + Assert.Equal("1 kg/(kN·s)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.KilogramPerKiloNewtonSecond).ToString(swedishCulture)); Assert.Equal("1 lb/(lbf·h)", new SpecificFuelConsumption(1, SpecificFuelConsumptionUnit.PoundMassPerPoundForceHour).ToString(swedishCulture)); } @@ -533,20 +533,20 @@ public void ToString_WithSwedishCulture_ReturnsUnitAbbreviationForEnglishCulture public void ToString_SFormat_FormatsNumberWithGivenDigitsAfterRadixForCurrentCulture() { var _ = new CultureScope(CultureInfo.InvariantCulture); - Assert.Equal("0.1 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s1")); - Assert.Equal("0.12 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s2")); - Assert.Equal("0.123 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3")); - Assert.Equal("0.1235 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s4")); + Assert.Equal("0.1 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s1")); + Assert.Equal("0.12 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s2")); + Assert.Equal("0.123 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3")); + Assert.Equal("0.1235 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s4")); } [Fact] public void ToString_SFormatAndCulture_FormatsNumberWithGivenDigitsAfterRadixForGivenCulture() { var culture = CultureInfo.InvariantCulture; - Assert.Equal("0.1 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s1", culture)); - Assert.Equal("0.12 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s2", culture)); - Assert.Equal("0.123 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3", culture)); - Assert.Equal("0.1235 g/(kN�s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s4", culture)); + Assert.Equal("0.1 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s1", culture)); + Assert.Equal("0.12 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s2", culture)); + Assert.Equal("0.123 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s3", culture)); + Assert.Equal("0.1235 g/(kN·s)", new SpecificFuelConsumption(0.123456, SpecificFuelConsumptionUnit.GramPerKiloNewtonSecond).ToString("s4", culture)); } [Theory] diff --git a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs index 1d3b825ede..b8aef0e219 100644 --- a/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs +++ b/UnitsNet.Tests/GeneratedCode/TestsBase/WarpingMomentOfInertiaTestsBase.g.cs @@ -228,13 +228,6 @@ public void Parse() Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = WarpingMomentOfInertia.Parse("1 cm^6", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.CentimetersToTheSixth, CentimetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = WarpingMomentOfInertia.Parse("1 dm⁶", CultureInfo.GetCultureInfo("en-US")); @@ -242,13 +235,6 @@ public void Parse() Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = WarpingMomentOfInertia.Parse("1 dm^6", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.DecimetersToTheSixth, DecimetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = WarpingMomentOfInertia.Parse("1 ft⁶", CultureInfo.GetCultureInfo("en-US")); @@ -256,13 +242,6 @@ public void Parse() Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = WarpingMomentOfInertia.Parse("1 ft^6", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.FeetToTheSixth, FeetToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = WarpingMomentOfInertia.Parse("1 in⁶", CultureInfo.GetCultureInfo("en-US")); @@ -270,13 +249,6 @@ public void Parse() Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = WarpingMomentOfInertia.Parse("1 in^6", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.InchesToTheSixth, InchesToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = WarpingMomentOfInertia.Parse("1 m⁶", CultureInfo.GetCultureInfo("en-US")); @@ -284,13 +256,6 @@ public void Parse() Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = WarpingMomentOfInertia.Parse("1 m^6", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.MetersToTheSixth, MetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsed = WarpingMomentOfInertia.Parse("1 mm⁶", CultureInfo.GetCultureInfo("en-US")); @@ -298,13 +263,6 @@ public void Parse() Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsed.Unit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsed = WarpingMomentOfInertia.Parse("1 mm^6", CultureInfo.GetCultureInfo("en-US")); - AssertEx.EqualTolerance(1, parsed.MillimetersToTheSixth, MillimetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsed.Unit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - } [Fact] @@ -316,72 +274,36 @@ public void TryParse() Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsed.Unit); } - { - Assert.True(WarpingMomentOfInertia.TryParse("1 cm^6", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.CentimetersToTheSixth, CentimetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsed.Unit); - } - { Assert.True(WarpingMomentOfInertia.TryParse("1 dm⁶", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.DecimetersToTheSixth, DecimetersToTheSixthTolerance); Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsed.Unit); } - { - Assert.True(WarpingMomentOfInertia.TryParse("1 dm^6", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.DecimetersToTheSixth, DecimetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsed.Unit); - } - { Assert.True(WarpingMomentOfInertia.TryParse("1 ft⁶", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.FeetToTheSixth, FeetToTheSixthTolerance); Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsed.Unit); } - { - Assert.True(WarpingMomentOfInertia.TryParse("1 ft^6", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.FeetToTheSixth, FeetToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsed.Unit); - } - { Assert.True(WarpingMomentOfInertia.TryParse("1 in⁶", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.InchesToTheSixth, InchesToTheSixthTolerance); Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsed.Unit); } - { - Assert.True(WarpingMomentOfInertia.TryParse("1 in^6", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.InchesToTheSixth, InchesToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsed.Unit); - } - { Assert.True(WarpingMomentOfInertia.TryParse("1 m⁶", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.MetersToTheSixth, MetersToTheSixthTolerance); Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsed.Unit); } - { - Assert.True(WarpingMomentOfInertia.TryParse("1 m^6", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.MetersToTheSixth, MetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsed.Unit); - } - { Assert.True(WarpingMomentOfInertia.TryParse("1 mm⁶", CultureInfo.GetCultureInfo("en-US"), out var parsed)); AssertEx.EqualTolerance(1, parsed.MillimetersToTheSixth, MillimetersToTheSixthTolerance); Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsed.Unit); } - { - Assert.True(WarpingMomentOfInertia.TryParse("1 mm^6", CultureInfo.GetCultureInfo("en-US"), out var parsed)); - AssertEx.EqualTolerance(1, parsed.MillimetersToTheSixth, MillimetersToTheSixthTolerance); - Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsed.Unit); - } - } [Fact] @@ -393,72 +315,36 @@ public void ParseUnit() Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = WarpingMomentOfInertia.ParseUnit("cm^6", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("dm⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = WarpingMomentOfInertia.ParseUnit("dm^6", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("ft⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = WarpingMomentOfInertia.ParseUnit("ft^6", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("in⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = WarpingMomentOfInertia.ParseUnit("in^6", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("m⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = WarpingMomentOfInertia.ParseUnit("m^6", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try { var parsedUnit = WarpingMomentOfInertia.ParseUnit("mm⁶", CultureInfo.GetCultureInfo("en-US")); Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsedUnit); } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - try - { - var parsedUnit = WarpingMomentOfInertia.ParseUnit("mm^6", CultureInfo.GetCultureInfo("en-US")); - Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsedUnit); - } catch (AmbiguousUnitParseException) { /* Some units have the same abbreviations */ } - } [Fact] @@ -469,61 +355,31 @@ public void TryParseUnit() Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsedUnit); } - { - Assert.True(WarpingMomentOfInertia.TryParseUnit("cm^6", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(WarpingMomentOfInertiaUnit.CentimeterToTheSixth, parsedUnit); - } - { Assert.True(WarpingMomentOfInertia.TryParseUnit("dm⁶", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsedUnit); } - { - Assert.True(WarpingMomentOfInertia.TryParseUnit("dm^6", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(WarpingMomentOfInertiaUnit.DecimeterToTheSixth, parsedUnit); - } - { Assert.True(WarpingMomentOfInertia.TryParseUnit("ft⁶", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsedUnit); } - { - Assert.True(WarpingMomentOfInertia.TryParseUnit("ft^6", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(WarpingMomentOfInertiaUnit.FootToTheSixth, parsedUnit); - } - { Assert.True(WarpingMomentOfInertia.TryParseUnit("in⁶", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsedUnit); } - { - Assert.True(WarpingMomentOfInertia.TryParseUnit("in^6", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(WarpingMomentOfInertiaUnit.InchToTheSixth, parsedUnit); - } - { Assert.True(WarpingMomentOfInertia.TryParseUnit("m⁶", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsedUnit); } - { - Assert.True(WarpingMomentOfInertia.TryParseUnit("m^6", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(WarpingMomentOfInertiaUnit.MeterToTheSixth, parsedUnit); - } - { Assert.True(WarpingMomentOfInertia.TryParseUnit("mm⁶", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsedUnit); } - { - Assert.True(WarpingMomentOfInertia.TryParseUnit("mm^6", CultureInfo.GetCultureInfo("en-US"), out var parsedUnit)); - Assert.Equal(WarpingMomentOfInertiaUnit.MillimeterToTheSixth, parsedUnit); - } - } [Theory] diff --git a/UnitsNet.Tests/QuantityTests.ToString.cs b/UnitsNet.Tests/QuantityTests.ToString.cs index 6c48083583..3458696b20 100644 --- a/UnitsNet.Tests/QuantityTests.ToString.cs +++ b/UnitsNet.Tests/QuantityTests.ToString.cs @@ -24,7 +24,7 @@ public void ReturnsTheOriginalValueAndUnit() Assert.Equal("0.0069 dB", Level.FromDecibels(0.0069).ToString(culture)); Assert.Equal("0.011 kWh/kg", SpecificEnergy.FromKilowattHoursPerKilogram(0.011).ToString(culture)); // Assert.Equal("0.1 MJ/kg·C", SpecificEntropy.FromMegajoulesPerKilogramDegreeCelsius(0.1).ToString(culture)); - Assert.Equal("0.1 MJ/kg.C", SpecificEntropy.FromMegajoulesPerKilogramDegreeCelsius(0.1).ToString(culture)); + Assert.Equal("0.1 MJ/kg·°C", SpecificEntropy.FromMegajoulesPerKilogramDegreeCelsius(0.1).ToString(culture)); Assert.Equal("5 cm", Length.FromCentimeters(5).ToString(culture)); } diff --git a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext index 5c66899ab8..c4c3b4402a 100644 --- a/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/AreaMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimetersToTheFourth=cm⁴,cm^4 -DecimetersToTheFourth=dm⁴,dm^4 -FeetToTheFourth=ft⁴,ft^4 -InchesToTheFourth=in⁴,in^4 -MetersToTheFourth=m⁴,m^4 -MillimetersToTheFourth=mm⁴,mm^4 +CentimetersToTheFourth=cm⁴ +DecimetersToTheFourth=dm⁴ +FeetToTheFourth=ft⁴ +InchesToTheFourth=in⁴ +MetersToTheFourth=m⁴ +MillimetersToTheFourth=mm⁴ diff --git a/UnitsNet/GeneratedCode/Resources/Entropy.restext b/UnitsNet/GeneratedCode/Resources/Entropy.restext index 91eb829c9b..aafd5ebe37 100644 --- a/UnitsNet/GeneratedCode/Resources/Entropy.restext +++ b/UnitsNet/GeneratedCode/Resources/Entropy.restext @@ -1,7 +1,7 @@ CaloriesPerKelvin=cal/K -JoulesPerDegreeCelsius=J/C +JoulesPerDegreeCelsius=J/°C JoulesPerKelvin=J/K KilocaloriesPerKelvin=kcal/K -KilojoulesPerDegreeCelsius=kJ/C +KilojoulesPerDegreeCelsius=kJ/°C KilojoulesPerKelvin=kJ/K MegajoulesPerKelvin=MJ/K diff --git a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext index 8c521b457c..e71ee1bd1d 100644 --- a/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/MolarEntropy.restext @@ -1,3 +1,3 @@ -JoulesPerMoleKelvin=J/(mol*K) -KilojoulesPerMoleKelvin=kJ/(mol*K) -MegajoulesPerMoleKelvin=MJ/(mol*K) +JoulesPerMoleKelvin=J/(mol·K) +KilojoulesPerMoleKelvin=kJ/(mol·K) +MegajoulesPerMoleKelvin=MJ/(mol·K) diff --git a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext index 371a4e2471..3aac1b5dfc 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificEntropy.restext @@ -1,9 +1,9 @@ BtusPerPoundFahrenheit=BTU/lb·°F,BTU/lbm·°F -CaloriesPerGramKelvin=cal/g.K -JoulesPerKilogramDegreeCelsius=J/kg.C -JoulesPerKilogramKelvin=J/kg.K -KilocaloriesPerGramKelvin=kcal/g.K -KilojoulesPerKilogramDegreeCelsius=kJ/kg.C -KilojoulesPerKilogramKelvin=kJ/kg.K -MegajoulesPerKilogramDegreeCelsius=MJ/kg.C -MegajoulesPerKilogramKelvin=MJ/kg.K +CaloriesPerGramKelvin=cal/g·K +JoulesPerKilogramDegreeCelsius=J/kg·°C +JoulesPerKilogramKelvin=J/kg·K +KilocaloriesPerGramKelvin=kcal/g·K +KilojoulesPerKilogramDegreeCelsius=kJ/kg·°C +KilojoulesPerKilogramKelvin=kJ/kg·K +MegajoulesPerKilogramDegreeCelsius=MJ/kg·°C +MegajoulesPerKilogramKelvin=MJ/kg·K diff --git a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext index 89e437194a..a7a2ad1171 100644 --- a/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext +++ b/UnitsNet/GeneratedCode/Resources/SpecificFuelConsumption.restext @@ -1,4 +1,4 @@ -GramsPerKiloNewtonSecond=g/(kN�s) -KilogramsPerKilogramForceHour=kg/(kgf�h) -KilogramsPerKiloNewtonSecond=kg/(kN�s) +GramsPerKiloNewtonSecond=g/(kN·s) +KilogramsPerKilogramForceHour=kg/(kgf·h) +KilogramsPerKiloNewtonSecond=kg/(kN·s) PoundsMassPerPoundForceHour=lb/(lbf·h) diff --git a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext index aacc58de54..6080485a3a 100644 --- a/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext +++ b/UnitsNet/GeneratedCode/Resources/WarpingMomentOfInertia.restext @@ -1,6 +1,6 @@ -CentimetersToTheSixth=cm⁶,cm^6 -DecimetersToTheSixth=dm⁶,dm^6 -FeetToTheSixth=ft⁶,ft^6 -InchesToTheSixth=in⁶,in^6 -MetersToTheSixth=m⁶,m^6 -MillimetersToTheSixth=mm⁶,mm^6 +CentimetersToTheSixth=cm⁶ +DecimetersToTheSixth=dm⁶ +FeetToTheSixth=ft⁶ +InchesToTheSixth=in⁶ +MetersToTheSixth=m⁶ +MillimetersToTheSixth=mm⁶