< Summary

Information
Class: Morpho25.Settings.Configuration
Assembly: Morpho25
File(s): D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\Configuration.cs
Line coverage
100%
Covered lines: 8
Uncovered lines: 0
Coverable lines: 8
Total lines: 85
Line coverage: 100%
Branch coverage
100%
Covered branches: 6
Total branches: 6
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
ItIsPositive(...)100%2100%
IsHumidityOk(...)100%4100%

File(s)

D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\Configuration.cs

#LineLine coverage
 1using System;
 2
 3
 4namespace Morpho25.Settings
 5{
 6    /// <summary>
 7    /// Configuration class.
 8    /// </summary>
 9    public class Configuration
 10    {
 11        /// <summary>
 12        /// Check if value is positive.
 13        /// </summary>
 14        /// <param name="value">Value to check.</param>
 15        /// <exception cref="ArgumentException">Negative.</exception>
 16        protected void ItIsPositive(double value)
 3417        {
 3418            if (value < 0)
 219                throw new ArgumentException("You cannot insert negative numbers");
 3220        }
 21        /// <summary>
 22        /// Check if relative humidity value is between 0% and 100%.
 23        /// </summary>
 24        /// <param name="value">Value to check.</param>
 25        /// <exception cref="ArgumentException">Wrong value.</exception>
 26        protected void IsHumidityOk(double value)
 8427        {
 8428            if (value < 0 || value > 100)
 229                throw new ArgumentException("Relative humidity go from 0 to 100.");
 8230        }
 31    }
 32
 33    /// <summary>
 34    /// Active enum.
 35    /// </summary>
 36    public enum Active
 37    {
 38        NO = 0,
 39        YES = 1
 40    }
 41    /// <summary>
 42    /// Pollutant enum.
 43    /// </summary>
 44    public enum Pollutant
 45    {
 46        PM = 0,
 47        CO = 1,
 48        CO2 = 2,
 49        NO = 3,
 50        NO2 = 4,
 51        SO2 = 5,
 52        NH3 = 6,
 53        H2O2 = 7,
 54        SPRAY = 8,
 55    }
 56    /// <summary>
 57    /// Turbulence enum.
 58    /// </summary>
 59    public enum TurbolenceType
 60    {
 61        MellorAndYamada = 0,
 62        KatoAndLaunder = 1,
 63        Lopez = 2,
 64        Bruse = 3,
 65    }
 66
 67    /// <summary>
 68    /// Wind at facade settings enum.
 69    /// </summary>
 70    public enum FacadeMod
 71    {
 72        MO = 0,
 73        DIN6946 = 1,
 74    }
 75
 76    /// <summary>
 77    /// Lateral Boundary Condition enum.
 78    /// </summary>
 79    public enum BoundaryCondition
 80    {
 81        Open = 1,
 82        Forced = 2,
 83        Cyclic = 3,
 84    }
 85}