Contributions by Matt Schmidt (vhaindschmim0) and Robert Ruff (vhawpbruffr)
Esempio n. 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);
 }
Esempio n. 2
0
 public void testIsValidAlpha()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "abc"; theSSN.GroupNumber = "de"; theSSN.SerialNumber = "fghi";
 }
Esempio n. 3
0
 public void setSSN(String value)
 {
     if (StringUtils.isEmpty(value))
     {
         throw new ArgumentNullException("Empty SSN");
     }
     ssn = new SocSecNum(value);
 }
Esempio n. 4
0
 public void testToString()
 {
     SocSecNum theSSN = new SocSecNum("123456789");
     Assert.AreEqual("123456789", theSSN.ToString(), "Expected 123456789");
 }
Esempio n. 5
0
 public void testSocSecNumStringHyphen5()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("123-45-678a");
 }
Esempio n. 6
0
 public void testSocSecNumStringHyphen3()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("12a-45-6789");
 }
Esempio n. 7
0
 public void testSocSecNumStringAlpha()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("abcdefghi");
 }
Esempio n. 8
0
 public void testSocSecNum()
 {
     SocSecNum theSSN = new SocSecNum();
     Assert.IsNull(theSSN.AreaNumber);
     Assert.IsNull(theSSN.GroupNumber);
     Assert.IsNull(theSSN.SerialNumber);
 }
Esempio n. 9
0
 public void testIsValidSerialNumber6()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "";
 }
Esempio n. 10
0
 public void testIsValidSerialNumber1()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "1234";
     Assert.IsTrue(theSSN.IsValidSerialNumber, "Expected 1234 to be valid");
 }
Esempio n. 11
0
 public void testAreaNumber819()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "819";
 }
Esempio n. 12
0
 public void testIsValidGroupNumber6()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.GroupNumber = "";
 }
Esempio n. 13
0
 public void testIsValidGroupNumber1()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.GroupNumber = "12";
     Assert.IsTrue(theSSN.IsValidGroupNumber, "Expected 12 to be valid");
 }
Esempio n. 14
0
 public void testIsValidAreaNumber8()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "";
 }
Esempio n. 15
0
 public void testIsValidAreaNumber1()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "123";
     Assert.IsTrue(theSSN.IsValidAreaNumber, "Expected 123 to be valid");
 }
Esempio n. 16
0
 public void testSocialSecurityNumberInvalidNoDashesPamphlet()
 {
     SocSecNum theSSN = new SocSecNum("219099999");
     Assert.IsFalse(theSSN.IsValid, "For social security number 219099999, expected IsValid to hold false");
 }
Esempio n. 17
0
 public void testSocialSecurityNumberInvalidNoDashesWoolworth()
 {
     SocSecNum theSSN = new SocSecNum("078051120");
     Assert.IsFalse(theSSN.IsValid, "For social security number 078051120, expected IsValid to hold false");
 }
Esempio n. 18
0
 public void testAreaNumberSet()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "123";
     Assert.AreEqual("123", theSSN.AreaNumber, "Expected AreaNumber to be 123");
 }
Esempio n. 19
0
 public void testAreaNumberSetExArgument()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "abc";
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 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");
 }
Esempio n. 23
0
 public void testSocSecNumStringHyphen4()
 {
     SocSecNum theSSN;
     theSSN = new SocSecNum("123-4a-6789");
 }
Esempio n. 24
0
 public void testSensitiveSsn()
 {
     SocSecNum theSSN = new SocSecNum("*SENSITIVE*");
     Assert.IsTrue(theSSN.Sensitive);
     Assert.IsTrue(theSSN.SensitivityString == theSSN.ToString());
 }
Esempio n. 25
0
 public void testToHyphenatedString()
 {
     SocSecNum theSSN = new SocSecNum("123456789");
     Assert.AreEqual("123-45-6789", theSSN.toHyphenatedString(), "Expected 123-45-6789");
 }
Esempio n. 26
0
 public void testSensitivityConstructor()
 {
     SocSecNum theSSN = new SocSecNum(true);
     Assert.IsTrue(theSSN.Sensitive);
     Assert.IsTrue(theSSN.SensitivityString == theSSN.ToString());
 }
Esempio n. 27
0
 public void testGroupNumberSet()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.GroupNumber = "45";
     Assert.AreEqual("45", theSSN.GroupNumber, "Expected GroupNumber to be 45");
 }
Esempio n. 28
0
 public void testSerialNumberSet()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "6789";
     Assert.AreEqual("6789", theSSN.SerialNumber, "Expected SerialNumber to be 6789");
 }
Esempio n. 29
0
 public void testSerialNumberSetExArgument()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.SerialNumber = "abcd";
 }
Esempio n. 30
0
 public void testIsValid5()
 {
     SocSecNum theSSN = new SocSecNum();
     theSSN.AreaNumber = "123"; theSSN.GroupNumber = "45"; theSSN.SerialNumber = "67890";
 }