1- using PayrollEngine . Client . Model ;
1+ using System ;
2+ using System . Globalization ;
3+ using PayrollEngine . Client . Model ;
24
35namespace PayrollEngine . Client . Test . Payrun ;
46
57/// <summary>Payrun test result</summary>
68public class PayrunTestResult : TestResultBase < PayrunResult >
79{
10+ /// <summary>The test culture</summary>
11+ public CultureInfo Culture { get ; set ; }
12+
813 /// <summary>Initializes a new instance of the <see cref="PayrunTestResult"/> class</summary>
14+ /// <param name="culture">The culture</param>
915 /// <param name="expectedResult">The expected result</param>
1016 /// <param name="actualResult">The actual result</param>
11- public PayrunTestResult ( PayrunResult expectedResult , PayrunResult actualResult = null ) :
17+ public PayrunTestResult ( CultureInfo culture , PayrunResult expectedResult , PayrunResult actualResult = null ) :
1218 base ( expectedResult , actualResult )
1319 {
20+ Culture = culture ?? throw new ArgumentNullException ( nameof ( culture ) ) ;
1421 }
1522
1623 /// <inheritdoc />
@@ -21,8 +28,8 @@ public override bool IsValidResult()
2128 return false ;
2229 }
2330
24- var expectedValue = ValueConvert . ToValue ( ExpectedResult . Value , ExpectedResult . ValueType ) ;
25- var actualValue = ValueConvert . ToValue ( ActualResult . Value , ActualResult . ValueType ) ;
31+ var expectedValue = ValueConvert . ToValue ( ExpectedResult . Value , ExpectedResult . ValueType , Culture ) ;
32+ var actualValue = ValueConvert . ToValue ( ActualResult . Value , ActualResult . ValueType , Culture ) ;
2633 return Equals ( expectedValue , actualValue ) ;
2734 }
2835}
0 commit comments