public void ConversionRoundTrip()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(1, ForcePerLength.FromCentinewtonsPerMeter(newtonpermeter.CentinewtonsPerMeter).NewtonsPerMeter, CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromDecanewtonsPerMeter(newtonpermeter.DecanewtonsPerMeter).NewtonsPerMeter, DecanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromDecinewtonsPerMeter(newtonpermeter.DecinewtonsPerMeter).NewtonsPerMeter, DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromExanewtonsPerMeter(newtonpermeter.ExanewtonsPerMeter).NewtonsPerMeter, ExanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromFemtonewtonsPerMeter(newtonpermeter.FemtonewtonsPerMeter).NewtonsPerMeter, FemtonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromGiganewtonsPerMeter(newtonpermeter.GiganewtonsPerMeter).NewtonsPerMeter, GiganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromHectonewtonsPerMeter(newtonpermeter.HectonewtonsPerMeter).NewtonsPerMeter, HectonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilogramsForcePerMeter(newtonpermeter.KilogramsForcePerMeter).NewtonsPerMeter, KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilonewtonsPerMeter(newtonpermeter.KilonewtonsPerMeter).NewtonsPerMeter, KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMeganewtonsPerMeter(newtonpermeter.MeganewtonsPerMeter).NewtonsPerMeter, MeganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMicronewtonsPerMeter(newtonpermeter.MicronewtonsPerMeter).NewtonsPerMeter, MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMillinewtonsPerMeter(newtonpermeter.MillinewtonsPerMeter).NewtonsPerMeter, MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNanonewtonsPerMeter(newtonpermeter.NanonewtonsPerMeter).NewtonsPerMeter, NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNewtonsPerMeter(newtonpermeter.NewtonsPerMeter).NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromPetanewtonsPerMeter(newtonpermeter.PetanewtonsPerMeter).NewtonsPerMeter, PetanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromPiconewtonsPerMeter(newtonpermeter.PiconewtonsPerMeter).NewtonsPerMeter, PiconewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromQutranewtonsPerMeter(newtonpermeter.QutranewtonsPerMeter).NewtonsPerMeter, QutranewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromTeranewtonsPerMeter(newtonpermeter.TeranewtonsPerMeter).NewtonsPerMeter, TeranewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromVettanewtonsPerMeter(newtonpermeter.VettanewtonsPerMeter).NewtonsPerMeter, VettanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromYottanewtonsPerMeter(newtonpermeter.YottanewtonsPerMeter).NewtonsPerMeter, YottanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromZettanewtonsPerMeter(newtonpermeter.ZettanewtonsPerMeter).NewtonsPerMeter, ZettanewtonsPerMeterTolerance);
        }
