< Summary

Information
Class: Morpho25.Settings.BuildingSettings
Assembly: Morpho25
File(s): D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\BuildingSettings.cs
Line coverage
96%
Covered lines: 30
Uncovered lines: 1
Coverable lines: 31
Total lines: 94
Line coverage: 96.7%
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_IndoorTemp()100%1100%
set_IndoorTemp(...)100%1100%
get_SurfaceTemp()100%1100%
set_SurfaceTemp(...)100%1100%
get_IndoorConst()100%1100%
get_AirCondHeat()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\BuildingSettings.cs

#LineLine coverage
 1using Morpho25.Utility;
 2
 3
 4namespace Morpho25.Settings
 5{
 6    /// <summary>
 7    /// BuildingSettings class.
 8    /// </summary>
 9    public class BuildingSettings
 10    {
 11        private double _indoorTemp;
 12        private double _surfaceTemp;
 13
 14        /// <summary>
 15        /// Indoor temperature [°C].
 16        /// </summary>
 17        public double IndoorTemp
 18        {
 919            get { return _indoorTemp; }
 20            set
 321            {
 322                _indoorTemp = value + Util.TO_KELVIN;
 323            }
 24        }
 25
 26        /// <summary>
 27        /// Surface temperature [°C] of the building.
 28        /// </summary>
 29        public double SurfaceTemp
 30        {
 331            get { return _surfaceTemp; }
 32            set
 233            {
 234                _surfaceTemp = value + Util.TO_KELVIN;
 235            }
 36        }
 37
 38        /// <summary>
 39        /// Active the setpoint.
 40        /// </summary>
 341        public Active IndoorConst { get; set; }
 42
 43        /// <summary>
 44        /// Active the air conditioning.
 45        /// </summary>
 546        public Active AirCondHeat { get; set; }
 47
 48        /// <summary>
 49        /// Create a new BuildingSettings object.
 50        /// </summary>
 51        /// <param name="indoorTemp">Indoor temperature [°C].</param>
 52        /// <param name="indoorConst">Active the setpoint.</param>
 253        public BuildingSettings()
 254        {
 255            IndoorTemp = 19.85;
 256            IndoorConst = Active.YES;
 57
 258            SurfaceTemp = 19.85;
 259            AirCondHeat = Active.NO;
 260        }
 61
 62        /// <summary>
 63        /// Title of the XML section
 64        /// </summary>
 165        public string Title => "Building";
 66
 67        /// <summary>
 68        /// Values of the XML section
 69        /// </summary>
 170        public string[] Values => new[] {
 171            SurfaceTemp.ToString("n5"),
 172            IndoorTemp.ToString("n5"),
 173            ((int)IndoorConst).ToString(),
 174            ((int)AirCondHeat).ToString(),
 175        };
 76
 77        /// <summary>
 78        /// Tags of the XML section
 79        /// </summary>
 180        public string[] Tags => new[] {
 181            "surfaceTemp",
 182            "indoorTemp",
 183            "indoorConst",
 184            "airConHeat",
 185        };
 86
 87        /// <summary>
 88        /// String representation of building settings.
 89        /// </summary>
 90        /// <returns>String representation.</returns>
 091        public override string ToString() => "Config::BuildingSettings";
 92    }
 93
 94}