diff --git a/UnitsNet.Tests/CustomCode/AbsorbedDoseOfIonizingRadiationTests.cs b/UnitsNet.Tests/CustomCode/AbsorbedDoseOfIonizingRadiationTests.cs
index 2ca213c6bd..ae5cd79fe0 100644
--- a/UnitsNet.Tests/CustomCode/AbsorbedDoseOfIonizingRadiationTests.cs
+++ b/UnitsNet.Tests/CustomCode/AbsorbedDoseOfIonizingRadiationTests.cs
@@ -24,7 +24,6 @@ namespace UnitsNet.Tests.CustomCode
public class AbsorbedDoseOfIonizingRadiationTests : AbsorbedDoseOfIonizingRadiationTestsBase
{
// Override properties in base class here
- protected override bool SupportsSIUnitSystem => true;
protected override double CentigraysInOneGray => 100;
protected override double FemtograysInOneGray => 1E+15;
protected override double GigagraysInOneGray => 1E-9;
diff --git a/UnitsNet.Tests/CustomCode/AccelerationTests.cs b/UnitsNet.Tests/CustomCode/AccelerationTests.cs
index c8d7b14270..898b07807b 100644
--- a/UnitsNet.Tests/CustomCode/AccelerationTests.cs
+++ b/UnitsNet.Tests/CustomCode/AccelerationTests.cs
@@ -7,8 +7,6 @@ namespace UnitsNet.Tests
{
public class AccelerationTests : AccelerationTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double KilometersPerSecondSquaredInOneMeterPerSecondSquared => 1E-3;
protected override double MetersPerSecondSquaredInOneMeterPerSecondSquared => 1;
diff --git a/UnitsNet.Tests/CustomCode/AmountOfSubstanceTests.cs b/UnitsNet.Tests/CustomCode/AmountOfSubstanceTests.cs
index 92575fc6e9..205db5cd83 100644
--- a/UnitsNet.Tests/CustomCode/AmountOfSubstanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/AmountOfSubstanceTests.cs
@@ -28,8 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class AmountOfSubstanceTests : AmountOfSubstanceTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double CentimolesInOneMole => 1e2;
protected override double CentipoundMolesInOneMole => 0.002204622621848776 * 1e2;
protected override double DecimolesInOneMole => 1e1;
@@ -71,9 +69,10 @@ public void NumberOfParticlesInTwoMolesIsDoubleAvogadroConstant()
}
[Theory]
+ // 10 Moles of Oxygen weight 10 times as much as 1 Mole of Oxygen (MolarMass)
[InlineData(10, AmountOfSubstanceUnit.Mole,
- KnownQuantities.MolarMassOfOxygen, MolarMassUnit.GramPerMole,
- 10 * KnownQuantities.MolarMassOfOxygen, MassUnit.Gram)] // 10 Moles of Oxygen weight 10 times as much as 1 Mole of Oxygen (MolarMass)
+ KnownQuantities.MolarMassOfOxygen, MolarMassUnit.GramPerMole,
+ 10 * KnownQuantities.MolarMassOfOxygen, MassUnit.Gram)]
public void MassFromAmountOfSubstanceAndMolarMass(
double amountOfSubstanceValue, AmountOfSubstanceUnit amountOfSubstanceUnit,
double molarMassValue, MolarMassUnit molarMassUnit,
@@ -88,10 +87,11 @@ public void MassFromAmountOfSubstanceAndMolarMass(
}
[Theory]
+ // molarity(HCl) = 5g / (1.2L * 36.46) = 0.114 mol/l = 0.114 M
[InlineData(5, MassUnit.Gram,
- KnownQuantities.MolarMassHClInGramsPerMole, MolarMassUnit.GramPerMole,
- 1.2, VolumeUnit.Liter,
- 0.1142805, MolarityUnit.MolePerLiter)] // molarity(HCl) = 5g / (1.2L * 36.46) = 0.114 mol/l = 0.114 M
+ KnownQuantities.MolarMassHClInGramsPerMole, MolarMassUnit.GramPerMole,
+ 1.2, VolumeUnit.Liter,
+ 0.1142805, MolarityUnit.MolePerLiter)]
public void MolarityFromComponentMassAndSolutionVolume(
double componentMassValue, MassUnit componentMassUnit,
double componentMolarMassValue, MolarMassUnit componentMolarMassUnit,
@@ -109,10 +109,11 @@ public void MolarityFromComponentMassAndSolutionVolume(
}
[Theory]
+ // 1.2 L of solution required for obtaining 0.1142805 Moles/L from 5g HCl
[InlineData(5, MassUnit.Gram,
- KnownQuantities.MolarMassHClInGramsPerMole, MolarMassUnit.GramPerMole,
- 0.1142805, MolarityUnit.MolePerLiter,
- 1.2, VolumeUnit.Liter)] // 1.2 L of solution required for obtaining 0.1142805 Moles/L from 5g HCl
+ KnownQuantities.MolarMassHClInGramsPerMole, MolarMassUnit.GramPerMole,
+ 0.1142805, MolarityUnit.MolePerLiter,
+ 1.2, VolumeUnit.Liter)]
public void VolumeSolutionFromComponentMassAndDesiredConcentration(
double componentMassValue, MassUnit componentMassUnit,
double componentMolarMassValue, MolarMassUnit componentMolarMassUnit,
diff --git a/UnitsNet.Tests/CustomCode/AmplitudeRatioTests.cs b/UnitsNet.Tests/CustomCode/AmplitudeRatioTests.cs
index 01bd81d2a1..a9123f08af 100644
--- a/UnitsNet.Tests/CustomCode/AmplitudeRatioTests.cs
+++ b/UnitsNet.Tests/CustomCode/AmplitudeRatioTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class AmplitudeRatioTests : AmplitudeRatioTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DecibelMicrovoltsInOneDecibelVolt => 121;
protected override double DecibelMillivoltsInOneDecibelVolt => 61;
@@ -51,7 +50,7 @@ public void ExpectVoltageConvertedToAmplitudeRatioCorrectly(double voltage, doub
// Amplitude ratio increases linearly by 20 dBV with power-of-10 increases of voltage.
ElectricPotential v = ElectricPotential.FromVolts(voltage);
- double actual = AmplitudeRatio.FromElectricPotential(v).DecibelVolts;
+ var actual = AmplitudeRatio.FromElectricPotential(v).DecibelVolts;
Assert.Equal(expected, actual);
}
@@ -65,8 +64,8 @@ public void ExpectAmplitudeRatioConvertedToVoltageCorrectly(double amplitudeRati
{
// Voltage increases by powers of 10 for every 20 dBV increase in amplitude ratio.
AmplitudeRatio ar = AmplitudeRatio.FromDecibelVolts(amplitudeRatio);
-
- double actual = ar.ToElectricPotential().Volts;
+
+ var actual = ar.ToElectricPotential().Volts;
Assert.Equal(expected, actual);
}
@@ -80,8 +79,8 @@ public void ExpectAmplitudeRatioConvertedToVoltageCorrectly(double amplitudeRati
public void AmplitudeRatioToPowerRatio_50OhmImpedance(double dBmV, double expected)
{
AmplitudeRatio ampRatio = AmplitudeRatio.FromDecibelMillivolts(dBmV);
-
- double actual = Math.Round(ampRatio.ToPowerRatio(ElectricResistance.FromOhms(50)).DecibelMilliwatts, 2);
+
+ var actual = Math.Round(ampRatio.ToPowerRatio(ElectricResistance.FromOhms(50)).DecibelMilliwatts, 2);
Assert.Equal(expected, actual);
}
@@ -93,8 +92,8 @@ public void AmplitudeRatioToPowerRatio_50OhmImpedance(double dBmV, double expect
public void AmplitudeRatioToPowerRatio_75OhmImpedance(double dBmV, double expected)
{
AmplitudeRatio ampRatio = AmplitudeRatio.FromDecibelMillivolts(dBmV);
-
- double actual = Math.Round(ampRatio.ToPowerRatio(ElectricResistance.FromOhms(75)).DecibelMilliwatts, 2);
+
+ var actual = Math.Round(ampRatio.ToPowerRatio(ElectricResistance.FromOhms(75)).DecibelMilliwatts, 2);
Assert.Equal(expected, actual);
}
}
diff --git a/UnitsNet.Tests/CustomCode/AngleTests.cs b/UnitsNet.Tests/CustomCode/AngleTests.cs
index 8871ca2b8c..b886d2762f 100644
--- a/UnitsNet.Tests/CustomCode/AngleTests.cs
+++ b/UnitsNet.Tests/CustomCode/AngleTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class AngleTests : AngleTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double RadiansInOneRadian => 1;
protected override double DeciradiansInOneRadian => 1E1;
protected override double CentiradiansInOneRadian => 1E2;
diff --git a/UnitsNet.Tests/CustomCode/AreaDensityTests.cs b/UnitsNet.Tests/CustomCode/AreaDensityTests.cs
index e5b1b7102d..f9a113d705 100644
--- a/UnitsNet.Tests/CustomCode/AreaDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/AreaDensityTests.cs
@@ -28,8 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class AreaDensityTests : AreaDensityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double GramsPerSquareMeterInOneKilogramPerSquareMeter => 1000;
protected override double KilogramsPerSquareMeterInOneKilogramPerSquareMeter => 1;
diff --git a/UnitsNet.Tests/CustomCode/AreaMomentOfInertiaTests.cs b/UnitsNet.Tests/CustomCode/AreaMomentOfInertiaTests.cs
index 04fb07e048..e43027813d 100644
--- a/UnitsNet.Tests/CustomCode/AreaMomentOfInertiaTests.cs
+++ b/UnitsNet.Tests/CustomCode/AreaMomentOfInertiaTests.cs
@@ -28,8 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class AreaMomentOfInertiaTests : AreaMomentOfInertiaTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double CentimetersToTheFourthInOneMeterToTheFourth => 1e8;
protected override double DecimetersToTheFourthInOneMeterToTheFourth => 1e4;
diff --git a/UnitsNet.Tests/CustomCode/AreaTests.cs b/UnitsNet.Tests/CustomCode/AreaTests.cs
index c4415f8fbc..5155977d1e 100644
--- a/UnitsNet.Tests/CustomCode/AreaTests.cs
+++ b/UnitsNet.Tests/CustomCode/AreaTests.cs
@@ -8,8 +8,6 @@ namespace UnitsNet.Tests
{
public class AreaTests : AreaTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double SquareKilometersInOneSquareMeter => 1E-6;
protected override double SquareMetersInOneSquareMeter => 1;
@@ -71,7 +69,7 @@ public void AreaTimesDensityEqualsLinearDensity()
[InlineData(0.5, 0.19634954084936208)]
[InlineData(1, 0.7853981633974483)]
[InlineData(2, 3.141592653589793)]
- public void AreaFromCicleDiameterCalculatedCorrectly(double diameterMeters, double expected)
+ public void AreaFromCircleDiameterCalculatedCorrectly(double diameterMeters, double expected)
{
Length diameter = Length.FromMeters(diameterMeters);
@@ -85,7 +83,7 @@ public void AreaFromCicleDiameterCalculatedCorrectly(double diameterMeters, doub
[InlineData(0.5, 0.7853981633974483)]
[InlineData(1, 3.141592653589793)]
[InlineData(2, 12.566370614359173)]
- public void AreaFromCicleRadiusCalculatedCorrectly(double radiusMeters, double expected)
+ public void AreaFromCircleRadiusCalculatedCorrectly(double radiusMeters, double expected)
{
Length radius = Length.FromMeters(radiusMeters);
diff --git a/UnitsNet.Tests/CustomCode/BitRateTests.cs b/UnitsNet.Tests/CustomCode/BitRateTests.cs
index e320ca2985..ad711f6d76 100644
--- a/UnitsNet.Tests/CustomCode/BitRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/BitRateTests.cs
@@ -27,8 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class BitRateTests : BitRateTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double BitsPerSecondInOneBitPerSecond => 1;
protected override double BytesPerSecondInOneBitPerSecond => 1.25E-1;
diff --git a/UnitsNet.Tests/CustomCode/BrakeSpecificFuelConsumptionTests.cs b/UnitsNet.Tests/CustomCode/BrakeSpecificFuelConsumptionTests.cs
index 9fd00bf3e2..95f6bbeb38 100644
--- a/UnitsNet.Tests/CustomCode/BrakeSpecificFuelConsumptionTests.cs
+++ b/UnitsNet.Tests/CustomCode/BrakeSpecificFuelConsumptionTests.cs
@@ -8,8 +8,6 @@ namespace UnitsNet.Tests
{
public class BrakeSpecificFuelConsumptionTests : BrakeSpecificFuelConsumptionTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double GramsPerKiloWattHourInOneKilogramPerJoule => 3600000000;
protected override double KilogramsPerJouleInOneKilogramPerJoule => 1.0;
@@ -26,15 +24,15 @@ public void PowerTimesBrakeSpecificFuelConsumptionEqualsMassFlow()
[Fact]
public void DoubleDividedByBrakeSpecificFuelConsumptionEqualsSpecificEnergy()
{
- SpecificEnergy massFlow = 2.0 / BrakeSpecificFuelConsumption.FromKilogramsPerJoule(4.0);
+ SpecificEnergy massFlow = 2 / BrakeSpecificFuelConsumption.FromKilogramsPerJoule(4);
Assert.Equal(SpecificEnergy.FromJoulesPerKilogram(0.5), massFlow);
}
[Fact]
public void BrakeSpecificFuelConsumptionTimesSpecificEnergyEqualsEnergy()
{
- double value = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(20.0) * SpecificEnergy.FromJoulesPerKilogram(10.0);
- Assert.Equal(200.0, value);
+ var value = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(20) * SpecificEnergy.FromJoulesPerKilogram(10);
+ Assert.Equal(200, value);
}
}
}
diff --git a/UnitsNet.Tests/CustomCode/CoefficientOfThermalExpansionTests.cs b/UnitsNet.Tests/CustomCode/CoefficientOfThermalExpansionTests.cs
index 29008018fa..e6a4aaceff 100644
--- a/UnitsNet.Tests/CustomCode/CoefficientOfThermalExpansionTests.cs
+++ b/UnitsNet.Tests/CustomCode/CoefficientOfThermalExpansionTests.cs
@@ -27,8 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class CoefficientOfThermalExpansionTests : CoefficientOfThermalExpansionTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double PerDegreeCelsiusInOnePerKelvin => 1.0;
protected override double PerDegreeFahrenheitInOnePerKelvin => 0.5555555555555556;
diff --git a/UnitsNet.Tests/CustomCode/CompressibilityTests.cs b/UnitsNet.Tests/CustomCode/CompressibilityTests.cs
index 689efed670..9f67b1223c 100644
--- a/UnitsNet.Tests/CustomCode/CompressibilityTests.cs
+++ b/UnitsNet.Tests/CustomCode/CompressibilityTests.cs
@@ -32,7 +32,5 @@ public class CompressibilityTests : CompressibilityTestsBase
protected override double InverseBarsInOneInversePascal => 1e-5;
protected override double InversePoundsForcePerSquareInchInOneInversePascal => 1.450377377302092151542e-4;
protected override double InverseAtmospheresInOneInversePascal => 9.86923266716013e-6;
-
- protected override bool SupportsSIUnitSystem => true;
}
}
diff --git a/UnitsNet.Tests/CustomCode/DensityTests.cs b/UnitsNet.Tests/CustomCode/DensityTests.cs
index 70e562d9c1..178e5043cb 100644
--- a/UnitsNet.Tests/CustomCode/DensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/DensityTests.cs
@@ -7,8 +7,6 @@ namespace UnitsNet.Tests
{
public class DensityTests : DensityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double MilligramsPerCubicMeterInOneKilogramPerCubicMeter => 1e6;
protected override double GramsPerCubicCentimeterInOneKilogramPerCubicMeter => 1e-3;
diff --git a/UnitsNet.Tests/CustomCode/DoseAreaProductTests.cs b/UnitsNet.Tests/CustomCode/DoseAreaProductTests.cs
index c5dc3284fc..cb531d0181 100644
--- a/UnitsNet.Tests/CustomCode/DoseAreaProductTests.cs
+++ b/UnitsNet.Tests/CustomCode/DoseAreaProductTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class DoseAreaProductTests : DoseAreaProductTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double CentigraySquareCentimetersInOneGraySquareMeter => 1E+6;
protected override double CentigraySquareDecimetersInOneGraySquareMeter => 1E+4;
protected override double CentigraySquareMetersInOneGraySquareMeter => 100;
diff --git a/UnitsNet.Tests/CustomCode/DurationTests.cs b/UnitsNet.Tests/CustomCode/DurationTests.cs
index d45f0c3d5a..62599c24d7 100644
--- a/UnitsNet.Tests/CustomCode/DurationTests.cs
+++ b/UnitsNet.Tests/CustomCode/DurationTests.cs
@@ -9,8 +9,6 @@ namespace UnitsNet.Tests
{
public class DurationTests : DurationTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double DaysInOneSecond => 1.15741e-5;
protected override double HoursInOneSecond => 0.0002777784;
diff --git a/UnitsNet.Tests/CustomCode/DynamicViscosityTests.cs b/UnitsNet.Tests/CustomCode/DynamicViscosityTests.cs
index 713ed4daea..d275a19597 100644
--- a/UnitsNet.Tests/CustomCode/DynamicViscosityTests.cs
+++ b/UnitsNet.Tests/CustomCode/DynamicViscosityTests.cs
@@ -8,8 +8,6 @@ namespace UnitsNet.Tests
{
public class DynamicViscosityTests : DynamicViscosityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double CentipoiseInOneNewtonSecondPerMeterSquared => 1e3;
protected override double MicropascalSecondsInOneNewtonSecondPerMeterSquared => 1e6;
protected override double MillipascalSecondsInOneNewtonSecondPerMeterSquared => 1e3;
diff --git a/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs
index b3817887d5..14a6982cf3 100644
--- a/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricAdmittanceTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricAdmittanceTests : ElectricAdmittanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double NanosiemensInOneSiemens => 1E9;
protected override double NanomhosInOneSiemens => 1E9;
diff --git a/UnitsNet.Tests/CustomCode/ElectricApparentPowerTests.cs b/UnitsNet.Tests/CustomCode/ElectricApparentPowerTests.cs
index 150dd10961..b683366814 100644
--- a/UnitsNet.Tests/CustomCode/ElectricApparentPowerTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricApparentPowerTests.cs
@@ -23,8 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricApparentPowerTests : ElectricApparentPowerTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double VoltamperesInOneVoltampere => 1;
protected override double KilovoltamperesInOneVoltampere => 1E-3;
diff --git a/UnitsNet.Tests/CustomCode/ElectricCapacitanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricCapacitanceTests.cs
index 176c2f892b..e314a96a86 100644
--- a/UnitsNet.Tests/CustomCode/ElectricCapacitanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricCapacitanceTests.cs
@@ -23,8 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricCapacitanceTests : ElectricCapacitanceTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double FaradsInOneFarad => 1;
protected override double MillifaradsInOneFarad => 1e3;
diff --git a/UnitsNet.Tests/CustomCode/ElectricChargeDensityTests.cs b/UnitsNet.Tests/CustomCode/ElectricChargeDensityTests.cs
index ebdc188ca9..28315edf4e 100644
--- a/UnitsNet.Tests/CustomCode/ElectricChargeDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricChargeDensityTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricChargeDensityTests : ElectricChargeDensityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double CoulombsPerCubicMeterInOneCoulombPerCubicMeter => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/ElectricChargeTests.cs b/UnitsNet.Tests/CustomCode/ElectricChargeTests.cs
index 019f0de886..5551c60b7a 100644
--- a/UnitsNet.Tests/CustomCode/ElectricChargeTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricChargeTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests
{
public class ElectricChargeTests : ElectricChargeTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double CoulombsInOneCoulomb => 1;
protected override double MilliampereHoursInOneCoulomb => 2.77777777777e-1;
protected override double AmpereHoursInOneCoulomb => 2.77777777777e-4;
diff --git a/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs
index 253e071237..7071ebb470 100644
--- a/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricConductanceTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricConductanceTests : ElectricConductanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double NanosiemensInOneSiemens => 1E9;
protected override double NanomhosInOneSiemens => 1E9;
diff --git a/UnitsNet.Tests/CustomCode/ElectricConductivityTests.cs b/UnitsNet.Tests/CustomCode/ElectricConductivityTests.cs
index 4e411738ec..9909e9febd 100644
--- a/UnitsNet.Tests/CustomCode/ElectricConductivityTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricConductivityTests.cs
@@ -29,7 +29,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricConductivityTests : ElectricConductivityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double SiemensPerMeterInOneSiemensPerMeter => 1;
protected override double SiemensPerInchInOneSiemensPerMeter => 2.54e-2;
protected override double SiemensPerFootInOneSiemensPerMeter => 3.048e-1;
diff --git a/UnitsNet.Tests/CustomCode/ElectricCurrentDensityTests.cs b/UnitsNet.Tests/CustomCode/ElectricCurrentDensityTests.cs
index 06c29d72c7..507bf52ff3 100644
--- a/UnitsNet.Tests/CustomCode/ElectricCurrentDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricCurrentDensityTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricCurrentDensityTests : ElectricCurrentDensityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double AmperesPerSquareMeterInOneAmperePerSquareMeter => 1;
protected override double AmperesPerSquareInchInOneAmperePerSquareMeter => 6.4516e-4;
protected override double AmperesPerSquareFootInOneAmperePerSquareMeter => 9.290304e-2;
diff --git a/UnitsNet.Tests/CustomCode/ElectricCurrentGradientTests.cs b/UnitsNet.Tests/CustomCode/ElectricCurrentGradientTests.cs
index f57f3d9190..b93535f7d7 100644
--- a/UnitsNet.Tests/CustomCode/ElectricCurrentGradientTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricCurrentGradientTests.cs
@@ -29,7 +29,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricCurrentGradientTests : ElectricCurrentGradientTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double AmperesPerSecondInOneAmperePerSecond => 1;
protected override double AmperesPerMillisecondInOneAmperePerSecond => 1e-03;
protected override double AmperesPerMicrosecondInOneAmperePerSecond => 1e-06;
diff --git a/UnitsNet.Tests/CustomCode/ElectricCurrentTests.cs b/UnitsNet.Tests/CustomCode/ElectricCurrentTests.cs
index 91822f7361..bd89eb62d0 100644
--- a/UnitsNet.Tests/CustomCode/ElectricCurrentTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricCurrentTests.cs
@@ -9,8 +9,6 @@ namespace UnitsNet.Tests
{
public class ElectricCurrentTests : ElectricCurrentTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double FemtoamperesInOneAmpere => 1e15;
protected override double PicoamperesInOneAmpere => 1e12;
diff --git a/UnitsNet.Tests/CustomCode/ElectricFieldTests.cs b/UnitsNet.Tests/CustomCode/ElectricFieldTests.cs
index 52d71ec36e..092e041fac 100644
--- a/UnitsNet.Tests/CustomCode/ElectricFieldTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricFieldTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricFieldTests : ElectricFieldTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double VoltsPerMeterInOneVoltPerMeter => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/ElectricImpedanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricImpedanceTests.cs
index 59152a115e..d84c5bcd66 100644
--- a/UnitsNet.Tests/CustomCode/ElectricImpedanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricImpedanceTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricImpedanceTests : ElectricImpedanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double NanoohmsInOneOhm => 1e9;
protected override double MicroohmsInOneOhm => 1e6;
diff --git a/UnitsNet.Tests/CustomCode/ElectricInductanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricInductanceTests.cs
index 029f8f452d..d423db50b7 100644
--- a/UnitsNet.Tests/CustomCode/ElectricInductanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricInductanceTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricInductanceTests : ElectricInductanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double HenriesInOneHenry => 1;
protected override double NanohenriesInOneHenry => 1e9;
protected override double MicrohenriesInOneHenry => 1e6;
diff --git a/UnitsNet.Tests/CustomCode/ElectricPotentialChangeRateTests.cs b/UnitsNet.Tests/CustomCode/ElectricPotentialChangeRateTests.cs
index 80dd69de4d..f34bd831d3 100644
--- a/UnitsNet.Tests/CustomCode/ElectricPotentialChangeRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricPotentialChangeRateTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricPotentialChangeRateTests : ElectricPotentialChangeRateTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double KilovoltsPerHourInOneVoltPerSecond => 3.6;
protected override double KilovoltsPerMicrosecondInOneVoltPerSecond => 1e-09;
protected override double KilovoltsPerMinuteInOneVoltPerSecond => 6e-2;
diff --git a/UnitsNet.Tests/CustomCode/ElectricPotentialTests.cs b/UnitsNet.Tests/CustomCode/ElectricPotentialTests.cs
index 7a0434f29f..5c174b1829 100644
--- a/UnitsNet.Tests/CustomCode/ElectricPotentialTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricPotentialTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests
{
public class ElectricPotentialTests : ElectricPotentialTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double MicrovoltsInOneVolt => 1e6;
protected override double MillivoltsInOneVolt => 1e3;
diff --git a/UnitsNet.Tests/CustomCode/ElectricReactanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricReactanceTests.cs
index 93158a3fd7..4d44009596 100644
--- a/UnitsNet.Tests/CustomCode/ElectricReactanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricReactanceTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricReactanceTests : ElectricReactanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double NanoohmsInOneOhm => 1e9;
protected override double MicroohmsInOneOhm => 1e6;
diff --git a/UnitsNet.Tests/CustomCode/ElectricReactivePowerTests.cs b/UnitsNet.Tests/CustomCode/ElectricReactivePowerTests.cs
index 1ee3157806..b05403d59a 100644
--- a/UnitsNet.Tests/CustomCode/ElectricReactivePowerTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricReactivePowerTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricReactivePowerTests : ElectricReactivePowerTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double VoltamperesReactiveInOneVoltampereReactive => 1;
protected override double KilovoltamperesReactiveInOneVoltampereReactive => 1E-3;
diff --git a/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs
index 898b7f2000..b4f43a4b1c 100644
--- a/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricResistanceTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests
{
public class ElectricResistanceTests : ElectricResistanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double NanoohmsInOneOhm => 1e9;
protected override double MicroohmsInOneOhm => 1e6;
diff --git a/UnitsNet.Tests/CustomCode/ElectricResistivityTests.cs b/UnitsNet.Tests/CustomCode/ElectricResistivityTests.cs
index e46e323a8e..5900851c11 100644
--- a/UnitsNet.Tests/CustomCode/ElectricResistivityTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricResistivityTests.cs
@@ -29,7 +29,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricResistivityTests : ElectricResistivityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double KiloohmsCentimeterInOneOhmMeter => 1e-1;
protected override double KiloohmMetersInOneOhmMeter => 1e-3;
diff --git a/UnitsNet.Tests/CustomCode/ElectricSurfaceChargeDensityTests.cs b/UnitsNet.Tests/CustomCode/ElectricSurfaceChargeDensityTests.cs
index b0566b25a5..5314164358 100644
--- a/UnitsNet.Tests/CustomCode/ElectricSurfaceChargeDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricSurfaceChargeDensityTests.cs
@@ -26,7 +26,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricSurfaceChargeDensityTests : ElectricSurfaceChargeDensityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double CoulombsPerSquareMeterInOneCoulombPerSquareMeter => 1.0;
protected override double CoulombsPerSquareCentimeterInOneCoulombPerSquareMeter => 1.0e-4;
diff --git a/UnitsNet.Tests/CustomCode/ElectricSusceptanceTests.cs b/UnitsNet.Tests/CustomCode/ElectricSusceptanceTests.cs
index 4f7b8cd9a9..cf3540b710 100644
--- a/UnitsNet.Tests/CustomCode/ElectricSusceptanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ElectricSusceptanceTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ElectricSusceptanceTests : ElectricSusceptanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double NanosiemensInOneSiemens => 1E9;
protected override double NanomhosInOneSiemens => 1E9;
diff --git a/UnitsNet.Tests/CustomCode/EnergyDensityTests.cs b/UnitsNet.Tests/CustomCode/EnergyDensityTests.cs
index 35e28b4a47..854615278f 100644
--- a/UnitsNet.Tests/CustomCode/EnergyDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/EnergyDensityTests.cs
@@ -25,8 +25,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class EnergyDensityTests : EnergyDensityTestsBase
{
- ///
- protected override bool SupportsSIUnitSystem => true;
///
protected override double GigajoulesPerCubicMeterInOneJoulePerCubicMeter => 1e-9;
///
diff --git a/UnitsNet.Tests/CustomCode/EnergyTests.cs b/UnitsNet.Tests/CustomCode/EnergyTests.cs
index d917278988..590fb328ec 100644
--- a/UnitsNet.Tests/CustomCode/EnergyTests.cs
+++ b/UnitsNet.Tests/CustomCode/EnergyTests.cs
@@ -9,7 +9,6 @@ namespace UnitsNet.Tests
{
public class EnergyTests : EnergyTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double ThermsImperialInOneJoule => 9.478171203551087813109937767482e-9;
protected override double JoulesInOneJoule => 1;
diff --git a/UnitsNet.Tests/CustomCode/EntropyTests.cs b/UnitsNet.Tests/CustomCode/EntropyTests.cs
index 6f78a14597..c6c16aea51 100644
--- a/UnitsNet.Tests/CustomCode/EntropyTests.cs
+++ b/UnitsNet.Tests/CustomCode/EntropyTests.cs
@@ -28,7 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class EntropyTests : EntropyTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double CaloriesPerKelvinInOneJoulePerKelvin => 0.239006;
protected override double JoulesPerDegreeCelsiusInOneJoulePerKelvin => 1e0;
protected override double JoulesPerKelvinInOneJoulePerKelvin => 1e0;
diff --git a/UnitsNet.Tests/CustomCode/ForceChangeRateTests.cs b/UnitsNet.Tests/CustomCode/ForceChangeRateTests.cs
index 0cb868befc..4f4ead01c8 100644
--- a/UnitsNet.Tests/CustomCode/ForceChangeRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/ForceChangeRateTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests
{
public class ForceChangeRateTests : ForceChangeRateTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double NewtonsPerMinuteInOneNewtonPerSecond => 60;
protected override double DecanewtonsPerMinuteInOneNewtonPerSecond => 6;
protected override double KilonewtonsPerMinuteInOneNewtonPerSecond => 0.06;
diff --git a/UnitsNet.Tests/CustomCode/ForcePerLengthTests.cs b/UnitsNet.Tests/CustomCode/ForcePerLengthTests.cs
index a9050dfeb8..410caf25cb 100644
--- a/UnitsNet.Tests/CustomCode/ForcePerLengthTests.cs
+++ b/UnitsNet.Tests/CustomCode/ForcePerLengthTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ForcePerLengthTests : ForcePerLengthTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double KilopoundsForcePerInchInOneNewtonPerMeter => 5.710147162769201E-6;
protected override double KilogramsForcePerMillimeterInOneNewtonPerMeter => 1.019716212977928e-4;
protected override double KilogramsForcePerCentimeterInOneNewtonPerMeter => 1.019716212977928e-3;
diff --git a/UnitsNet.Tests/CustomCode/ForceTests.cs b/UnitsNet.Tests/CustomCode/ForceTests.cs
index d37951856f..ea7223f606 100644
--- a/UnitsNet.Tests/CustomCode/ForceTests.cs
+++ b/UnitsNet.Tests/CustomCode/ForceTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests
{
public class ForceTests : ForceTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double DecanewtonsInOneNewton => 1E-1;
protected override double DyneInOneNewton => 1E5;
@@ -108,9 +107,8 @@ public void ForceDividedByForceChangeRateEqualsDuration()
[Fact]
public void KilogramForceDividedByNewtonEqualsStandardGravity()
{
- const double standardGravity = 9.80665;
- double duration = Force.FromKilogramsForce(1) / Force.FromNewtons(1);
- Assert.Equal(standardGravity, duration);
+ var duration = Force.FromKilogramsForce(1) / Force.FromNewtons(1);
+ Assert.Equal(9.80665, duration);
}
}
}
diff --git a/UnitsNet.Tests/CustomCode/FrequencyTests.cs b/UnitsNet.Tests/CustomCode/FrequencyTests.cs
index c4940a290e..e5f76d64a4 100644
--- a/UnitsNet.Tests/CustomCode/FrequencyTests.cs
+++ b/UnitsNet.Tests/CustomCode/FrequencyTests.cs
@@ -7,8 +7,6 @@ namespace UnitsNet.Tests
{
public class FrequencyTests : FrequencyTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double MicrohertzInOneHertz => 1e6;
protected override double MillihertzInOneHertz => 1e3;
diff --git a/UnitsNet.Tests/CustomCode/IlluminanceTests.cs b/UnitsNet.Tests/CustomCode/IlluminanceTests.cs
index c7b766d740..b7b52ffc04 100644
--- a/UnitsNet.Tests/CustomCode/IlluminanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/IlluminanceTests.cs
@@ -28,7 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class IlluminanceTests : IlluminanceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double MilliluxInOneLux => 1E3;
protected override double LuxInOneLux => 1;
@@ -36,7 +35,7 @@ public class IlluminanceTests : IlluminanceTestsBase
protected override double KiloluxInOneLux => 1E-3;
protected override double MegaluxInOneLux => 1E-6;
-
+
[Fact]
public void IlluminanceTimesAreaEqualsLuminousFlux()
{
diff --git a/UnitsNet.Tests/CustomCode/InformationTests.cs b/UnitsNet.Tests/CustomCode/InformationTests.cs
index b99dac5b37..354a4919a1 100644
--- a/UnitsNet.Tests/CustomCode/InformationTests.cs
+++ b/UnitsNet.Tests/CustomCode/InformationTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class InformationTests : InformationTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double BitsInOneBit => 1;
protected override double BytesInOneBit => 0.125;
diff --git a/UnitsNet.Tests/CustomCode/IrradianceTests.cs b/UnitsNet.Tests/CustomCode/IrradianceTests.cs
index 9f50b586cf..31da081b01 100644
--- a/UnitsNet.Tests/CustomCode/IrradianceTests.cs
+++ b/UnitsNet.Tests/CustomCode/IrradianceTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class IrradianceTests : IrradianceTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double KilowattsPerSquareCentimeterInOneWattPerSquareMeter => 1e-7;
protected override double KilowattsPerSquareMeterInOneWattPerSquareMeter => 1e-3;
diff --git a/UnitsNet.Tests/CustomCode/IrradiationTests.cs b/UnitsNet.Tests/CustomCode/IrradiationTests.cs
index 3f25e2186f..20665798c7 100644
--- a/UnitsNet.Tests/CustomCode/IrradiationTests.cs
+++ b/UnitsNet.Tests/CustomCode/IrradiationTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class IrradiationTests : IrradiationTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double JoulesPerSquareMeterInOneJoulePerSquareMeter => 1;
protected override double KilojoulesPerSquareMeterInOneJoulePerSquareMeter => 1E-3;
diff --git a/UnitsNet.Tests/CustomCode/JerkTests.cs b/UnitsNet.Tests/CustomCode/JerkTests.cs
index 65b4d170ac..248ad2cf39 100644
--- a/UnitsNet.Tests/CustomCode/JerkTests.cs
+++ b/UnitsNet.Tests/CustomCode/JerkTests.cs
@@ -30,8 +30,6 @@ public class JerkTests : JerkTestsBase
protected override double StandardGravitiesPerSecondInOneMeterPerSecondCubed => 1.019716212977928e-1;
- protected override bool SupportsSIUnitSystem => true;
-
[Fact]
public void AccelerationDividedByDurationEqualsJerk()
{
diff --git a/UnitsNet.Tests/CustomCode/KinematicViscosityTests.cs b/UnitsNet.Tests/CustomCode/KinematicViscosityTests.cs
index f1a487b86e..8df2d1d623 100644
--- a/UnitsNet.Tests/CustomCode/KinematicViscosityTests.cs
+++ b/UnitsNet.Tests/CustomCode/KinematicViscosityTests.cs
@@ -8,8 +8,6 @@ namespace UnitsNet.Tests
{
public class KinematicViscosityTests : KinematicViscosityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double CentistokesInOneSquareMeterPerSecond => 1e6;
protected override double DecistokesInOneSquareMeterPerSecond => 1e5;
diff --git a/UnitsNet.Tests/CustomCode/LeakRateTests.cs b/UnitsNet.Tests/CustomCode/LeakRateTests.cs
index 6fb1f08d2a..9b0c81daf7 100644
--- a/UnitsNet.Tests/CustomCode/LeakRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/LeakRateTests.cs
@@ -27,8 +27,6 @@ public class LeakRateTests : LeakRateTestsBase
protected override double MillibarLitersPerSecondInOnePascalCubicMeterPerSecond => 10;
- protected override bool SupportsSIUnitSystem => false;
-
protected override double TorrLitersPerSecondInOnePascalCubicMeterPerSecond => 7.5;
}
diff --git a/UnitsNet.Tests/CustomCode/LengthTests.cs b/UnitsNet.Tests/CustomCode/LengthTests.cs
index 32800ee07c..02acffbf26 100644
--- a/UnitsNet.Tests/CustomCode/LengthTests.cs
+++ b/UnitsNet.Tests/CustomCode/LengthTests.cs
@@ -10,7 +10,6 @@ namespace UnitsNet.Tests
{
public class LengthTests : LengthTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double CentimetersInOneMeter => 100;
protected override double DecimetersInOneMeter => 10;
@@ -192,8 +191,8 @@ public void NegativeLengthToStonePoundsReturnsCorrectValues()
negativeLength = Length.FromInches(-25.0);
feetInches = negativeLength.FeetInches;
- Assert.Equal(-2.0, feetInches.Feet);
- Assert.Equal(-1.0, feetInches.Inches);
+ Assert.Equal(-2, feetInches.Feet);
+ Assert.Equal(-1, feetInches.Inches);
}
[Fact]
diff --git a/UnitsNet.Tests/CustomCode/LevelTests.cs b/UnitsNet.Tests/CustomCode/LevelTests.cs
index b5e91da6ff..c714eb0bb9 100644
--- a/UnitsNet.Tests/CustomCode/LevelTests.cs
+++ b/UnitsNet.Tests/CustomCode/LevelTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class LevelTests : LevelTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DecibelsInOneDecibel => 1;
protected override double NepersInOneDecibel => 0.115129254;
diff --git a/UnitsNet.Tests/CustomCode/LinearDensityTests.cs b/UnitsNet.Tests/CustomCode/LinearDensityTests.cs
index 23483d2153..a20e7de897 100644
--- a/UnitsNet.Tests/CustomCode/LinearDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/LinearDensityTests.cs
@@ -28,8 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class LinearDensityTests : LinearDensityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double MicrogramsPerMillimeterInOneKilogramPerMeter => 1e6;
protected override double MicrogramsPerCentimeterInOneKilogramPerMeter => 1e7;
protected override double MicrogramsPerMeterInOneKilogramPerMeter => 1e9;
diff --git a/UnitsNet.Tests/CustomCode/LinearPowerDensityTests.cs b/UnitsNet.Tests/CustomCode/LinearPowerDensityTests.cs
index 698f31d116..be222b368b 100644
--- a/UnitsNet.Tests/CustomCode/LinearPowerDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/LinearPowerDensityTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class LinearPowerDensityTests : LinearPowerDensityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double GigawattsPerCentimeterInOneWattPerMeter => 1e-11;
protected override double GigawattsPerFootInOneWattPerMeter => 3.0480e-10;
protected override double GigawattsPerInchInOneWattPerMeter => 2.5400e-11;
diff --git a/UnitsNet.Tests/CustomCode/LuminanceTests.cs b/UnitsNet.Tests/CustomCode/LuminanceTests.cs
index e53e6c0efb..e4eb673646 100644
--- a/UnitsNet.Tests/CustomCode/LuminanceTests.cs
+++ b/UnitsNet.Tests/CustomCode/LuminanceTests.cs
@@ -24,7 +24,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class LuminanceTests : LuminanceTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double CandelasPerSquareMeterInOneCandelaPerSquareMeter => 1;
protected override double CandelasPerSquareFootInOneCandelaPerSquareMeter => 9.290304e-2;
protected override double CandelasPerSquareInchInOneCandelaPerSquareMeter => 6.4516e-4;
diff --git a/UnitsNet.Tests/CustomCode/LuminousFluxTests.cs b/UnitsNet.Tests/CustomCode/LuminousFluxTests.cs
index ee85f8de1a..bce400207e 100644
--- a/UnitsNet.Tests/CustomCode/LuminousFluxTests.cs
+++ b/UnitsNet.Tests/CustomCode/LuminousFluxTests.cs
@@ -28,7 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class LuminousFluxTests : LuminousFluxTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double LumensInOneLumen => 1;
[Fact]
diff --git a/UnitsNet.Tests/CustomCode/LuminousIntensityTests.cs b/UnitsNet.Tests/CustomCode/LuminousIntensityTests.cs
index 186e7435f0..e7d79ac886 100644
--- a/UnitsNet.Tests/CustomCode/LuminousIntensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/LuminousIntensityTests.cs
@@ -28,7 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class LuminousIntensityTests : LuminousIntensityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double CandelaInOneCandela => 1;
[Fact]
diff --git a/UnitsNet.Tests/CustomCode/MagneticFieldTests.cs b/UnitsNet.Tests/CustomCode/MagneticFieldTests.cs
index 31051cbf48..a5eee69d0d 100644
--- a/UnitsNet.Tests/CustomCode/MagneticFieldTests.cs
+++ b/UnitsNet.Tests/CustomCode/MagneticFieldTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MagneticFieldTests : MagneticFieldTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double TeslasInOneTesla => 1;
protected override double NanoteslasInOneTesla => 1e9;
protected override double MicroteslasInOneTesla => 1e6;
diff --git a/UnitsNet.Tests/CustomCode/MagneticFluxTests.cs b/UnitsNet.Tests/CustomCode/MagneticFluxTests.cs
index ea843ab619..a7ce8b20fa 100644
--- a/UnitsNet.Tests/CustomCode/MagneticFluxTests.cs
+++ b/UnitsNet.Tests/CustomCode/MagneticFluxTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MagneticFluxTests : MagneticFluxTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double WebersInOneWeber => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/MagnetizationTests.cs b/UnitsNet.Tests/CustomCode/MagnetizationTests.cs
index 13065f4eb2..90f87434b3 100644
--- a/UnitsNet.Tests/CustomCode/MagnetizationTests.cs
+++ b/UnitsNet.Tests/CustomCode/MagnetizationTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MagnetizationTests : MagnetizationTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double AmperesPerMeterInOneAmperePerMeter => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/MassConcentrationTests.cs b/UnitsNet.Tests/CustomCode/MassConcentrationTests.cs
index 6c741f4e0e..cec5946fcc 100644
--- a/UnitsNet.Tests/CustomCode/MassConcentrationTests.cs
+++ b/UnitsNet.Tests/CustomCode/MassConcentrationTests.cs
@@ -28,7 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MassConcentrationTests : MassConcentrationTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
#region Unit Conversion Coefficients
protected override double PicogramsPerLiterInOneKilogramPerCubicMeter => 1e12;
@@ -136,6 +135,14 @@ public static void ComponentMassFromMassConcentrationAndSolutionVolume(
AssertEx.EqualTolerance(expectedMassValue, massComponent.As(expectedMassUnit), tolerance);
}
+ [Fact]
+ public void DefaultSIUnitIsKgPerCubicMeter()
+ {
+ var massConcentration = new MassConcentration(1, UnitSystem.SI);
+
+ Assert.Equal(MassConcentrationUnit.KilogramPerCubicMeter, massConcentration.Unit); // MassConcentration.BaseUnit = KilogramPerCubicMeter
+ }
+
[Fact]
public void DefaultUnitTypeRespectedForCustomUnitSystem()
{
diff --git a/UnitsNet.Tests/CustomCode/MassFlowTests.cs b/UnitsNet.Tests/CustomCode/MassFlowTests.cs
index 70d9da35a9..0d51ed4e5f 100644
--- a/UnitsNet.Tests/CustomCode/MassFlowTests.cs
+++ b/UnitsNet.Tests/CustomCode/MassFlowTests.cs
@@ -8,8 +8,6 @@ namespace UnitsNet.Tests
{
public class MassFlowTests : MassFlowTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double GramsPerSecondInOneGramPerSecond => 1;
protected override double DecagramsPerSecondInOneGramPerSecond => 1E-1;
@@ -81,7 +79,7 @@ public override void BaseUnit_HasSIBase()
{
base.BaseUnit_HasSIBase();
}
-
+
[Fact]
public void DurationTimesMassFlowEqualsMass()
{
diff --git a/UnitsNet.Tests/CustomCode/MassFluxTests.cs b/UnitsNet.Tests/CustomCode/MassFluxTests.cs
index 7638abc52e..11c3d30a78 100644
--- a/UnitsNet.Tests/CustomCode/MassFluxTests.cs
+++ b/UnitsNet.Tests/CustomCode/MassFluxTests.cs
@@ -26,7 +26,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MassFluxTests : MassFluxTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double GramsPerSecondPerSquareMeterInOneKilogramPerSecondPerSquareMeter => 1E3;
protected override double GramsPerSecondPerSquareCentimeterInOneKilogramPerSecondPerSquareMeter => 1E-1;
protected override double GramsPerSecondPerSquareMillimeterInOneKilogramPerSecondPerSquareMeter => 1E-3;
diff --git a/UnitsNet.Tests/CustomCode/MassFractionTests.cs b/UnitsNet.Tests/CustomCode/MassFractionTests.cs
index 39435e7243..5574d62975 100644
--- a/UnitsNet.Tests/CustomCode/MassFractionTests.cs
+++ b/UnitsNet.Tests/CustomCode/MassFractionTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MassFractionTests : MassFractionTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
#region Unit Conversion Coefficients
protected override double KilogramsPerKilogramInOneDecimalFraction => 1;
diff --git a/UnitsNet.Tests/CustomCode/MassMomentOfInertiaTests.cs b/UnitsNet.Tests/CustomCode/MassMomentOfInertiaTests.cs
index 2a86cd0937..26a24ddbf0 100644
--- a/UnitsNet.Tests/CustomCode/MassMomentOfInertiaTests.cs
+++ b/UnitsNet.Tests/CustomCode/MassMomentOfInertiaTests.cs
@@ -22,14 +22,11 @@
using System;
-using Xunit;
namespace UnitsNet.Tests.CustomCode
{
public class MassMomentOfInertiaTests : MassMomentOfInertiaTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double GramSquareCentimetersInOneKilogramSquareMeter => 1e7;
protected override double GramSquareDecimetersInOneKilogramSquareMeter => 1e5;
diff --git a/UnitsNet.Tests/CustomCode/MassTests.cs b/UnitsNet.Tests/CustomCode/MassTests.cs
index 9d565d476b..da6e963915 100644
--- a/UnitsNet.Tests/CustomCode/MassTests.cs
+++ b/UnitsNet.Tests/CustomCode/MassTests.cs
@@ -9,8 +9,6 @@ namespace UnitsNet.Tests
{
public class MassTests : MassTestsBase
{
- protected override bool SupportsSIUnitSystem => false; // Should be true, but prefixes on "Gram" not supported yet.
-
protected override double CentigramsInOneKilogram => 1E5;
protected override double DecagramsInOneKilogram => 1E2;
diff --git a/UnitsNet.Tests/CustomCode/MolalityTests.cs b/UnitsNet.Tests/CustomCode/MolalityTests.cs
index 3c62c01fab..22de6472be 100644
--- a/UnitsNet.Tests/CustomCode/MolalityTests.cs
+++ b/UnitsNet.Tests/CustomCode/MolalityTests.cs
@@ -7,8 +7,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MolalityTests : MolalityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double MolesPerKilogramInOneMolePerKilogram => 1;
protected override double MolesPerGramInOneMolePerKilogram => 1e-3;
protected override double MillimolesPerKilogramInOneMolePerKilogram => 1e3;
diff --git a/UnitsNet.Tests/CustomCode/MolarEnergyTests.cs b/UnitsNet.Tests/CustomCode/MolarEnergyTests.cs
index 332b4f6a3d..d6a012e0a2 100644
--- a/UnitsNet.Tests/CustomCode/MolarEnergyTests.cs
+++ b/UnitsNet.Tests/CustomCode/MolarEnergyTests.cs
@@ -29,7 +29,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MolarEnergyTests : MolarEnergyTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double JoulesPerMoleInOneJoulePerMole => 1e0;
protected override double KilojoulesPerMoleInOneJoulePerMole => 1e-3;
protected override double MegajoulesPerMoleInOneJoulePerMole => 1e-6;
diff --git a/UnitsNet.Tests/CustomCode/MolarEntropyTests.cs b/UnitsNet.Tests/CustomCode/MolarEntropyTests.cs
index 0c30532e2e..3021519d49 100644
--- a/UnitsNet.Tests/CustomCode/MolarEntropyTests.cs
+++ b/UnitsNet.Tests/CustomCode/MolarEntropyTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MolarEntropyTests : MolarEntropyTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double JoulesPerMoleKelvinInOneJoulePerMoleKelvin => 1e0;
protected override double KilojoulesPerMoleKelvinInOneJoulePerMoleKelvin => 1e-3;
protected override double MegajoulesPerMoleKelvinInOneJoulePerMoleKelvin => 1e-6;
diff --git a/UnitsNet.Tests/CustomCode/MolarFlowTests.cs b/UnitsNet.Tests/CustomCode/MolarFlowTests.cs
index 28ceb57aee..8608df7624 100644
--- a/UnitsNet.Tests/CustomCode/MolarFlowTests.cs
+++ b/UnitsNet.Tests/CustomCode/MolarFlowTests.cs
@@ -25,9 +25,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MolarFlowTests : MolarFlowTestsBase
{
- // Override properties in base class here
- protected override bool SupportsSIUnitSystem => true;
-
protected override double KilomolesPerHourInOneMolePerSecond => 3.6;
protected override double KilomolesPerMinuteInOneMolePerSecond => 0.06;
diff --git a/UnitsNet.Tests/CustomCode/MolarMassTests.cs b/UnitsNet.Tests/CustomCode/MolarMassTests.cs
index e48321fd36..1e0dadbfe8 100644
--- a/UnitsNet.Tests/CustomCode/MolarMassTests.cs
+++ b/UnitsNet.Tests/CustomCode/MolarMassTests.cs
@@ -28,7 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MolarMassTests : MolarMassTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double CentigramsPerMoleInOneKilogramPerMole => 1e5;
protected override double DecagramsPerMoleInOneKilogramPerMole => 1e2;
protected override double DecigramsPerMoleInOneKilogramPerMole => 1e4;
diff --git a/UnitsNet.Tests/CustomCode/MolarityTests.cs b/UnitsNet.Tests/CustomCode/MolarityTests.cs
index ca0523318f..c65f0d483d 100644
--- a/UnitsNet.Tests/CustomCode/MolarityTests.cs
+++ b/UnitsNet.Tests/CustomCode/MolarityTests.cs
@@ -28,8 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class MolarityTests : MolarityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
#region Unit Conversion Coefficients
protected override double CentimolesPerLiterInOneMolePerCubicMeter => 1e-1;
diff --git a/UnitsNet.Tests/CustomCode/PermeabilityTests.cs b/UnitsNet.Tests/CustomCode/PermeabilityTests.cs
index 5127ff430d..7052a2132a 100644
--- a/UnitsNet.Tests/CustomCode/PermeabilityTests.cs
+++ b/UnitsNet.Tests/CustomCode/PermeabilityTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class PermeabilityTests : PermeabilityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double HenriesPerMeterInOneHenryPerMeter => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/PermittivityTests.cs b/UnitsNet.Tests/CustomCode/PermittivityTests.cs
index 5a13b8bb2d..bbb7cb9355 100644
--- a/UnitsNet.Tests/CustomCode/PermittivityTests.cs
+++ b/UnitsNet.Tests/CustomCode/PermittivityTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class PermittivityTests : PermittivityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double FaradsPerMeterInOneFaradPerMeter => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/PorousMediumPermeabilityTests.cs b/UnitsNet.Tests/CustomCode/PorousMediumPermeabilityTests.cs
index 38fc23e12c..b1f075380e 100644
--- a/UnitsNet.Tests/CustomCode/PorousMediumPermeabilityTests.cs
+++ b/UnitsNet.Tests/CustomCode/PorousMediumPermeabilityTests.cs
@@ -26,8 +26,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class PorousMediumPermeabilityTests : PorousMediumPermeabilityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double DarcysInOneSquareMeter => 0.10132499658e13;
protected override double MicrodarcysInOneSquareMeter => 0.10132499658e19;
diff --git a/UnitsNet.Tests/CustomCode/PowerDensityTests.cs b/UnitsNet.Tests/CustomCode/PowerDensityTests.cs
index b90313935e..1d5a2c8817 100644
--- a/UnitsNet.Tests/CustomCode/PowerDensityTests.cs
+++ b/UnitsNet.Tests/CustomCode/PowerDensityTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class PowerDensityTests : PowerDensityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double WattsPerCubicMeterInOneWattPerCubicMeter => 1;
protected override double PicowattsPerCubicMeterInOneWattPerCubicMeter => 1e12;
protected override double NanowattsPerCubicMeterInOneWattPerCubicMeter => 1e9;
diff --git a/UnitsNet.Tests/CustomCode/PowerRatioTests.cs b/UnitsNet.Tests/CustomCode/PowerRatioTests.cs
index 8dab3f359a..b310bed861 100644
--- a/UnitsNet.Tests/CustomCode/PowerRatioTests.cs
+++ b/UnitsNet.Tests/CustomCode/PowerRatioTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class PowerRatioTests : PowerRatioTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DecibelMilliwattsInOneDecibelWatt => 31;
protected override double DecibelWattsInOneDecibelWatt => 1;
@@ -41,7 +40,7 @@ public void InvalidPower_ExpectArgumentOutOfRangeException(double power)
public void ExpectPowerConvertedCorrectly(double power, double expected)
{
Power p = Power.FromWatts(power);
- double actual = PowerRatio.FromPower(p).DecibelWatts;
+ var actual = PowerRatio.FromPower(p).DecibelWatts;
Assert.Equal(expected, actual);
}
diff --git a/UnitsNet.Tests/CustomCode/PressureChangeRateTests.cs b/UnitsNet.Tests/CustomCode/PressureChangeRateTests.cs
index 84d47599db..6d56282577 100644
--- a/UnitsNet.Tests/CustomCode/PressureChangeRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/PressureChangeRateTests.cs
@@ -9,7 +9,6 @@ namespace UnitsNet.Tests
{
public class PressureChangeRateTests : PressureChangeRateTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double AtmospheresPerSecondInOnePascalPerSecond => 9.8692 * 1E-6;
protected override double KilopascalsPerSecondInOnePascalPerSecond => 1e-3;
diff --git a/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseRateTests.cs b/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseRateTests.cs
index 244e522195..555a0b4843 100644
--- a/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseRateTests.cs
@@ -1,3 +1,19 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by \generate-code.bat.
+//
+// Changes to this file will be lost when the code is regenerated.
+// The build server regenerates the code before each build and a pre-build
+// step will regenerate the code on each local build.
+//
+// See https://github.com/angularsen/UnitsNet/wiki/Adding-a-New-Unit for how to add or edit units.
+//
+// Add CustomCode\Quantities\MyQuantity.extra.cs files to add code to generated quantities.
+// Add UnitDefinitions\MyQuantity.json and run generate-code.bat to generate new units or quantities.
+//
+//
+//------------------------------------------------------------------------------
+
// Licensed under MIT No Attribution, see LICENSE file at the root.
// Copyright 2013 Andreas Gullberg Larsen (andreas.larsen84@gmail.com). Maintained at https://github.com/angularsen/UnitsNet.
@@ -9,7 +25,6 @@ namespace UnitsNet.Tests.CustomCode
public class RadiationEquivalentDoseRateTests : RadiationEquivalentDoseRateTestsBase
{
// Override properties in base class here
- protected override bool SupportsSIUnitSystem => false;
protected override double SievertsPerSecondInOneSievertPerSecond => 1;
protected override double MillisievertsPerSecondInOneSievertPerSecond => 1e+3;
protected override double MicrosievertsPerSecondInOneSievertPerSecond => 1e+6;
@@ -24,14 +39,14 @@ public class RadiationEquivalentDoseRateTests : RadiationEquivalentDoseRateTests
[Fact]
public void RadiationEquivalentDoseRateTimesTimeSpanEqualsRadiationEquivalentDose()
{
- RadiationEquivalentDose dose = RadiationEquivalentDoseRate.FromSievertsPerHour(20)*TimeSpan.FromHours(2);
+ RadiationEquivalentDose dose = RadiationEquivalentDoseRate.FromSievertsPerHour(20) * TimeSpan.FromHours(2);
Assert.Equal(dose, RadiationEquivalentDose.FromSieverts(40));
}
[Fact]
public void RadiationEquivalentDoseRateTimesDurationEqualsRadiationEquivalentDose()
{
- RadiationEquivalentDose dose = RadiationEquivalentDoseRate.FromSievertsPerHour(20)*Duration.FromHours(2);
+ RadiationEquivalentDose dose = RadiationEquivalentDoseRate.FromSievertsPerHour(20) * Duration.FromHours(2);
Assert.Equal(dose, RadiationEquivalentDose.FromSieverts(40));
}
}
diff --git a/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseTests.cs b/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseTests.cs
index e62b50019e..0ed278230a 100644
--- a/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseTests.cs
+++ b/UnitsNet.Tests/CustomCode/RadiationEquivalentDoseTests.cs
@@ -8,8 +8,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RadiationEquivalentDoseTests : RadiationEquivalentDoseTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double SievertsInOneSievert => 1;
protected override double MillisievertsInOneSievert => 1e+3;
protected override double MicrosievertsInOneSievert => 1e+6;
diff --git a/UnitsNet.Tests/CustomCode/RadiationExposureTests.cs b/UnitsNet.Tests/CustomCode/RadiationExposureTests.cs
index 19b52baf95..982e69de1c 100644
--- a/UnitsNet.Tests/CustomCode/RadiationExposureTests.cs
+++ b/UnitsNet.Tests/CustomCode/RadiationExposureTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RadiationExposureTests : RadiationExposureTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double CoulombsPerKilogramInOneCoulombPerKilogram => 1;
protected override double MillicoulombsPerKilogramInOneCoulombPerKilogram => 1e+3;
protected override double MicrocoulombsPerKilogramInOneCoulombPerKilogram => 1e+6;
diff --git a/UnitsNet.Tests/CustomCode/RadioactivityTests.cs b/UnitsNet.Tests/CustomCode/RadioactivityTests.cs
index b10a06be6b..d6918d70da 100644
--- a/UnitsNet.Tests/CustomCode/RadioactivityTests.cs
+++ b/UnitsNet.Tests/CustomCode/RadioactivityTests.cs
@@ -7,8 +7,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RadioactivityTests : RadioactivityTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double BecquerelsInOneBecquerel => 1;
protected override double CuriesInOneBecquerel => 2.702702702703e-11;
protected override double ExabecquerelsInOneBecquerel => 1e-18;
diff --git a/UnitsNet.Tests/CustomCode/RatioChangeRateTests.cs b/UnitsNet.Tests/CustomCode/RatioChangeRateTests.cs
index 0bdcb0993f..b53dcbe33c 100644
--- a/UnitsNet.Tests/CustomCode/RatioChangeRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/RatioChangeRateTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RatioChangeRateTests : RatioChangeRateTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DecimalFractionsPerSecondInOneDecimalFractionPerSecond => 1;
protected override double PercentsPerSecondInOneDecimalFractionPerSecond => 100;
}
diff --git a/UnitsNet.Tests/CustomCode/RatioTests.cs b/UnitsNet.Tests/CustomCode/RatioTests.cs
index d1232122c2..615befd16b 100644
--- a/UnitsNet.Tests/CustomCode/RatioTests.cs
+++ b/UnitsNet.Tests/CustomCode/RatioTests.cs
@@ -5,7 +5,6 @@ namespace UnitsNet.Tests
{
public class RatioTests : RatioTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DecimalFractionsInOneDecimalFraction => 1;
protected override double PartsPerBillionInOneDecimalFraction => 1e9;
diff --git a/UnitsNet.Tests/CustomCode/ReciprocalAreaTests.cs b/UnitsNet.Tests/CustomCode/ReciprocalAreaTests.cs
index f73da0cbb3..bcfc8bbea8 100644
--- a/UnitsNet.Tests/CustomCode/ReciprocalAreaTests.cs
+++ b/UnitsNet.Tests/CustomCode/ReciprocalAreaTests.cs
@@ -24,8 +24,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ReciprocalAreaTests : ReciprocalAreaTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double InverseSquareMetersInOneInverseSquareMeter => 1;
protected override double InverseSquareKilometersInOneInverseSquareMeter => 1E6;
protected override double InverseSquareDecimetersInOneInverseSquareMeter => 1E-2;
diff --git a/UnitsNet.Tests/CustomCode/ReciprocalLengthTests.cs b/UnitsNet.Tests/CustomCode/ReciprocalLengthTests.cs
index 5b217bb961..cbaa132811 100644
--- a/UnitsNet.Tests/CustomCode/ReciprocalLengthTests.cs
+++ b/UnitsNet.Tests/CustomCode/ReciprocalLengthTests.cs
@@ -24,8 +24,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class ReciprocalLengthTests : ReciprocalLengthTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
-
protected override double InverseMetersInOneInverseMeter => 1;
protected override double InverseCentimetersInOneInverseMeter => 1E-2;
protected override double InverseMillimetersInOneInverseMeter => 1E-3;
diff --git a/UnitsNet.Tests/CustomCode/RelativeHumidityTests.cs b/UnitsNet.Tests/CustomCode/RelativeHumidityTests.cs
index 70ce2a7db8..981e555b9f 100644
--- a/UnitsNet.Tests/CustomCode/RelativeHumidityTests.cs
+++ b/UnitsNet.Tests/CustomCode/RelativeHumidityTests.cs
@@ -23,7 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RelativeHumidityTests : RelativeHumidityTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double PercentInOnePercent => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/RotationalAccelerationTests.cs b/UnitsNet.Tests/CustomCode/RotationalAccelerationTests.cs
index 03ca646477..571f26aa72 100644
--- a/UnitsNet.Tests/CustomCode/RotationalAccelerationTests.cs
+++ b/UnitsNet.Tests/CustomCode/RotationalAccelerationTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RotationalAccelerationTests : RotationalAccelerationTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DegreesPerSecondSquaredInOneRadianPerSecondSquared => 180 / Math.PI;
protected override double RadiansPerSecondSquaredInOneRadianPerSecondSquared => 1;
protected override double RevolutionsPerMinutePerSecondInOneRadianPerSecondSquared => 9.549296586;
diff --git a/UnitsNet.Tests/CustomCode/RotationalSpeedTests.cs b/UnitsNet.Tests/CustomCode/RotationalSpeedTests.cs
index e6be52c886..c57c4534be 100644
--- a/UnitsNet.Tests/CustomCode/RotationalSpeedTests.cs
+++ b/UnitsNet.Tests/CustomCode/RotationalSpeedTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class RotationalSpeedTests : RotationalSpeedTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double RadiansPerSecondInOneRadianPerSecond => 1;
protected override double DeciradiansPerSecondInOneRadianPerSecond => 1E1;
diff --git a/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs b/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs
index ff49df615e..674008b663 100644
--- a/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs
+++ b/UnitsNet.Tests/CustomCode/RotationalStiffnessPerLengthTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RotationalStiffnessPerLengthTests : RotationalStiffnessPerLengthTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double KilonewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter => 1E-3;
protected override double KilopoundForceFeetPerDegreesPerFeetInOneNewtonMeterPerRadianPerMeter => 3.92365625e-6;
protected override double MeganewtonMetersPerRadianPerMeterInOneNewtonMeterPerRadianPerMeter => 1E-6;
diff --git a/UnitsNet.Tests/CustomCode/RotationalStiffnessTests.cs b/UnitsNet.Tests/CustomCode/RotationalStiffnessTests.cs
index 223accaec8..28fd8ea29e 100644
--- a/UnitsNet.Tests/CustomCode/RotationalStiffnessTests.cs
+++ b/UnitsNet.Tests/CustomCode/RotationalStiffnessTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class RotationalStiffnessTests : RotationalStiffnessTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double KilopoundForceFeetPerDegreesInOneNewtonMeterPerRadian => 0.0128729e-3;
protected override double PoundForceFeetPerRadianInOneNewtonMeterPerRadian => 7.375621e-1;
protected override double PoundForceFeetPerDegreesInOneNewtonMeterPerRadian => 1.287290e-2;
diff --git a/UnitsNet.Tests/CustomCode/ScalarTests.cs b/UnitsNet.Tests/CustomCode/ScalarTests.cs
index 786b1d357d..6c34cb39a0 100644
--- a/UnitsNet.Tests/CustomCode/ScalarTests.cs
+++ b/UnitsNet.Tests/CustomCode/ScalarTests.cs
@@ -26,7 +26,6 @@ public class ScalarTests : ScalarTestsBase
{
// Override properties in base class here
protected override double AmountInOneAmount => 1;
- protected override bool SupportsSIUnitSystem => false;
}
}
diff --git a/UnitsNet.Tests/CustomCode/SolidAngleTests.cs b/UnitsNet.Tests/CustomCode/SolidAngleTests.cs
index 942c8b6ab0..33776fc85f 100644
--- a/UnitsNet.Tests/CustomCode/SolidAngleTests.cs
+++ b/UnitsNet.Tests/CustomCode/SolidAngleTests.cs
@@ -27,7 +27,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class SolidAngleTests : SolidAngleTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double SteradiansInOneSteradian => 1;
}
}
diff --git a/UnitsNet.Tests/CustomCode/SpecificEnergyTests.cs b/UnitsNet.Tests/CustomCode/SpecificEnergyTests.cs
index 27b5c448ea..0a6120475c 100644
--- a/UnitsNet.Tests/CustomCode/SpecificEnergyTests.cs
+++ b/UnitsNet.Tests/CustomCode/SpecificEnergyTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests
{
public class SpecificEnergyTests : SpecificEnergyTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double JoulesPerKilogramInOneJoulePerKilogram => 1e0;
protected override double KilojoulesPerKilogramInOneJoulePerKilogram => 1e-3;
protected override double MegajoulesPerKilogramInOneJoulePerKilogram => 1e-6;
@@ -49,36 +48,36 @@ public class SpecificEnergyTests : SpecificEnergyTestsBase
[Fact]
public void MassTimesSpecificEnergyEqualsEnergy()
{
- Energy energy = Mass.FromKilograms(20.0)*SpecificEnergy.FromJoulesPerKilogram(10.0);
- Assert.Equal(200d, energy.Joules);
+ Energy energy = Mass.FromKilograms(20) * SpecificEnergy.FromJoulesPerKilogram(10);
+ Assert.Equal(200, energy.Joules);
}
[Fact]
public void SpecificEnergyTimesMassEqualsEnergy()
{
- Energy energy = SpecificEnergy.FromJoulesPerKilogram(10.0)*Mass.FromKilograms(20.0);
- Assert.Equal(200d, energy.Joules);
+ Energy energy = SpecificEnergy.FromJoulesPerKilogram(10) * Mass.FromKilograms(20);
+ Assert.Equal(200, energy.Joules);
}
[Fact]
public void DoubleDividedBySpecificEnergyEqualsBrakeSpecificFuelConsumption()
{
- BrakeSpecificFuelConsumption bsfc = 2.0 / SpecificEnergy.FromJoulesPerKilogram(4.0);
+ BrakeSpecificFuelConsumption bsfc = 2 / SpecificEnergy.FromJoulesPerKilogram(4);
Assert.Equal(BrakeSpecificFuelConsumption.FromKilogramsPerJoule(0.5), bsfc);
}
[Fact]
public void SpecificEnergyTimesMassFlowEqualsPower()
{
- Power power = SpecificEnergy.FromJoulesPerKilogram(10.0) * MassFlow.FromKilogramsPerSecond(20.0);
+ Power power = SpecificEnergy.FromJoulesPerKilogram(10) * MassFlow.FromKilogramsPerSecond(20);
Assert.Equal(200, power.Watts);
}
[Fact]
public void SpecificEnergyTimesBrakeSpecificFuelConsumptionEqualsEnergy()
{
- double value = SpecificEnergy.FromJoulesPerKilogram(10.0) * BrakeSpecificFuelConsumption.FromKilogramsPerJoule(20.0);
- Assert.Equal(200d, value);
+ var value = SpecificEnergy.FromJoulesPerKilogram(10) * BrakeSpecificFuelConsumption.FromKilogramsPerJoule(20);
+ Assert.Equal(200, value);
}
[Fact]
diff --git a/UnitsNet.Tests/CustomCode/SpecificEntropyTests.cs b/UnitsNet.Tests/CustomCode/SpecificEntropyTests.cs
index e34ad49564..2e463383f5 100644
--- a/UnitsNet.Tests/CustomCode/SpecificEntropyTests.cs
+++ b/UnitsNet.Tests/CustomCode/SpecificEntropyTests.cs
@@ -28,7 +28,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class SpecificEntropyTests : SpecificEntropyTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double JoulesPerKilogramDegreeCelsiusInOneJoulePerKilogramKelvin => 1e0;
protected override double JoulesPerKilogramKelvinInOneJoulePerKilogramKelvin => 1e0;
protected override double KilojoulesPerKilogramDegreeCelsiusInOneJoulePerKilogramKelvin => 1e-3;
diff --git a/UnitsNet.Tests/CustomCode/SpecificVolumeTests.cs b/UnitsNet.Tests/CustomCode/SpecificVolumeTests.cs
index 13f2b57dfc..d07d305874 100644
--- a/UnitsNet.Tests/CustomCode/SpecificVolumeTests.cs
+++ b/UnitsNet.Tests/CustomCode/SpecificVolumeTests.cs
@@ -26,7 +26,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class SpecificVolumeTests : SpecificVolumeTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double CubicMetersPerKilogramInOneCubicMeterPerKilogram => 1;
protected override double CubicFeetPerPoundInOneCubicMeterPerKilogram => 16.01846353;
diff --git a/UnitsNet.Tests/CustomCode/SpecificWeightTests.cs b/UnitsNet.Tests/CustomCode/SpecificWeightTests.cs
index dd93706c01..f6e56d7ab4 100644
--- a/UnitsNet.Tests/CustomCode/SpecificWeightTests.cs
+++ b/UnitsNet.Tests/CustomCode/SpecificWeightTests.cs
@@ -7,7 +7,6 @@ namespace UnitsNet.Tests
{
public class SpecificWeightTests : SpecificWeightTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double KilogramsForcePerCubicCentimeterInOneNewtonPerCubicMeter => 1.019716212977928e-7;
protected override double KilogramsForcePerCubicMeterInOneNewtonPerCubicMeter => 0.101971621;
diff --git a/UnitsNet.Tests/CustomCode/SpeedTests.cs b/UnitsNet.Tests/CustomCode/SpeedTests.cs
index 068af70c58..268bd91e0d 100644
--- a/UnitsNet.Tests/CustomCode/SpeedTests.cs
+++ b/UnitsNet.Tests/CustomCode/SpeedTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class SpeedTests : SpeedTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double FeetPerSecondInOneMeterPerSecond => 3.28084;
protected override double KilometersPerHourInOneMeterPerSecond => 3.6;
diff --git a/UnitsNet.Tests/CustomCode/StandardVolumeFlowTests.cs b/UnitsNet.Tests/CustomCode/StandardVolumeFlowTests.cs
index ed536837f9..e226a67457 100644
--- a/UnitsNet.Tests/CustomCode/StandardVolumeFlowTests.cs
+++ b/UnitsNet.Tests/CustomCode/StandardVolumeFlowTests.cs
@@ -23,8 +23,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class StandardVolumeFlowTests : StandardVolumeFlowTestsBase
{
- // Override properties in base class here
- protected override bool SupportsSIUnitSystem { get; }
protected override double StandardCubicCentimetersPerMinuteInOneStandardCubicMeterPerSecond => 6e7;
protected override double StandardCubicFeetPerHourInOneStandardCubicMeterPerSecond => 1.271328001973604e+5;
protected override double StandardCubicFeetPerMinuteInOneStandardCubicMeterPerSecond => 2.11888E3;
diff --git a/UnitsNet.Tests/CustomCode/TemperatureChangeRateTests.cs b/UnitsNet.Tests/CustomCode/TemperatureChangeRateTests.cs
index 727196c9c4..6a3a5f80fd 100644
--- a/UnitsNet.Tests/CustomCode/TemperatureChangeRateTests.cs
+++ b/UnitsNet.Tests/CustomCode/TemperatureChangeRateTests.cs
@@ -8,7 +8,6 @@ namespace UnitsNet.Tests
{
public class TemperatureChangeRateTests : TemperatureChangeRateTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DegreesCelsiusPerSecondInOneDegreeCelsiusPerSecond => 1;
protected override double DecadegreesCelsiusPerSecondInOneDegreeCelsiusPerSecond => 1E-1;
@@ -42,8 +41,8 @@ public class TemperatureChangeRateTests : TemperatureChangeRateTestsBase
protected override double DegreesKelvinPerSecondInOneDegreeCelsiusPerSecond => 1;
protected override double DegreesCelsiusPerHourInOneDegreeCelsiusPerSecond => 3600;
-
-
+
+
[Fact(Skip = "See about changing the BaseUnit to KelvinPerSecond")]
public override void BaseUnit_HasSIBase()
{
diff --git a/UnitsNet.Tests/CustomCode/TemperatureDeltaTests.cs b/UnitsNet.Tests/CustomCode/TemperatureDeltaTests.cs
index 8171557dbe..8b8e96d5f8 100644
--- a/UnitsNet.Tests/CustomCode/TemperatureDeltaTests.cs
+++ b/UnitsNet.Tests/CustomCode/TemperatureDeltaTests.cs
@@ -26,7 +26,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class TemperatureDeltaTests : TemperatureDeltaTestsBase
{
- protected override bool SupportsSIUnitSystem => false;
protected override double DegreesCelsiusInOneKelvin => 1;
protected override double DegreesDelisleInOneKelvin => -1.5d;
protected override double DegreesFahrenheitInOneKelvin => 1.8;
@@ -64,7 +63,7 @@ public void TemperatureDeltaTimesEntropyEqualsEnergy()
Energy energy = TemperatureDelta.FromKelvins(20) * Entropy.FromJoulesPerKelvin(4);
Assert.Equal(Energy.FromJoules(80), energy);
}
-
+
[Fact]
public void TemperatureDeltaTimesCoefficientOfThermalExpansionEqualsRatio()
{
@@ -86,6 +85,17 @@ public void TemperatureDeltaDividedByDurationEqualsTemperatureChangeRate()
Assert.Equal(TemperatureChangeRate.FromDegreesCelsiusPerSecond(10), changeRate);
}
+ [Fact]
+ public void TemperatureDeltaTimesCoefficientOfThermalExpansion()
+ {
+ CoefficientOfThermalExpansion cte = CoefficientOfThermalExpansion.FromPerDegreeCelsius(2);
+ TemperatureDelta dT = TemperatureDelta.FromDegreesCelsius(0.001);
+
+ Ratio expansionRatio = dT * cte;
+
+ Assert.Equal(Ratio.FromDecimalFractions(0.002), expansionRatio);
+ }
+
[Fact]
public void TemperatureDeltaDividedByTemperatureChangeRateEqualsDuration()
{
diff --git a/UnitsNet.Tests/CustomCode/TemperatureGradientTests.cs b/UnitsNet.Tests/CustomCode/TemperatureGradientTests.cs
index 6917ede410..245ccd505a 100644
--- a/UnitsNet.Tests/CustomCode/TemperatureGradientTests.cs
+++ b/UnitsNet.Tests/CustomCode/TemperatureGradientTests.cs
@@ -1,4 +1,4 @@
-//------------------------------------------------------------------------------
+//------------------------------------------------------------------------------
//
// This code was generated by \generate-code.bat.
//
@@ -24,8 +24,6 @@ namespace UnitsNet.Tests.CustomCode
{
public class TemperatureGradientTests : TemperatureGradientTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
-
protected override double DegreesCelsiusPerKilometerInOneKelvinPerMeter => 1000;
protected override double DegreesCelsiusPerMeterInOneKelvinPerMeter => 1;
diff --git a/UnitsNet.Tests/CustomCode/TemperatureTests.cs b/UnitsNet.Tests/CustomCode/TemperatureTests.cs
index bb4dd9e772..40dbd962f7 100644
--- a/UnitsNet.Tests/CustomCode/TemperatureTests.cs
+++ b/UnitsNet.Tests/CustomCode/TemperatureTests.cs
@@ -9,7 +9,6 @@ namespace UnitsNet.Tests
{
public class TemperatureTests : TemperatureTestsBase
{
- protected override bool SupportsSIUnitSystem => true;
protected override double DegreesCelsiusInOneKelvin => -272.15;
protected override double DegreesDelisleInOneKelvin => 558.2249999999999;
@@ -38,14 +37,14 @@ public void AllBaseQuantityUnitsAreBaseUnits()
public static IEnumerable