Пример #2
0
        public void EqualsIsImplemented()
        {
            ForcePerLength v = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.True(v.Equals(ForcePerLength.FromNewtonsPerMeter(1)));
            Assert.False(v.Equals(ForcePerLength.Zero));
        }
        public void NewtonPerMeterToForcePerLengthUnits()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.CentinewtonsPerMeter, CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.DecanewtonsPerMeter, DecanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.DecinewtonsPerMeter, DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(ExanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.ExanewtonsPerMeter, ExanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(FemtonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.FemtonewtonsPerMeter, FemtonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(GiganewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.GiganewtonsPerMeter, GiganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(HectonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.HectonewtonsPerMeter, HectonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, newtonpermeter.KilogramsForcePerMeter, KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.KilonewtonsPerMeter, KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MeganewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MeganewtonsPerMeter, MeganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MicronewtonsPerMeter, MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MillinewtonsPerMeter, MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.NanonewtonsPerMeter, NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(PetanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.PetanewtonsPerMeter, PetanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(PiconewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.PiconewtonsPerMeter, PiconewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(QutranewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.QutranewtonsPerMeter, QutranewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(TeranewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.TeranewtonsPerMeter, TeranewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(VettanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.VettanewtonsPerMeter, VettanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(YottanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.YottanewtonsPerMeter, YottanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(ZettanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.ZettanewtonsPerMeter, ZettanewtonsPerMeterTolerance);
        }
Пример #4
0
        public void ConversionRoundTrip()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(1, ForcePerLength.FromCentinewtonsPerMeter(newtonpermeter.CentinewtonsPerMeter).NewtonsPerMeter, CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromCentinewtonsPerMillimeter(newtonpermeter.CentinewtonsPerMillimeter).NewtonsPerMeter, CentinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromDecanewtonsPerMeter(newtonpermeter.DecanewtonsPerMeter).NewtonsPerMeter, DecanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromDecanewtonsPerMillimeter(newtonpermeter.DecanewtonsPerMillimeter).NewtonsPerMeter, DecanewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromDecinewtonsPerMeter(newtonpermeter.DecinewtonsPerMeter).NewtonsPerMeter, DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromDecinewtonsPerMillimeter(newtonpermeter.DecinewtonsPerMillimeter).NewtonsPerMeter, DecinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilogramsForcePerMeter(newtonpermeter.KilogramsForcePerMeter).NewtonsPerMeter, KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilonewtonsPerMeter(newtonpermeter.KilonewtonsPerMeter).NewtonsPerMeter, KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilonewtonsPerMillimeter(newtonpermeter.KilonewtonsPerMillimeter).NewtonsPerMeter, KilonewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilopoundsForcePerFoot(newtonpermeter.KilopoundsForcePerFoot).NewtonsPerMeter, KilopoundsForcePerFootTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMeganewtonsPerMeter(newtonpermeter.MeganewtonsPerMeter).NewtonsPerMeter, MeganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMeganewtonsPerMillimeter(newtonpermeter.MeganewtonsPerMillimeter).NewtonsPerMeter, MeganewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMicronewtonsPerMeter(newtonpermeter.MicronewtonsPerMeter).NewtonsPerMeter, MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMicronewtonsPerMillimeter(newtonpermeter.MicronewtonsPerMillimeter).NewtonsPerMeter, MicronewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMillinewtonsPerMeter(newtonpermeter.MillinewtonsPerMeter).NewtonsPerMeter, MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMillinewtonsPerMillimeter(newtonpermeter.MillinewtonsPerMillimeter).NewtonsPerMeter, MillinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNanonewtonsPerMeter(newtonpermeter.NanonewtonsPerMeter).NewtonsPerMeter, NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNanonewtonsPerMillimeter(newtonpermeter.NanonewtonsPerMillimeter).NewtonsPerMeter, NanonewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNewtonsPerMeter(newtonpermeter.NewtonsPerMeter).NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNewtonsPerMillimeter(newtonpermeter.NewtonsPerMillimeter).NewtonsPerMeter, NewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromPoundsForcePerFoot(newtonpermeter.PoundsForcePerFoot).NewtonsPerMeter, PoundsForcePerFootTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromPoundsForcePerInch(newtonpermeter.PoundsForcePerInch).NewtonsPerMeter, PoundsForcePerInchTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromPoundsForcePerYard(newtonpermeter.PoundsForcePerYard).NewtonsPerMeter, PoundsForcePerYardTolerance);
        }
Пример #5
0
        public void EqualsRelativeToleranceIsImplemented()
        {
            var v = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.True(v.Equals(ForcePerLength.FromNewtonsPerMeter(1), NewtonsPerMeterTolerance, ComparisonType.Relative));
            Assert.False(v.Equals(ForcePerLength.Zero, NewtonsPerMeterTolerance, ComparisonType.Relative));
        }
Пример #6
0
        public void As()
        {
            var newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.CentinewtonPerMeter), CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(CentinewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.CentinewtonPerMillimeter), CentinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(DecanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.DecanewtonPerMeter), DecanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecanewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.DecanewtonPerMillimeter), DecanewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.DecinewtonPerMeter), DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.DecinewtonPerMillimeter), DecinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilogramForcePerMeter), KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilonewtonPerMeter), KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilonewtonPerMillimeter), KilonewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(KilopoundsForcePerFootInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilopoundForcePerFoot), KilopoundsForcePerFootTolerance);
            AssertEx.EqualTolerance(MeganewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MeganewtonPerMeter), MeganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MeganewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MeganewtonPerMillimeter), MeganewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MicronewtonPerMeter), MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MicronewtonPerMillimeter), MicronewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MillinewtonPerMeter), MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MillinewtonPerMillimeter), MillinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NanonewtonPerMeter), NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NanonewtonPerMillimeter), NanonewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NewtonPerMeter), NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NewtonPerMillimeter), NewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(PoundsForcePerFootInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.PoundForcePerFoot), PoundsForcePerFootTolerance);
            AssertEx.EqualTolerance(PoundsForcePerInchInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.PoundForcePerInch), PoundsForcePerInchTolerance);
            AssertEx.EqualTolerance(PoundsForcePerYardInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.PoundForcePerYard), PoundsForcePerYardTolerance);
        }
