コード例 #1
0
        public void PercentThreshold2HandlesMaxThresholdsProperly()
        {
            PercentThreshold2 mem_status = new PercentThreshold2(-1.0, 101.0);

            Assert.Equal(0.0, mem_status.Transition, 1);
            Assert.Equal(100.0, mem_status.Transition2, 1);
        }
コード例 #2
0
        public void PercentThreshold2HandlesBadOrderProperly()
        {
            // Make sure the thresholds are properly swapped
            PercentThreshold2 t = new PercentThreshold2(90.0, 80.0);

            Assert.Equal(80.0, t.Transition, 1);
            Assert.Equal(90.0, t.Transition2, 1);
        }