Exemplo n.º 1
0
        public void CompareToIsImplemented()
        {
            Elasticity newtonpersquaremeter = Elasticity.FromNewtonsPerSquareMeter(1);

            Assert.AreEqual(0, newtonpersquaremeter.CompareTo(newtonpersquaremeter));
            Assert.Greater(newtonpersquaremeter.CompareTo(Elasticity.Zero), 0);
            Assert.Less(Elasticity.Zero.CompareTo(newtonpersquaremeter), 0);
        }
Exemplo n.º 2
0
        public void CompareToThrowsOnNull()
        {
            Elasticity newtonpersquaremeter = Elasticity.FromNewtonsPerSquareMeter(1);

// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            newtonpersquaremeter.CompareTo(null);
        }
Exemplo n.º 3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            Elasticity newtonpersquaremeter = Elasticity.FromNewtonsPerSquareMeter(1);

// ReSharper disable once ReturnValueOfPureMethodIsNotUsed
            newtonpersquaremeter.CompareTo(new object());
        }