Пример #7
0
        public void NewtonPerMeterToForcePerLengthUnits()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.CentinewtonsPerMeter, CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(CentinewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.CentinewtonsPerMillimeter, CentinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(DecanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.DecanewtonsPerMeter, DecanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecanewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.DecanewtonsPerMillimeter, DecanewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.DecinewtonsPerMeter, DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.DecinewtonsPerMillimeter, DecinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, newtonpermeter.KilogramsForcePerMeter, KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.KilonewtonsPerMeter, KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.KilonewtonsPerMillimeter, KilonewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(KilopoundsForcePerFootInOneNewtonPerMeter, newtonpermeter.KilopoundsForcePerFoot, KilopoundsForcePerFootTolerance);
            AssertEx.EqualTolerance(MeganewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MeganewtonsPerMeter, MeganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MeganewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.MeganewtonsPerMillimeter, MeganewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MicronewtonsPerMeter, MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.MicronewtonsPerMillimeter, MicronewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MillinewtonsPerMeter, MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.MillinewtonsPerMillimeter, MillinewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.NanonewtonsPerMeter, NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.NanonewtonsPerMillimeter, NanonewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMillimeterInOneNewtonPerMeter, newtonpermeter.NewtonsPerMillimeter, NewtonsPerMillimeterTolerance);
            AssertEx.EqualTolerance(PoundsForcePerFootInOneNewtonPerMeter, newtonpermeter.PoundsForcePerFoot, PoundsForcePerFootTolerance);
            AssertEx.EqualTolerance(PoundsForcePerInchInOneNewtonPerMeter, newtonpermeter.PoundsForcePerInch, PoundsForcePerInchTolerance);
            AssertEx.EqualTolerance(PoundsForcePerYardInOneNewtonPerMeter, newtonpermeter.PoundsForcePerYard, PoundsForcePerYardTolerance);
        }
Пример #8
0
        public void CompareToThrowsOnNull()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            newtonpermeter.CompareTo(null);
        }
Пример #9
0
        public void CompareToThrowsOnTypeMismatch()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            newtonpermeter.CompareTo(new object());
        }
        public void As()
        {
            var newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.CentinewtonPerMeter), CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.DecanewtonPerMeter), DecanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.DecinewtonPerMeter), DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(ExanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.ExanewtonPerMeter), ExanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(FemtonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.FemtonewtonPerMeter), FemtonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(GiganewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.GiganewtonPerMeter), GiganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(HectonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.HectonewtonPerMeter), HectonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilogramForcePerMeter), KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilonewtonPerMeter), KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MeganewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MeganewtonPerMeter), MeganewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MicronewtonPerMeter), MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MillinewtonPerMeter), MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NanonewtonPerMeter), NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NewtonPerMeter), NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(PetanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.PetanewtonPerMeter), PetanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(PiconewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.PiconewtonPerMeter), PiconewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(QutranewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.QutranewtonPerMeter), QutranewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(TeranewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.TeranewtonPerMeter), TeranewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(VettanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.VettanewtonPerMeter), VettanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(YottanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.YottanewtonPerMeter), YottanewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(ZettanewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.ZettanewtonPerMeter), ZettanewtonsPerMeterTolerance);
        }
Пример #11
0
        public void CompareToIsImplemented()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.AreEqual(0, newtonpermeter.CompareTo(newtonpermeter));
            Assert.Greater(newtonpermeter.CompareTo(ForcePerLength.Zero), 0);
            Assert.Less(ForcePerLength.Zero.CompareTo(newtonpermeter), 0);
        }
Пример #12
0
        public void CompareToIsImplemented()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.Equal(0, newtonpermeter.CompareTo(newtonpermeter));
            Assert.True(newtonpermeter.CompareTo(ForcePerLength.Zero) > 0);
            Assert.True(ForcePerLength.Zero.CompareTo(newtonpermeter) < 0);
        }
