< Summary

Class:MUNity.Schema.Simulation.PetitionDto
Assembly:MUNity.Schema
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNitySchema\Schema\Simulation\Petition\PetitionDto.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:61
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:8
Method coverage:0% (0 of 8)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_PetitionId()100%10%
get_PetitionTypeId()100%10%
get_Status()100%10%
get_Text()100%10%
get_PetitionDate()100%10%
get_PetitionUserId()100%10%
get_TargetAgendaItemId()100%10%
.ctor()100%10%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNitySchema\Schema\Simulation\Petition\PetitionDto.cs

#LineLine coverage
 1using MUNity.Base;
 2using MUNity.Models.Simulation;
 3using System;
 4using System.Collections.Generic;
 5using System.ComponentModel.DataAnnotations;
 6using System.Text;
 7
 8namespace MUNity.Schema.Simulation
 9{
 10    /// <summary>
 11    /// Users inside the Simulation can make Petition that can be accepted or denied by the Leader.
 12    /// </summary>
 13    public class PetitionDto : MUNity.Models.Simulation.IPetition
 14    {
 15
 16        /// <summary>
 17        /// The Id of the Petition generated by the GUID when creating a new isntance.
 18        /// </summary>
 019        public string PetitionId { get; set; }
 20
 21        /// <summary>
 22        /// References a Petition Type.
 23        /// </summary>
 024        public int PetitionTypeId { get; set; }
 25
 26        /// <summary>
 27        /// The current Status of the petition.
 28        /// </summary>
 029        public EPetitionStates Status { get; set; }
 30
 31        /// <summary>
 32        /// An optional Text for the Petition.
 33        /// </summary>
 034        public string Text { get; set; }
 35
 36        /// <summary>
 37        /// The DateTime when the Petition has been created.
 38        /// </summary>
 039        public DateTime PetitionDate { get; set; }
 40
 41        /// <summary>
 42        /// The UserId of the Petition. This is the Real user Id not the PublicUserId.
 43        /// </summary>
 044        public int PetitionUserId { get; set; }
 45
 46        /// <summary>
 47        /// The AgendaItem that this petition is refering to.
 48        /// </summary>
 049        public int TargetAgendaItemId { get; set; }
 50
 51        /// <summary>
 52        /// Creates a new Petition and generates a new Guid, Text will be string.Empty and the PetitionDate the current 
 53        /// </summary>
 054        public PetitionDto()
 055        {
 056            this.PetitionId = Guid.NewGuid().ToString();
 057            this.Text = "";
 058            this.PetitionDate = DateTime.Now;
 059        }
 60    }
 61}