Contributions by Matt Schmidt (vhaindschmim0) and Robert Ruff (vhawpbruffr)
Example #1
0
 public TestUser(StringTestObject testUser, bool useCaseInsensitive)
 {
     Uid = testUser.get("userDUZ", useCaseInsensitive);
     Name = new PersonName(testUser.get("userName", useCaseInsensitive));
     SSN = new SocSecNum(testUser.get("userSSN", useCaseInsensitive));
     PermissionString = testUser.get("context", useCaseInsensitive);
 }
Example #2
0
 public void testIsValidAlpha()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "abc"; theSSN.GroupNumber = "de"; theSSN.SerialNumber = "fghi";
 }
Example #3
0
 public void setSSN(String value)
 {
     if (StringUtils.isEmpty(value))
     {
         throw new ArgumentNullException("Empty SSN");
     }
     ssn = new SocSecNum(value);
 }
Example #4
0
 public void testToString()
 {
     SocSecNum theSSN = new SocSecNum("123456789");
     Assert.AreEqual("123456789", theSSN.ToString(), "Expected 123456789");
 }
Example #5
0
 public void testSocSecNumStringHyphen5()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("123-45-678a");
 }
Example #6
0
 public void testSocSecNumStringHyphen3()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("12a-45-6789");
 }
Example #7
0
 public void testSocSecNumStringAlpha()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("abcdefghi");
 }
Example #8
0
 public void testSocSecNum()
 {
     SocSecNum theSSN = new SocSecNum();
     Assert.IsNull(theSSN.AreaNumber);
     Assert.IsNull(theSSN.GroupNumber);
     Assert.IsNull(theSSN.SerialNumber);
 }
Example #9
0
 public void testIsValidSerialNumber6()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "";
 }
Example #10
0
 public void testIsValidSerialNumber1()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "1234";
     Assert.IsTrue(theSSN.IsValidSerialNumber, "Expected 1234 to be valid");
 }
Example #11
0
 public void testAreaNumber819()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "819";
 }
Example #12
0
 public void testIsValidGroupNumber6()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.GroupNumber = "";
 }
Example #13
0
 public void testIsValidGroupNumber1()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.GroupNumber = "12";
     Assert.IsTrue(theSSN.IsValidGroupNumber, "Expected 12 to be valid");
 }
Example #14
0
 public void testIsValidAreaNumber8()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "";
 }
Example #15
0
 public void testIsValidAreaNumber1()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "123";
     Assert.IsTrue(theSSN.IsValidAreaNumber, "Expected 123 to be valid");
 }
Example #16
0
 public void testSocialSecurityNumberInvalidNoDashesPamphlet()
 {
     SocSecNum theSSN = new SocSecNum("219099999");
     Assert.IsFalse(theSSN.IsValid, "For social security number 219099999, expected IsValid to hold false");
 }
Example #17
0
 public void testSocialSecurityNumberInvalidNoDashesWoolworth()
 {
     SocSecNum theSSN = new SocSecNum("078051120");
     Assert.IsFalse(theSSN.IsValid, "For social security number 078051120, expected IsValid to hold false");
 }
Example #18
0
 public void testAreaNumberSet()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "123";
     Assert.AreEqual("123", theSSN.AreaNumber, "Expected AreaNumber to be 123");
 }
Example #19
0
 public void testAreaNumberSetExArgument()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "abc";
 }
Example #20
0
 public void TestPseudoSSNInvalidSSN()
 {
     /// the 666 should invalidate the SSN, not the P
     SocSecNum testSsn = new SocSecNum("666456789p");
     Assert.IsFalse(testSsn.IsValid, "Should be an invalid SSN, even with the P stripped");
 }
Example #21
0
 public void testSocSecNumStringHyphen2()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("12-345-6789");
     Assert.AreEqual("123", theSSN.AreaNumber, "Expected dashed area # to be 123");
     Assert.AreEqual("45", theSSN.GroupNumber, "Expected dashed group # to be 45");
     Assert.AreEqual("6789", theSSN.SerialNumber, "Expected dashed serial # to be 6789");
 }
Example #22
0
 public void TestPseudoSSNValidSSN()
 {
     SocSecNum testSsn = new SocSecNum("123456789p");
     Assert.AreEqual("123", testSsn.AreaNumber, "Expected dashed area # to be 123");
     Assert.AreEqual("45", testSsn.GroupNumber, "Expected dashed group # to be 45");
     Assert.AreEqual("6789", testSsn.SerialNumber, "Expected dashed serial # to be 6789");
 }
Example #23
0
 public void testSocSecNumStringHyphen4()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("123-4a-6789");
 }
Example #24
0
 public void testSensitiveSsn()
 {
     SocSecNum theSSN = new SocSecNum("*SENSITIVE*");
     Assert.IsTrue(theSSN.Sensitive);
     Assert.IsTrue(theSSN.SensitivityString == theSSN.ToString());
 }
Example #25
0
 public void testToHyphenatedString()
 {
     SocSecNum theSSN = new SocSecNum("123456789");
     Assert.AreEqual("123-45-6789", theSSN.toHyphenatedString(), "Expected 123-45-6789");
 }
Example #26
0
 public void testSensitivityConstructor()
 {
     SocSecNum theSSN = new SocSecNum(true);
     Assert.IsTrue(theSSN.Sensitive);
     Assert.IsTrue(theSSN.SensitivityString == theSSN.ToString());
 }
Example #27
0
 public void testGroupNumberSet()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.GroupNumber = "45";
     Assert.AreEqual("45", theSSN.GroupNumber, "Expected GroupNumber to be 45");
 }
Example #28
0
 public void testSerialNumberSet()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "6789";
     Assert.AreEqual("6789", theSSN.SerialNumber, "Expected SerialNumber to be 6789");
 }
Example #29
0
 public void testSerialNumberSetExArgument()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "abcd";
 }
Example #30
0
 public void testIsValid5()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "123"; theSSN.GroupNumber = "45"; theSSN.SerialNumber = "67890";
 }