예제 #1
0
        public void CompareToIsImplemented()
        {
            MassFlux kilogrampersecondpersquaremeter = MassFlux.FromKilogramsPerSecondPerSquareMeter(1);

            Assert.Equal(0, kilogrampersecondpersquaremeter.CompareTo(kilogrampersecondpersquaremeter));
            Assert.True(kilogrampersecondpersquaremeter.CompareTo(MassFlux.Zero) > 0);
            Assert.True(MassFlux.Zero.CompareTo(kilogrampersecondpersquaremeter) < 0);
        }
예제 #2
0
        public void CompareToThrowsOnNull()
        {
            MassFlux kilogrampersecondpersquaremeter = MassFlux.FromKilogramsPerSecondPerSquareMeter(1);

            Assert.Throws <ArgumentNullException>(() => kilogrampersecondpersquaremeter.CompareTo(null));
        }
예제 #3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            MassFlux kilogrampersecondpersquaremeter = MassFlux.FromKilogramsPerSecondPerSquareMeter(1);

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