1
+ using Adia . SsnValidator . Validators ;
2
+ using NUnit . Framework ;
3
+
4
+ namespace Adia . Ssn . Tests . Validators
5
+ {
6
+ [ TestFixture ]
7
+ public class AhvValidatorTests
8
+ {
9
+ private AhvValidator _validator ;
10
+
11
+ [ SetUp ]
12
+ public void Setup ( )
13
+ {
14
+ _validator = new AhvValidator ( ) ;
15
+ }
16
+
17
+ [ Test ]
18
+ [ TestCase ( "756.4089.0811.50" , true ) ]
19
+ [ TestCase ( "756.5220.1643.81" , true ) ]
20
+ [ TestCase ( "756.5837.4745.52" , true ) ]
21
+ [ TestCase ( "756.1656.9672.13" , true ) ]
22
+ [ TestCase ( "756.6168.0333.64" , true ) ]
23
+ [ TestCase ( "756.0246.1057.45" , true ) ]
24
+ [ TestCase ( "756.8478.9370.66" , true ) ]
25
+ [ TestCase ( "756.0298.4726.97" , true ) ]
26
+ [ TestCase ( "756.5113.6381.28" , true ) ]
27
+ [ TestCase ( "756.5466.9658.89" , true ) ]
28
+ [ TestCase ( "7561656967213" , true ) ]
29
+ [ TestCase ( "756.1234.5678.95" , false ) ]
30
+ [ TestCase ( "7561234567895" , false ) ]
31
+ [ TestCase ( "75612345648955" , false ) ]
32
+
33
+ public void ValidateAhvNumberAsExpected ( string ssn , bool expectedResult )
34
+ {
35
+ var result = _validator . Validate ( ssn ) ;
36
+
37
+ Assert . That ( result , Is . EqualTo ( expectedResult ) ) ;
38
+ }
39
+ }
40
+ }
0 commit comments