< Summary

Class:MUNity.Database.Models.Simulation.SimulationUser
Assembly:MUNity.Database
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\Simulation\SimulationUser.cs
Covered lines:0
Uncovered lines:21
Coverable lines:21
Total lines:48
Line coverage:0% (0 of 21)
Covered branches:0
Total branches:0
Covered methods:0
Total methods:15
Method coverage:0% (0 of 15)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
get_SimulationUserId()100%10%
get_Token()100%10%
get_DisplayName()100%10%
get_PublicUserId()100%10%
get_Password()100%10%
get_PinRetries()100%10%
get_Role()100%10%
get_CanCreateRole()100%10%
get_CanSelectRole()100%10%
get_CanEditResolution()100%10%
get_CanEditListOfSpeakers()100%10%
get_LastKnownConnectionId()100%10%
get_Simulation()100%10%
get_Petitions()100%10%
.ctor()100%10%

File(s)

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

#LineLine coverage
 1using System;
 2using System.Collections.Generic;
 3using System.ComponentModel.DataAnnotations;
 4using System.Diagnostics.CodeAnalysis;
 5using System.Linq;
 6using System.Text.Json.Serialization;
 7using System.Threading.Tasks;
 8
 9namespace MUNity.Database.Models.Simulation;
 10
 11public class SimulationUser
 12{
 013    public int SimulationUserId { get; set; }
 14
 015    public string Token { get; set; }
 16
 017    public string DisplayName { get; set; }
 18
 019    public string PublicUserId { get; set; }
 20
 021    public string Password { get; set; }
 22
 023    public int PinRetries { get; set; }
 24
 025    public SimulationRole Role { get; set; }
 26
 027    public bool CanCreateRole { get; set; }
 28
 029    public bool CanSelectRole { get; set; }
 30
 031    public bool CanEditResolution { get; set; } = false;
 32
 033    public bool CanEditListOfSpeakers { get; set; } = false;
 34
 035    public string LastKnownConnectionId { get; set; }
 36
 037    public Simulation Simulation { get; set; }
 38
 039    public ICollection<Petition> Petitions { get; set; }
 40
 041    public SimulationUser()
 042    {
 043        this.Token = Util.IdGenerator.RandomString(20);
 044        this.Password = Util.IdGenerator.RandomString(8);
 045        this.PublicUserId = new Random().Next(100000000, 999999999).ToString();
 046        PinRetries = 0;
 047    }
 48}