Beispiel #1
0
        public void CompareToIsImplemented()
        {
            HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1);

            Assert.Equal(0, wattpersquaremeter.CompareTo(wattpersquaremeter));
            Assert.True(wattpersquaremeter.CompareTo(HeatFlux.Zero) > 0);
            Assert.True(HeatFlux.Zero.CompareTo(wattpersquaremeter) < 0);
        }
Beispiel #2
0
        public void CompareToThrowsOnNull()
        {
            HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1);

            Assert.Throws <ArgumentNullException>(() => wattpersquaremeter.CompareTo(null));
        }
Beispiel #3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            HeatFlux wattpersquaremeter = HeatFlux.FromWattsPerSquareMeter(1);

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