コード例 #1
0
        public void EqualsIsImplemented()
        {
            ReactivePower v = ReactivePower.FromVoltamperesReactive(1);

            Assert.True(v.Equals(ReactivePower.FromVoltamperesReactive(1)));
            Assert.False(v.Equals(ReactivePower.Zero));
        }
コード例 #2
0
        public void EqualsReturnsFalseOnNull()
        {
            ReactivePower voltamperereactive = ReactivePower.FromVoltamperesReactive(1);

            Assert.False(voltamperereactive.Equals(null));
        }
コード例 #3
0
        public void EqualsReturnsFalseOnTypeMismatch()
        {
            ReactivePower voltamperereactive = ReactivePower.FromVoltamperesReactive(1);

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