< Summary

Class:MUNity.Database.General.CountryNameTranslation
Assembly:MUNity.Database
File(s):C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\General\CountryNameTranslation.cs
Covered lines:11
Uncovered lines:4
Coverable lines:15
Total lines:31
Line coverage:73.3% (11 of 15)
Covered branches:2
Total branches:2
Branch coverage:100% (2 of 2)
Covered methods:5
Total methods:7
Method coverage:71.4% (5 of 7)

Metrics

MethodBranch coverage Cyclomatic complexity Line coverage
.ctor(...)100%2100%
.ctor()100%10%
get_CountryId()100%10%
get_LanguageCode()100%1100%
get_Country()100%1100%
get_TranslatedName()100%1100%
get_TranslatedFullName()100%1100%

File(s)

C:\Users\aeuke\source\repos\PeerConradi\munity\src\MUNityDatabase\Models\General\CountryNameTranslation.cs

#LineLine coverage
 1using System.ComponentModel.DataAnnotations.Schema;
 2
 3namespace MUNity.Database.General;
 4
 5public class CountryNameTranslation
 6{
 7
 4138    public CountryNameTranslation(Country country, string languageCode, string translation, string translatedFullName = 
 4139    {
 41310        this.Country = country;
 41311        this.LanguageCode = languageCode;
 41312        this.TranslatedName = translation;
 41313        this.TranslatedFullName = translatedFullName ?? translation;
 41314    }
 15
 016    public CountryNameTranslation()
 017    {
 18
 019    }
 20
 021    public short CountryId { get; set; }
 22
 41423    public string LanguageCode { get; set; }
 24
 25    [ForeignKey(nameof(CountryId))]
 41426    public Country Country { get; set; }
 27
 41428    public string TranslatedName { get; set; }
 29
 41430    public string TranslatedFullName { get; set; }
 31}