public void VerifyAllEnums()
 {
     var acceleration = new Acceleration(1, AccelerationUnit.BaseUnit);
     var angle = new Angle(1, AngleUnit.BaseUnit);
     var angularAcceleration = new AngularAcceleration(1, AngularAccelerationUnit.BaseUnit);
     var area = new Area(1, AreaUnit.BaseUnit);
     var density = new MassDensity(1, MassDensityUnit.BaseUnit);
     var electricCurrent = new ElectricCurrent(1, ElectricCurrentUnit.BaseUnit);
     var electricResistance = new ElectricResistance(1, ElectricResistanceUnit.BaseUnit);
     var electricVoltage = new ElectricPotential(1, ElectricPotentialUnit.BaseUnit);
     var energy = new Energy(1, EnergyUnit.BaseUnit);
     var force = new Force(1, ForceUnit.BaseUnit);
     var frequency = new Frequency(1, FrequencyUnit.BaseUnit);
     var jerk = new Jerk(1, JerkUnit.BaseUnit);
     var length = new Length(1, LengthUnit.BaseUnit);
     var mass = new Mass(1, MassUnit.BaseUnit);
     var massFlowRate = new MassFlowRate(1, MassFlowRateUnit.BaseUnit);
     var momentum = new Momentum(1, MomentumUnit.BaseUnit);
     var numeric = new Numeric(1, NumericUnit.BaseUnit);
     var power = new Power(1, PowerUnit.BaseUnit);
     var pressure = new Pressure(1, PressureUnit.BaseUnit);
     var speed = new Speed(1, SpeedUnit.BaseUnit);
     var temperature = new Temperature(1, TemperatureUnit.BaseUnit);
     var time = new Time(1, TimeUnit.BaseUnit);
     var torque = new Torque(1, TorqueUnit.BaseUnit);
     var volume = new Volume(1, VolumeUnit.BaseUnit);
     var volumetricFlowRate = new VolumetricFlowRate(1, VolumetricFlowRateUnit.BaseUnit);
 }
 public void OpAddition()
 {
     var density1 = new MassDensity(3000, MassDensityUnit.KilogramsPerCubicMeter);
     var density2 = new MassDensity(3, MassDensityUnit.GramsPerCubicCentimeter);
     var expected = new MassDensity(6000, MassDensityUnit.KilogramsPerCubicMeter);
     (density1 + density2).ShouldEqual(expected);
     (density2 + density1).ShouldEqual(expected);
 }
 public void OpInverseEquals()
 {
     var density1 = new MassDensity(3000, MassDensityUnit.KilogramsPerCubicMeter);
     var density2 = new MassDensity(3, MassDensityUnit.GramsPerCubicCentimeter);
     var density3 = new MassDensity(12, MassDensityUnit.GramsPerCubicCentimeter);
     (density1 != density2).ShouldBeFalse();
     (density2 != density1).ShouldBeFalse();
     (density1 != density3).ShouldBeTrue();
     (density3 != density1).ShouldBeTrue();
 }
 public void OpGreaterThanOrEqual()
 {
     var density1 = new MassDensity(3000, MassDensityUnit.KilogramsPerCubicMeter);
     var density2 = new MassDensity(3, MassDensityUnit.GramsPerCubicCentimeter);
     var density3 = new MassDensity(12, MassDensityUnit.GramsPerCubicCentimeter);
     (density1 >= density3).ShouldBeFalse();
     (density3 >= density1).ShouldBeTrue();
     (density1 >= density2).ShouldBeTrue();
     (density2 >= density1).ShouldBeTrue();
 }
        public void OpDivision()
        {
            var density1 = new MassDensity(3000, MassDensityUnit.KilogramsPerCubicMeter);
            var density2 = new MassDensity(3, MassDensityUnit.GramsPerCubicCentimeter);
            (density1 / density2).ShouldBeWithinEpsilonOf(1);
            (density2 / density1).ShouldBeWithinEpsilonOf(1);

            (density1 / 2).ShouldEqual(new MassDensity(1500, MassDensityUnit.KilogramsPerCubicMeter));
            (density2 / 2).ShouldEqual(new MassDensity(1.5, MassDensityUnit.GramsPerCubicCentimeter));
        }
 public void OpEquals()
 {
     var density1 = new MassDensity(3000, MassDensityUnit.KilogramsPerCubicMeter);
     var density2 = new MassDensity(3, MassDensityUnit.GramsPerCubicCentimeter);
     var density3 = new MassDensity(12, MassDensityUnit.GramsPerCubicCentimeter);
     (density1 == density2).ShouldBeTrue();
     (density2 == density1).ShouldBeTrue();
     (density1 == density3).ShouldBeFalse();
     (density3 == density1).ShouldBeFalse();
     density1.Equals(density2)
             .ShouldBeTrue();
     density1.Equals((object)density2)
             .ShouldBeTrue();
     density2.Equals(density1)
             .ShouldBeTrue();
     density2.Equals((object)density1)
             .ShouldBeTrue();
 }
 public void OpLessThan()
 {
     var density1 = new MassDensity(3000, MassDensityUnit.KilogramsPerCubicMeter);
     var density2 = new MassDensity(3, MassDensityUnit.GramsPerCubicCentimeter);
     var density3 = new MassDensity(12, MassDensityUnit.GramsPerCubicCentimeter);
     (density1 < density3).ShouldBeTrue();
     (density3 < density1).ShouldBeFalse();
     (density1 < density2).ShouldBeFalse();
     (density2 < density1).ShouldBeFalse();
 }
 public void OpSubtraction()
 {
     var density1 = new MassDensity(6000, MassDensityUnit.KilogramsPerCubicMeter);
     var density2 = new MassDensity(3, MassDensityUnit.GramsPerCubicCentimeter);
     (density1 - density2).ShouldEqual(new MassDensity(3000, MassDensityUnit.KilogramsPerCubicMeter));
     (density2 - density1).ShouldEqual(new MassDensity(-3, MassDensityUnit.GramsPerCubicCentimeter));
 }
 public void OpMultiplicationScaler()
 {
     var density = new MassDensity(1, MassDensityUnit.GramsPerCubicCentimeter);
     var expected = new MassDensity(2, MassDensityUnit.GramsPerCubicCentimeter);
     (density * 2).ShouldEqual(expected);
     (2 * density).ShouldEqual(expected);
 }