< Summary

Information
Class: Morpho25.Settings.Background
Assembly: Morpho25
File(s): D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\Background.cs
Line coverage
98%
Covered lines: 56
Uncovered lines: 1
Coverable lines: 57
Total lines: 137
Line coverage: 98.2%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_UserSpec()100%1100%
set_UserSpec(...)100%1100%
get_No()100%1100%
set_No(...)100%1100%
get_No2()100%1100%
set_No2(...)100%1100%
get_O3()100%1100%
set_O3(...)100%1100%
get_Pm10()100%1100%
set_Pm10(...)100%1100%
get_Pm25()100%1100%
set_Pm25(...)100%1100%
.ctor()100%1100%
get_Title()100%1100%
get_Values()100%1100%
get_Tags()100%1100%
ToString()100%10%

File(s)

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

#LineLine coverage
 1namespace Morpho25.Settings
 2{
 3    /// <summary>
 4    /// Background class.
 5    /// </summary>
 6    public class Background : Configuration
 7    {
 8        private double _userSpec;
 9        private double _no;
 10        private double _no2;
 11        private double _o3;
 12        private double _pm10;
 13        private double _pm25;
 14
 15        /// <summary>
 16        /// User pollutant.
 17        /// </summary>
 18        public double UserSpec
 19        {
 320            get { return _userSpec; }
 21            set
 222            {
 223                ItIsPositive(value);
 224                _userSpec = value;
 225            }
 26        }
 27        /// <summary>
 28        /// Enable NO.
 29        /// </summary>
 30        public double No
 31        {
 332            get { return _no; }
 33            set
 234            {
 235                ItIsPositive(value);
 236                _no = value;
 237            }
 38        }
 39        /// <summary>
 40        /// Enable NO2.
 41        /// </summary>
 42        public double No2
 43        {
 344            get { return _no2; }
 45            set
 346            {
 347                ItIsPositive(value);
 248                _no2 = value;
 249            }
 50        }
 51        /// <summary>
 52        /// Enable O3.
 53        /// </summary>
 54        public double O3
 55        {
 356            get { return _o3; }
 57            set
 258            {
 259                ItIsPositive(value);
 260                _o3 = value;
 261            }
 62        }
 63        /// <summary>
 64        /// Enable PM10.
 65        /// </summary>
 66        public double Pm10
 67        {
 668            get { return _pm10; }
 69            set
 270            {
 271                ItIsPositive(value);
 272                _pm10 = value;
 273            }
 74        }
 75        /// <summary>
 76        /// Enable PM25.
 77        /// </summary>
 78        public double Pm25
 79        {
 680            get { return _pm25; }
 81            set
 382            {
 383                ItIsPositive(value);
 384                _pm25 = value;
 385            }
 86        }
 87        /// <summary>
 88        /// Create new Background object.
 89        /// </summary>
 290        public Background()
 291        {
 292            UserSpec = 0;
 293            No = 0;
 294            No2 = 0;
 295            O3 = 0;
 296            Pm10 = 0;
 297            Pm25 = 0;
 298        }
 99
 100
 101        /// <summary>
 102        /// Title of the XML section
 103        /// </summary>
 1104        public string Title => "Background";
 105
 106        /// <summary>
 107        /// Values of the XML section
 108        /// </summary>
 1109        public string[] Values => new[] {
 1110            UserSpec.ToString("n5"),
 1111            No.ToString("n5"),
 1112            No2.ToString("n5"),
 1113            O3.ToString("n5"),
 1114            Pm10.ToString("n5"),
 1115            Pm25.ToString("n5")
 1116        };
 117
 118        /// <summary>
 119        /// Tags of the XML section
 120        /// </summary>
 1121        public string[] Tags => new[] {
 1122            "userSpec",
 1123            "NO",
 1124            "NO2",
 1125            "O3",
 1126            "PM_10",
 1127            "PM_2_5"
 1128        };
 129
 130        /// <summary>
 131        /// String representation of BackGround object.
 132        /// </summary>
 133        /// <returns>String representation.</returns>
 0134        public override string ToString() => "Config::Background";
 135    }
 136
 137}