Пример #13
0
        public void EqualsIsImplemented()
        {
            var a = ForcePerLength.FromNewtonsPerMeter(1);
            var b = ForcePerLength.FromNewtonsPerMeter(2);

            Assert.True(a.Equals(a));
            Assert.False(a.Equals(b));
            Assert.False(a.Equals(null));
        }
Пример #14
0
        public void ArithmeticOperators()
        {
            ForcePerLength v = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(-1, -v.NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(2, (ForcePerLength.FromNewtonsPerMeter(3) - v).NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(2, (v + v).NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(10, (v * 10).NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(10, (10 * v).NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(2, (ForcePerLength.FromNewtonsPerMeter(10) / 5).NewtonsPerMeter, NewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(2, ForcePerLength.FromNewtonsPerMeter(10) / ForcePerLength.FromNewtonsPerMeter(5), NewtonsPerMeterTolerance);
        }
Пример #15
0
        public void ConversionRoundTrip()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(1, ForcePerLength.FromCentinewtonsPerMeter(newtonpermeter.CentinewtonsPerMeter).NewtonsPerMeter, CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromDecinewtonsPerMeter(newtonpermeter.DecinewtonsPerMeter).NewtonsPerMeter, DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilogramsForcePerMeter(newtonpermeter.KilogramsForcePerMeter).NewtonsPerMeter, KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromKilonewtonsPerMeter(newtonpermeter.KilonewtonsPerMeter).NewtonsPerMeter, KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMicronewtonsPerMeter(newtonpermeter.MicronewtonsPerMeter).NewtonsPerMeter, MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromMillinewtonsPerMeter(newtonpermeter.MillinewtonsPerMeter).NewtonsPerMeter, MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNanonewtonsPerMeter(newtonpermeter.NanonewtonsPerMeter).NewtonsPerMeter, NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(1, ForcePerLength.FromNewtonsPerMeter(newtonpermeter.NewtonsPerMeter).NewtonsPerMeter, NewtonsPerMeterTolerance);
        }
Пример #16
0
        public void NewtonPerMeterToForcePerLengthUnits()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.CentinewtonsPerMeter, CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.DecinewtonsPerMeter, DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, newtonpermeter.KilogramsForcePerMeter, KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.KilonewtonsPerMeter, KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MicronewtonsPerMeter, MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.MillinewtonsPerMeter, MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.NanonewtonsPerMeter, NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.NewtonsPerMeter, NewtonsPerMeterTolerance);
        }
Пример #17
0
        public void EqualityOperators()
        {
            ForcePerLength a = ForcePerLength.FromNewtonsPerMeter(1);
            ForcePerLength b = ForcePerLength.FromNewtonsPerMeter(2);

// ReSharper disable EqualExpressionComparison
            Assert.True(a == a);
            Assert.True(a != b);

            Assert.False(a == b);
            Assert.False(a != a);
// ReSharper restore EqualExpressionComparison
        }
Пример #18
0
        public void As()
        {
            var newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.CentinewtonPerMeter), CentinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.DecinewtonPerMeter), DecinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilogramForcePerMeter), KilogramsForcePerMeterTolerance);
            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.KilonewtonPerMeter), KilonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MicronewtonPerMeter), MicronewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.MillinewtonPerMeter), MillinewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NanonewtonPerMeter), NanonewtonsPerMeterTolerance);
            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, newtonpermeter.As(ForcePerLengthUnit.NewtonPerMeter), NewtonsPerMeterTolerance);
        }
        public void ToUnit()
        {
            var newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            var centinewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.CentinewtonPerMeter);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, (double)centinewtonpermeterQuantity.Value, CentinewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.CentinewtonPerMeter, centinewtonpermeterQuantity.Unit);

            var decinewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.DecinewtonPerMeter);

            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, (double)decinewtonpermeterQuantity.Value, DecinewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.DecinewtonPerMeter, decinewtonpermeterQuantity.Unit);

            var kilogramforcepermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.KilogramForcePerMeter);

            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, (double)kilogramforcepermeterQuantity.Value, KilogramsForcePerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.KilogramForcePerMeter, kilogramforcepermeterQuantity.Unit);

            var kilonewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.KilonewtonPerMeter);

            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, (double)kilonewtonpermeterQuantity.Value, KilonewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.KilonewtonPerMeter, kilonewtonpermeterQuantity.Unit);

            var meganewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.MeganewtonPerMeter);

            AssertEx.EqualTolerance(MeganewtonsPerMeterInOneNewtonPerMeter, (double)meganewtonpermeterQuantity.Value, MeganewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.MeganewtonPerMeter, meganewtonpermeterQuantity.Unit);

            var micronewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.MicronewtonPerMeter);

            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, (double)micronewtonpermeterQuantity.Value, MicronewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.MicronewtonPerMeter, micronewtonpermeterQuantity.Unit);

            var millinewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.MillinewtonPerMeter);

            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, (double)millinewtonpermeterQuantity.Value, MillinewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.MillinewtonPerMeter, millinewtonpermeterQuantity.Unit);

            var nanonewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.NanonewtonPerMeter);

            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, (double)nanonewtonpermeterQuantity.Value, NanonewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.NanonewtonPerMeter, nanonewtonpermeterQuantity.Unit);

            var newtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.NewtonPerMeter);

            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, (double)newtonpermeterQuantity.Value, NewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.NewtonPerMeter, newtonpermeterQuantity.Unit);
        }
