Example #1
0
        public void Mixed(double t, double d, double expectedRh, double accuracy, RelativeHumidityFormula formula)
        {
            var rh  = HumidityCalculator.CalculateRelativeHumidity(t, d, formula);
            var min = Math.Max(expectedRh * (1 - accuracy), 0);
            var max = Math.Min(expectedRh * (1 + accuracy), 100);

            Assert.InRange(rh, min, max);
        }
Example #2
0
        public void PositiveNasa(double t, double d, double expectedRh, double accuracy)
        {
            var rh  = HumidityCalculator.CalculateRelativeHumidity(t, d, Nasa);
            var min = Math.Max(expectedRh * (1 - accuracy), 0);
            var max = Math.Min(expectedRh * (1 + accuracy), 100);

            Assert.InRange(rh, min, max);
        }