< Summary

Information
Class: Morpho25.Settings.PlantSetting
Assembly: Morpho25
File(s): D:\a\Morpho\Morpho\project\Morpho\Morpho25\Settings\PlantSetting.cs
Line coverage
95%
Covered lines: 20
Uncovered lines: 1
Coverable lines: 21
Total lines: 64
Line coverage: 95.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_CO2()100%1100%
get_LeafTransmittance()100%1100%
get_TreeCalendar()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\PlantSetting.cs

#LineLine coverage
 1namespace Morpho25.Settings
 2{
 3    /// <summary>
 4    /// Tree settings class.
 5    /// </summary>
 6    public class PlantSetting
 7    {
 8        /// <summary>
 9        /// CO2 background level (ppm).
 10        /// The default value of the CO2 background concentration is set to 400 ppm.
 11        /// </summary>
 612        public uint CO2 { get; set; }
 13
 14        /// <summary>
 15        /// Use old calculation model.
 16        /// or use user defined value.
 17        /// </summary>
 318        public Active LeafTransmittance { get; set; }
 19
 20        /// <summary>
 21        /// Use tree calendar,
 22        /// </summary>
 523        public Active TreeCalendar { get; set; }
 24
 25        /// <summary>
 26        /// Create a new PlantSetting object.
 27        /// </summary>
 228        public PlantSetting()
 229        {
 230            CO2 = 400;
 231            LeafTransmittance = Active.YES;
 232            TreeCalendar = Active.YES;
 233        }
 34
 35        /// <summary>
 36        /// Title of the XML section
 37        /// </summary>
 138        public string Title => "PlantModel";
 39
 40        /// <summary>
 41        /// Values of the XML section
 42        /// </summary>
 143        public string[] Values => new[] {
 144            CO2.ToString("n5"),
 145            ((int)LeafTransmittance).ToString(),
 146            ((int)TreeCalendar).ToString()
 147        };
 48
 49        /// <summary>
 50        /// Tags of the XML section
 51        /// </summary>
 152        public string[] Tags => new[] {
 153            "CO2BackgroundPPM",
 154            "LeafTransmittance",
 155            "TreeCalendar"
 156        };
 57
 58        /// <summary>
 59        /// String representation of PlantSetting object.
 60        /// </summary>
 61        /// <returns>String representation.</returns>
 062        public override string ToString() => "Config::PlantSetting";
 63    }
 64}