< Summary

Information
Class: Morpho25.Settings.SolarAdjust
Assembly: Morpho25
File(s): D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\SolarAdjust.cs
Line coverage
94%
Covered lines: 17
Uncovered lines: 1
Coverable lines: 18
Total lines: 62
Line coverage: 94.4%
Branch coverage
100%
Covered branches: 4
Total branches: 4
Branch coverage: 100%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_SWfactor()100%1100%
set_SWfactor(...)100%4100%
.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\SolarAdjust.cs

#LineLine coverage
 1using System;
 2
 3
 4namespace Morpho25.Settings
 5{
 6    /// <summary>
 7    /// SolarAdjust class.
 8    /// </summary>
 9    public class SolarAdjust
 10    {
 11        private double _sWfactor;
 12
 13        /// <summary>
 14        /// Solar adjustment factor.
 15        /// </summary>
 16        public double SWfactor
 17        {
 918            get { return _sWfactor; }
 19            set
 420            {
 421                if (value > 1.50 || value < 0.50)
 122                    throw new ArgumentException("Sw factor must be in range (0.5, 1.50).");
 323                _sWfactor = value;
 324            }
 25        }
 26
 27        /// <summary>
 28        /// Create a new SolarAdjust object.
 29        /// </summary>
 30        /// <param name="sWfactor">Solar adjustment factor to apply. double in range (0.5, 1.50).</param>
 231        public SolarAdjust()
 232        {
 233            SWfactor = 1.0;
 234        }
 35
 36        /// <summary>
 37        /// Title of the XML section
 38        /// </summary>
 139        public string Title => "SolarAdjust";
 40
 41        /// <summary>
 42        /// Values of the XML section
 43        /// </summary>
 144        public string[] Values => new[] {
 145            SWfactor.ToString("n5")
 146        };
 47
 48        /// <summary>
 49        /// Tags of the XML section
 50        /// </summary>
 151        public string[] Tags => new[] {
 152            "SWFactor"
 153        };
 54
 55        /// <summary>
 56        /// String representation of solar adjust object.
 57        /// </summary>
 58        /// <returns>String representation.</returns>
 059        public override string ToString() => "Config::SolarAdjust";
 60    }
 61
 62}