Пример #20
0
        public void ComparisonOperators()
        {
            ForcePerLength oneNewtonPerMeter  = ForcePerLength.FromNewtonsPerMeter(1);
            ForcePerLength twoNewtonsPerMeter = ForcePerLength.FromNewtonsPerMeter(2);

            Assert.True(oneNewtonPerMeter < twoNewtonsPerMeter);
            Assert.True(oneNewtonPerMeter <= twoNewtonsPerMeter);
            Assert.True(twoNewtonsPerMeter > oneNewtonPerMeter);
            Assert.True(twoNewtonsPerMeter >= oneNewtonPerMeter);

            Assert.False(oneNewtonPerMeter > twoNewtonsPerMeter);
            Assert.False(oneNewtonPerMeter >= twoNewtonsPerMeter);
            Assert.False(twoNewtonsPerMeter < oneNewtonPerMeter);
            Assert.False(twoNewtonsPerMeter <= oneNewtonPerMeter);
        }
Пример #21
0
    public ForcePerLength surface_tension()
    {
        if (Environment.Is64BitProcess)
        {
            if (0 < Q() && Q() < 1)
            {
                return(ForcePerLength.FromNewtonsPerMeter(CoolPropPINVOKE64.AbstractState_surface_tension(swigCPtr)));
            }
        }
        else
        {
            if (0 < Q() && Q() < 1)
            {
                return(ForcePerLength.FromNewtonsPerMeter(CoolPropPINVOKE.AbstractState_surface_tension(swigCPtr)));
            }
        }


        return(ForcePerLength.Zero);
    }
Пример #22
0
        public void CompareToThrowsOnNull()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.Throws <ArgumentNullException>(() => newtonpermeter.CompareTo(null));
        }
Пример #23
0
        public void CompareToThrowsOnTypeMismatch()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.Throws <ArgumentException>(() => newtonpermeter.CompareTo(new object()));
        }
Пример #24
0
 /// <inheritdoc cref="ForcePerLength.FromNewtonsPerMeter(double?)"/>
 public static ForcePerLength?NewtonsPerMeter(this decimal?value) => ForcePerLength.FromNewtonsPerMeter(value == null ? (double?)null : Convert.ToDouble(value.Value));
Пример #25
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.False(newtonpermeter.Equals(new object()));
        }
Пример #26
0
 public void FromNewtonsPerMeter_WithInfinityValue_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() => ForcePerLength.FromNewtonsPerMeter(double.PositiveInfinity));
     Assert.Throws <ArgumentException>(() => ForcePerLength.FromNewtonsPerMeter(double.NegativeInfinity));
 }
Пример #27
0
 public void FromNewtonsPerMeter_WithNanValue_ThrowsArgumentException()
 {
     Assert.Throws <ArgumentException>(() => ForcePerLength.FromNewtonsPerMeter(double.NaN));
 }
Пример #28
0
 /// <inheritdoc cref="ForcePerLength.FromNewtonsPerMeter(double)"/>
 public static ForcePerLength NewtonsPerMeter(this decimal value) => ForcePerLength.FromNewtonsPerMeter(Convert.ToDouble(value));
