Пример #1
0
        public void EqualsIsImplemented()
        {
            Capacitance v = Capacitance.FromFarads(1);

            Assert.True(v.Equals(Capacitance.FromFarads(1), Capacitance.FromFarads(FaradsTolerance)));
            Assert.False(v.Equals(Capacitance.Zero, Capacitance.FromFarads(FaradsTolerance)));
        }
Пример #2
0
        public void EqualsReturnsFalseOnNull()
        {
            Capacitance farad = Capacitance.FromFarads(1);

            Assert.False(farad.Equals(null));
        }
Пример #3
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            Capacitance farad = Capacitance.FromFarads(1);

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