< Summary

Class:MUNity.Database.Models.Simulation.Petition
Assembly:MUNity.Database
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\Simulation\Petition.cs
Covered lines:0
Uncovered lines:12
Coverable lines:12
Total lines:56
Line coverage:0% (0 of 12)
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_Status()100%10%
get_Text()100%10%
get_PetitionDate()100%10%
get_PetitionType()100%10%
get_SimulationUser()100%10%
get_AgendaItem()100%10%
.ctor()100%10%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\Simulation\Petition.cs

#LineLine coverage
 1using MUNity.Base;
 2using System;
 3using System.Collections.Generic;
 4using System.Linq;
 5using System.Threading.Tasks;
 6
 7namespace MUNity.Database.Models.Simulation;
 8
 9/// <summary>
 10/// A Petition is a request inside a simulation made by any instance of a simulation user.
 11/// The Petition has a specific type <see cref="Petition.PetitionType"/>.
 12/// </summary>
 13public class Petition
 14{
 15    /// <summary>
 16    /// The Id of the Petition generated as a new Guid when the Petition object is created.
 17    /// </summary>
 018    public string PetitionId { get; set; }
 19
 20    /// <summary>
 21    /// The state of this petition. For example is it active (the committee is currently working on this petition).
 22    /// </summary>
 023    public EPetitionStates Status { get; set; }
 24
 25    /// <summary>
 26    /// An optional extra text for the petition. This differs from the type of petition display name.
 27    /// </summary>
 028    public string Text { get; set; }
 29
 30    /// <summary>
 31    /// The timestamp when this petition was created. Is set to the current DateTime when the object is created.
 32    /// </summary>
 033    public DateTime PetitionDate { get; set; }
 34
 35    /// <summary>
 36    /// The Type of petition. This link makes it possible to link the PetitionType that is not Inside a simulaiton.
 37    /// This is a possible weakness. The PetitionType will maybe switched to PetitionTypeSimulation.
 38    /// </summary>
 039    public PetitionType PetitionType { get; set; }
 40
 41    /// <summary>
 42    /// The Slot of the simulation (Simulation User) that made this petition.
 43    /// </summary>
 044    public SimulationUser SimulationUser { get; set; }
 45
 46    /// <summary>
 47    /// The parent agendaitem that this petition refers to.
 48    /// </summary>
 049    public AgendaItem AgendaItem { get; set; }
 50
 051    public Petition()
 052    {
 053        PetitionId = Guid.NewGuid().ToString();
 054        PetitionDate = DateTime.Now;
 055    }
 56}