< Summary

Class:MUNity.Models.Resolution.OperativeParagraph
Assembly:MUNity.Schema
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNitySchema\Models\Resolution\OperativeParagraph.cs
Covered lines:0
Uncovered lines:20
Coverable lines:20
Total lines:82
Line coverage:0% (0 of 20)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:11
Method coverage:0% (0 of 11)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_OperativeParagraphId()100%10%
get_Name()100%10%
get_IsLocked()100%10%
get_IsVirtual()100%10%
get_Text()100%10%
get_Visible()100%10%
get_Corrected()100%10%
get_Children()100%10%
get_Comment()100%10%
.ctor(...)100%10%
.ctor()100%10%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNitySchema\Models\Resolution\OperativeParagraph.cs

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.Collections.ObjectModel;
 4using System.ComponentModel;
 5using System.Runtime.CompilerServices;
 6using System.Text;
 7
 8namespace MUNity.Models.Resolution
 9{
 10
 11    /// <summary>
 12    /// An operative Paragraph is a paragraph inside the operative section. You can create amendments for this type of
 13    /// paragraph and they can also have child paragraphs.
 14    /// </summary>
 15    public class OperativeParagraph
 16    {
 17
 18        /// <summary>
 19        /// The Id of the operativee Paragraph.
 20        /// </summary>
 021        public string OperativeParagraphId { get; set; }
 22
 23        /// <summary>
 24        /// The name of the paragraph if you want to identify it by a given name.
 25        /// </summary>
 026        public string Name { get; set; }
 27
 28        /// <summary>
 29        /// Is the paragraph marked as locked. This will not effect the logic you can still submit amendments
 30        /// or apply amendments to it. This may change in future implementations!
 31        /// </summary>
 032        public bool IsLocked { get; set; }
 33
 34        /// <summary>
 35        /// Virtual is true when the Operative Paragraph comes from an AddAmendment and doesn't really count as an
 36        /// paragraph or if it is from a move amendment and is the paragraph where the orignal should be moved to.
 37        /// </summary>
 038        public bool IsVirtual { get; set; }
 39
 40
 41        /// <summary>
 42        /// The text of the operative Paragraph.
 43        /// </summary>
 044        public string Text { get; set; }
 45
 46        /// <summary>
 47        /// Is the operative Paragraph visible inside the views.
 48        /// </summary>
 049        public bool Visible { get; set; }
 50
 51        /// <summary>
 52        /// Is the operative paragraph marked as corrected. Note that this
 53        /// does not interact with any form of logic, if the Text is changed it will
 54        /// still be marked as corrected.
 55        /// </summary>
 056        public bool Corrected { get; set; }
 57
 58        /// <summary>
 59        /// Child paragraphs of this operative paragraph.
 60        /// </summary>
 061        public List<OperativeParagraph> Children { get; set; }
 62
 063        public string Comment { get; set; }
 64
 65        /// <summary>
 66        /// Creates a new Operative Paragraph and will give it an id.
 67        /// </summary>
 68        /// <param name="text"></param>
 069        public OperativeParagraph(string text = "")
 070        {
 071            this.Text = text;
 072            this.OperativeParagraphId = Guid.NewGuid().ToString();
 073            this.Children = new List<OperativeParagraph>();
 074        }
 75
 076        public OperativeParagraph()
 077        {
 078            this.OperativeParagraphId = Guid.NewGuid().ToString();
 079            this.Children = new List<OperativeParagraph>();
 080        }
 81    }
 82}