Beispiel #1
0
        public void CompareToIsImplemented()
        {
            StandardFlow standardcubicmeterpersecond = StandardFlow.FromStandardCubicMetersPerSecond(1);

            Assert.Equal(0, standardcubicmeterpersecond.CompareTo(standardcubicmeterpersecond));
            Assert.True(standardcubicmeterpersecond.CompareTo(StandardFlow.Zero) > 0);
            Assert.True(StandardFlow.Zero.CompareTo(standardcubicmeterpersecond) < 0);
        }
Beispiel #2
0
        public void CompareToThrowsOnNull()
        {
            StandardFlow standardcubicmeterpersecond = StandardFlow.FromStandardCubicMetersPerSecond(1);

            Assert.Throws <ArgumentNullException>(() => standardcubicmeterpersecond.CompareTo(null));
        }
Beispiel #3
0
        public void CompareToThrowsOnTypeMismatch()
        {
            StandardFlow standardcubicmeterpersecond = StandardFlow.FromStandardCubicMetersPerSecond(1);

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