Esempio n. 1
0
        public void CompareToIsImplemented()
        {
            ElectricCurrentDensity amperepersquaremeter = ElectricCurrentDensity.FromAmperesPerSquareMeter(1);

            Assert.Equal(0, amperepersquaremeter.CompareTo(amperepersquaremeter));
            Assert.True(amperepersquaremeter.CompareTo(ElectricCurrentDensity.Zero) > 0);
            Assert.True(ElectricCurrentDensity.Zero.CompareTo(amperepersquaremeter) < 0);
        }
Esempio n. 2
0
        public void CompareToThrowsOnNull()
        {
            ElectricCurrentDensity amperepersquaremeter = ElectricCurrentDensity.FromAmperesPerSquareMeter(1);

            Assert.Throws <ArgumentNullException>(() => amperepersquaremeter.CompareTo(null));
        }
Esempio n. 3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            ElectricCurrentDensity amperepersquaremeter = ElectricCurrentDensity.FromAmperesPerSquareMeter(1);

            Assert.Throws <ArgumentException>(() => amperepersquaremeter.CompareTo(new object()));
        }