< Summary

Information
Class: ValidateLib.ErrorsAndWarnings.ErrorOrWarning
Assembly: validatelib.dll
File(s): C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\ErrorsAndWarnings\ErrorOrWarning.cs
Line coverage
40%
Covered lines: 2
Uncovered lines: 3
Coverable lines: 5
Total lines: 29
Line coverage: 40%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBlocks covered Blocks not covered
ErrorOrWarning()100
GetMessage(...)03
GetErrorType()01

File(s)

C:\skola_karlovka\RP\code\csv-validator\CSV_Validator\ValidateLib\ErrorsAndWarnings\ErrorOrWarning.cs

#LineLine coverage
 1using System.Globalization;
 2using System.Resources;
 3using ValidateLib.ResultCreators;
 4
 5namespace ValidateLib.ErrorsAndWarnings
 6{
 7    /// <summary>
 8    /// Represents object that carries error or warning message.
 9    /// </summary>
 10    public abstract class ErrorOrWarning : Exception, IMessageHolder
 11    {
 012        ResourceManager _ResourceManager { get; set; } =
 113            new ResourceManager(EWConstants.GeneralResources, typeof(ErrorOrWarning).Assembly);
 14
 115        protected ResourceManager GeneralManager = new ResourceManager(EWConstants.ErrorResources, typeof(ErrorOrWarning
 16
 17        /// <summary>
 18        /// Returns localized error or warning message.
 19        /// </summary>
 20        /// <param name="cultureInfo"> Culture in which the error message text should be localized.</param>
 21        /// <returns> Localized error/warning message.</returns>
 022        public virtual string GetMessage(CultureInfo cultureInfo) => _ResourceManager.GetString("GeneralMessage", cultur
 23        /// <summary>
 24        /// Specifies what type of error it is. Inherited classes override this property.
 25        /// </summary>
 26        /// <returns> <see cref="ErrorType"/>></returns>
 027        public virtual ErrorType GetErrorType() => ErrorType.VALID;
 28    }
 29}