コード例 #1
0
        public void CompareToThrowsOnNull()
        {
            AreaMomentOfInertia metertothefourth = AreaMomentOfInertia.FromMetersToTheFourth(1);

            Assert.Throws <ArgumentNullException>(() => metertothefourth.CompareTo(null));
        }
コード例 #2
0
        public void CompareToThrowsOnTypeMismatch()
        {
            AreaMomentOfInertia metertothefourth = AreaMomentOfInertia.FromMetersToTheFourth(1);

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