Example #1
0
        public void CompareToIsImplemented()
        {
            Radiance wattpersquaremetersteradian = Radiance.FromWattPerSquareMeterSteradians(1);

            Assert.Equal(0, wattpersquaremetersteradian.CompareTo(wattpersquaremetersteradian));
            Assert.True(wattpersquaremetersteradian.CompareTo(Radiance.Zero) > 0);
            Assert.True(Radiance.Zero.CompareTo(wattpersquaremetersteradian) < 0);
        }
Example #2
0
        public void CompareToThrowsOnNull()
        {
            Radiance wattpersquaremetersteradian = Radiance.FromWattPerSquareMeterSteradians(1);

            Assert.Throws <ArgumentNullException>(() => wattpersquaremetersteradian.CompareTo(null));
        }
Example #3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            Radiance wattpersquaremetersteradian = Radiance.FromWattPerSquareMeterSteradians(1);

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