/// <summary>
        /// Initializes a new instance of the <see cref="HumidityCondition" /> class.
        /// </summary>
        /// <param name="humidityType">humidityType (required).</param>
        /// <param name="humidityValue">The value correcponding to the humidity_type. (required).</param>
        /// <param name="barometricPressure">Barometric air pressure on the design day [Pa]. (default to 101325D).</param>
        /// <param name="rain">Boolean to indicate rain on the design day. (default to false).</param>
        /// <param name="snowOnGround">Boolean to indicate snow on the ground during the design day. (default to false).</param>
        public HumidityCondition
        (
            HumidityTypes humidityType, double humidityValue,                                 // Required parameters
            double barometricPressure = 101325D, bool rain = false, bool snowOnGround = false // Optional parameters
        ) : base()                                                                            // BaseClass
        {
            this.HumidityType       = humidityType;
            this.HumidityValue      = humidityValue;
            this.BarometricPressure = barometricPressure;
            this.Rain         = rain;
            this.SnowOnGround = snowOnGround;

            // Set non-required readonly properties with defaultValue
            this.Type = "HumidityCondition";
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="HumidityCondition" /> class.
        /// </summary>
        /// <param name="humidityType">humidityType (required).</param>
        /// <param name="humidityValue">The value correcponding to the humidity_type. (required).</param>
        /// <param name="barometricPressure">Barometric air pressure on the design day [Pa]. (default to 101325D).</param>
        /// <param name="rain">Boolean to indicate rain on the design day. (default to false).</param>
        /// <param name="snowOnGround">Boolean to indicate snow on the ground during the design day. (default to false).</param>
        public HumidityCondition
        (
            HumidityTypes humidityType, double humidityValue,                                 // Required parameters
            double barometricPressure = 101325D, bool rain = false, bool snowOnGround = false // Optional parameters
        ) : base()                                                                            // BaseClass
        {
            this.HumidityType       = humidityType;
            this.HumidityValue      = humidityValue;
            this.BarometricPressure = barometricPressure;
            this.Rain         = rain;
            this.SnowOnGround = snowOnGround;

            // Set non-required readonly properties with defaultValue
            this.Type = "HumidityCondition";

            // check if object is valid, only check for inherited class
            if (this.GetType() == typeof(HumidityCondition))
            {
                this.IsValid(throwException: true);
            }
        }
Exemplo n.º 3
0
 public void GetHumidityTest(int humid, HumidityTypes expectedValue)
 {
     Assert.That(WeatherCell.GetHumidity(humid), Is.EqualTo(expectedValue));
 }