< Summary

Class:MUNity.Extensions.ResolutionExtensions.PreambleParagraphExtensions
Assembly:MUNity.Schema
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNitySchema\Extensions\ResolutionExtensions\PreambleParagraphExtensions.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:41
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:2
Method coverage:0% (0 of 2)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
CreatePreambleParagraph(...)100%10%
HasValidOperator(...)100%10%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNitySchema\Extensions\ResolutionExtensions\PreambleParagraphExtensions.cs

#LineLine coverage
 1using MUNity.Models.Resolution;
 2using System;
 3using System.Collections.Generic;
 4using System.Text;
 5
 6namespace MUNity.Extensions.ResolutionExtensions
 7{
 8
 9    /// <summary>
 10    /// Methods to work with the Preamble of a resolution.
 11    /// </summary>
 12    public static class PreambleParagraphExtensions
 13    {
 14        /// <summary>
 15        /// Creates a new preamble paragraph.
 16        /// </summary>
 17        /// <param name="resolution"></param>
 18        /// <param name="text">The new Text of the added paragraph</param>
 19        /// <returns></returns>
 20        public static PreambleParagraph CreatePreambleParagraph(this Resolution resolution, string text = "")
 021        {
 022            var paragraph = new PreambleParagraph();
 023            paragraph.Text = text;
 024            resolution.Preamble.Paragraphs.Add(paragraph);
 025            return paragraph;
 026        }
 27
 28
 29
 30        /// <summary>
 31        /// Checks if the opertor is valid.
 32        /// NOTE THIS IS NOT IMPLEMENTED YET AND WILL ALWAYS RETURN FALSE!
 33        /// </summary>
 34        /// <param name="paragraph"></param>
 35        /// <returns></returns>
 36        public static bool HasValidOperator(this PreambleParagraph paragraph)
 037        {
 038            return false;
 039        }
 40    }
 41}