public void EqualsIsImplemented()
        {
            BrakeSpecificFuelConsumption v = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1);

            Assert.True(v.Equals(BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1), BrakeSpecificFuelConsumption.FromKilogramsPerJoule(KilogramsPerJouleTolerance)));
            Assert.False(v.Equals(BrakeSpecificFuelConsumption.Zero, BrakeSpecificFuelConsumption.FromKilogramsPerJoule(KilogramsPerJouleTolerance)));
        }
Пример #2
0
        public void EqualsIsImplemented()
        {
            BrakeSpecificFuelConsumption v = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1);

            Assert.IsTrue(v.Equals(BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1)));
            Assert.IsFalse(v.Equals(BrakeSpecificFuelConsumption.Zero));
        }
        public void EqualsReturnsFalseOnNull()
        {
            BrakeSpecificFuelConsumption kilogramperjoule = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1);

            Assert.False(kilogramperjoule.Equals(null));
        }
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            BrakeSpecificFuelConsumption kilogramperjoule = BrakeSpecificFuelConsumption.FromKilogramsPerJoule(1);

            Assert.False(kilogramperjoule.Equals(new object()));
        }