Пример #29
0
        public void EqualsReturnsFalseOnNull()
        {
            ForcePerLength newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            Assert.False(newtonpermeter.Equals(null));
        }
Пример #30
0
        public void ToUnit()
        {
            var newtonpermeter = ForcePerLength.FromNewtonsPerMeter(1);

            var centinewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.CentinewtonPerMeter);

            AssertEx.EqualTolerance(CentinewtonsPerMeterInOneNewtonPerMeter, (double)centinewtonpermeterQuantity.Value, CentinewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.CentinewtonPerMeter, centinewtonpermeterQuantity.Unit);

            var decinewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.DecinewtonPerMeter);

            AssertEx.EqualTolerance(DecinewtonsPerMeterInOneNewtonPerMeter, (double)decinewtonpermeterQuantity.Value, DecinewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.DecinewtonPerMeter, decinewtonpermeterQuantity.Unit);

            var kilogramforcepermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.KilogramForcePerMeter);

            AssertEx.EqualTolerance(KilogramsForcePerMeterInOneNewtonPerMeter, (double)kilogramforcepermeterQuantity.Value, KilogramsForcePerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.KilogramForcePerMeter, kilogramforcepermeterQuantity.Unit);

            var kilonewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.KilonewtonPerMeter);

            AssertEx.EqualTolerance(KilonewtonsPerMeterInOneNewtonPerMeter, (double)kilonewtonpermeterQuantity.Value, KilonewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.KilonewtonPerMeter, kilonewtonpermeterQuantity.Unit);

            var meganewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.MeganewtonPerMeter);

            AssertEx.EqualTolerance(MeganewtonsPerMeterInOneNewtonPerMeter, (double)meganewtonpermeterQuantity.Value, MeganewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.MeganewtonPerMeter, meganewtonpermeterQuantity.Unit);

            var micronewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.MicronewtonPerMeter);

            AssertEx.EqualTolerance(MicronewtonsPerMeterInOneNewtonPerMeter, (double)micronewtonpermeterQuantity.Value, MicronewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.MicronewtonPerMeter, micronewtonpermeterQuantity.Unit);

            var millinewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.MillinewtonPerMeter);

            AssertEx.EqualTolerance(MillinewtonsPerMeterInOneNewtonPerMeter, (double)millinewtonpermeterQuantity.Value, MillinewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.MillinewtonPerMeter, millinewtonpermeterQuantity.Unit);

            var nanonewtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.NanonewtonPerMeter);

            AssertEx.EqualTolerance(NanonewtonsPerMeterInOneNewtonPerMeter, (double)nanonewtonpermeterQuantity.Value, NanonewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.NanonewtonPerMeter, nanonewtonpermeterQuantity.Unit);

            var newtonpermeterQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.NewtonPerMeter);

            AssertEx.EqualTolerance(NewtonsPerMeterInOneNewtonPerMeter, (double)newtonpermeterQuantity.Value, NewtonsPerMeterTolerance);
            Assert.Equal(ForcePerLengthUnit.NewtonPerMeter, newtonpermeterQuantity.Unit);

            var poundforceperfootQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.PoundForcePerFoot);

            AssertEx.EqualTolerance(PoundsForcePerFootInOneNewtonPerMeter, (double)poundforceperfootQuantity.Value, PoundsForcePerFootTolerance);
            Assert.Equal(ForcePerLengthUnit.PoundForcePerFoot, poundforceperfootQuantity.Unit);

            var poundforceperinchQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.PoundForcePerInch);

            AssertEx.EqualTolerance(PoundsForcePerInchInOneNewtonPerMeter, (double)poundforceperinchQuantity.Value, PoundsForcePerInchTolerance);
            Assert.Equal(ForcePerLengthUnit.PoundForcePerInch, poundforceperinchQuantity.Unit);

            var poundforceperyardQuantity = newtonpermeter.ToUnit(ForcePerLengthUnit.PoundForcePerYard);

            AssertEx.EqualTolerance(PoundsForcePerYardInOneNewtonPerMeter, (double)poundforceperyardQuantity.Value, PoundsForcePerYardTolerance);
            Assert.Equal(ForcePerLengthUnit.PoundForcePerYard, poundforceperyardQuantity.Unit);
        }