< Summary

Class:MUNity.Database.Models.Resolution.ResolutionAuth
Assembly:MUNity.Database
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\Resolution\ResolutionAuth.cs
Covered lines:4
Uncovered lines:15
Coverable lines:19
Total lines:60
Line coverage:21% (4 of 19)
Covered branches:0
Total branches:0
Covered methods:2
Total methods:17
Method coverage:11.7% (2 of 17)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_ResolutionId()100%1100%
get_CreationUser()100%10%
get_CreationDate()100%10%
get_LastChangeTime()100%10%
get_Users()100%10%
get_AllowPublicRead()100%10%
get_AllowPublicEdit()100%10%
get_AllowConferenceRead()100%10%
get_AllowCommitteeRead()100%10%
get_AllowOnlineAmendments()100%10%
get_PublicShortKey()100%10%
get_EditPassword()100%10%
get_ReadPassword()100%10%
get_Committee()100%10%
get_Simulation()100%10%
get_Resolution()100%10%
.ctor()100%1100%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\Resolution\ResolutionAuth.cs

#LineLine coverage
 1using MUNity.Database.Models.User;
 2using System;
 3using System.Collections.Generic;
 4using System.ComponentModel.DataAnnotations;
 5using System.ComponentModel.DataAnnotations.Schema;
 6using System.Linq;
 7using System.Threading.Tasks;
 8
 9namespace MUNity.Database.Models.Resolution;
 10
 11/// <summary>
 12/// A ResolutionAuth saves a resolution inside the Database and manages
 13/// the access to this element. Note that this Logic is seperated from the
 14/// MUN-Core this is due to a discussion that resulted in a clear split
 15/// between basic MUN functions and advanced editors.
 16/// </summary>
 17public class ResolutionAuth
 18{
 19    [Key]
 20    [ForeignKey(nameof(Resolution))]
 121    public string ResolutionId { get; set; }
 22
 023    public MunityUser CreationUser { get; set; }
 24
 025    public DateTime CreationDate { get; set; }
 26
 027    public DateTime LastChangeTime { get; set; }
 28
 029    public ICollection<ResolutionUser> Users { get; set; }
 30
 031    public bool AllowPublicRead { get; set; }
 32
 033    public bool AllowPublicEdit { get; set; }
 34
 035    public bool AllowConferenceRead { get; set; }
 36
 037    public bool AllowCommitteeRead { get; set; }
 38
 039    public bool AllowOnlineAmendments { get; set; }
 40
 041    public string PublicShortKey { get; set; }
 42
 043    public string EditPassword { get; set; }
 44
 045    public string ReadPassword { get; set; }
 46
 47    /// <summary>
 48    /// Links to a MUN Core Committee
 49    /// </summary>
 050    public Conference.Committee Committee { get; set; }
 51
 052    public Simulation.Simulation Simulation { get; set; }
 53
 054    public ResaElement Resolution { get; set; }
 55
 1156    public ResolutionAuth()
 1157    {
 58
 1159    }
 60}