Skip to content

Commit

Permalink
Merge pull request #16 from hmrc/RAS-71
Browse files Browse the repository at this point in the history
RAS-71: Add valid NINOs
  • Loading branch information
joepowell96 authored Jun 22, 2017
2 parents d6b7d75 + 8318a69 commit d6f8b74
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 77 deletions.
32 changes: 16 additions & 16 deletions app/uk/gov/hmrc/rasapi/connectors/CachingConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,23 @@ trait CachingConnector {
//TODO: Update this function to call our caching service(to be created) to access the data below

uuid match {
case "2800a7ab-fe20-42ca-98d7-c33f4133cfc2" => Some(CustomerDetails("AA123456A", "Jim", "Jimson", "1989-09-29"))
case "2800a7ab-fe20-42ca-98d7-c33f4133cfc2" => Some(CustomerDetails("LE241131B", "Jim", "Jimson", "1989-09-29"))
case "633e0ee7-315b-49e6-baed-d79c3dffe467" => Some(CustomerDetails("BB123456B", "John", "Smith", "1975-05-25"))
case "77648d82-309e-484d-a310-d0ffd2997791" => Some(CustomerDetails("CC123456C", "Jane", "Doe", "1969-06-09"))
case "79f21755-8cd4-4785-9c10-13253f7a8bb6" => Some(CustomerDetails("EE123456E", "Joe", "Bloggs", "1982-02-17"))
case "2900a7ab-fe20-42ca-98d8-c33f4133cfc2" => Some(CustomerDetails("AB234567B", "Peter", "Armstrong", "1969-01-01"))
case "743e0ee7-315b-49e7-baed-d79c3dffe467" => Some(CustomerDetails("BC234567C", "Steven", "Smith", "1947-08-15"))
case "88648d82-309e-484e-a310-d0ffd2997791" => Some(CustomerDetails("CD234567D", "Simon", "Handyside", "1984-10-31"))
case "88648d82-309e-484d-a310-d0ffd2997792" => Some(CustomerDetails("EF234567F", "Linda", "Marshall", "1966-06-21"))
case "3000a7ab-fe20-42ca-98d9-c33f4133cfc2" => Some(CustomerDetails("AC345678C", "Kelly", "Thompslon", "1990-02-15"))
case "853e0ee7-315b-49e8-baed-d79c3dffe467" => Some(CustomerDetails("BD345678D", "Simon", "Handyside", "1984-10-31"))
case "99648d82-309e-484f-a310-d0ffd2997791" => Some(CustomerDetails("CE345678E", "Zack", "Jackson", "1966-04-04"))
case "99648d82-309e-484d-a310-d0ffd2997793" => Some(CustomerDetails("EF234567F", "Linda", "Marshall", "1966-06-21"))
case "3100a7ab-fe20-42ca-98d1-c33f4133cfc2" => Some(CustomerDetails("AD456789D", "Oscar", "Smith", "1986-06-14"))
case "963e0ee7-315b-49e-baed-d79c3dffe467" => Some(CustomerDetails("BE456789E", "Louise", "Oscar", "1966-04-04"))
case "11648d82-309e-484g-a310-d0ffd2997791" => Some(CustomerDetails("CF456789F", "Raj", "Patel", "1984-10-31"))
case "76648d82-309e-484d-a310-d0ffd2997794" => Some(CustomerDetails("EH456789H", "Mary", "Brown", "1982-02-17"))
case "76648d82-309e-484d-a310-d0ffd2997795" => Some(CustomerDetails("AA666888B","Ramin","Raj", "1947-08-15"))
case "77648d82-309e-484d-a310-d0ffd2997791" => Some(CustomerDetails("LR325154D", "Jane", "Doe", "1969-06-09"))
case "79f21755-8cd4-4785-9c10-13253f7a8bb6" => Some(CustomerDetails("CC123456C", "Joe", "Bloggs", "1982-02-17"))
case "2900a7ab-fe20-42ca-98d8-c33f4133cfc2" => Some(CustomerDetails("PC243122B", "Peter", "Armstrong", "1969-01-01"))
case "743e0ee7-315b-49e7-baed-d79c3dffe467" => Some(CustomerDetails("EE123456D", "Steven", "Smith", "1947-08-15"))
case "88648d82-309e-484e-a310-d0ffd2997791" => Some(CustomerDetails("ZR132134C", "Simon", "Handyside", "1984-10-31"))
case "88648d82-309e-484d-a310-d0ffd2997792" => Some(CustomerDetails("SG123456D", "Linda", "Marshall", "1966-06-21"))
case "3000a7ab-fe20-42ca-98d9-c33f4133cfc2" => Some(CustomerDetails("CK355335C", "Kelly", "Thompson", "1990-02-15"))
case "853e0ee7-315b-49e8-baed-d79c3dffe467" => Some(CustomerDetails("AR355335C", "Simon", "Handyside", "1984-10-31"))
case "99648d82-309e-484f-a310-d0ffd2997791" => Some(CustomerDetails("NW424252D", "Zack", "Jackson", "1966-04-04"))
case "99648d82-309e-484d-a310-d0ffd2997793" => Some(CustomerDetails("KA122234B", "Linda", "Marshall", "1966-06-21"))
case "3100a7ab-fe20-42ca-98d1-c33f4133cfc2" => Some(CustomerDetails("WK332122D", "Oscar", "Smith", "1986-06-14"))
case "963e0ee7-315b-49e-baed-d79c3dffe467" => Some(CustomerDetails("RW215443D", "Louise", "Oscar", "1966-04-04"))
case "11648d82-309e-484g-a310-d0ffd2997791" => Some(CustomerDetails("SE235112A", "Raj", "Patel", "1984-10-31"))
case "76648d82-309e-484d-a310-d0ffd2997794" => Some(CustomerDetails("AE325433D", "Mary", "Brown", "1982-02-17"))
case "76648d82-309e-484d-a310-d0ffd2997795" => Some(CustomerDetails("SG325433C", "Mary", "Poppins", "1952-02-17"))
case _ => None
}
}
Expand Down
30 changes: 15 additions & 15 deletions app/uk/gov/hmrc/rasapi/connectors/DesConnector.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,22 @@ trait DESConnector {
//TODO: Update this function to call ras-stubs to access the data below

customerDetails match {
case CustomerDetails("AA123456A", "Jim", "Jimson", "1989-09-29") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("LE241131B", "Jim", "Jimson", "1989-09-29") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("BB123456B", "John", "Smith", "1975-05-25") => Some(ResidencyStatus("otherUKResident","scotResident"))
case CustomerDetails("CC123456C", "Jane", "Doe", "1969-06-09") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("EE123456E", "Joe", "Bloggs", "1982-02-17") => Some(ResidencyStatus("scotResident","scotResident"))
case CustomerDetails("AB234567B", "Peter", "Armstrong", "1969-01-01") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("BC234567C", "Steven", "Smith", "1947-08-15") => Some(ResidencyStatus("otherUKResident","scotResident"))
case CustomerDetails("CD234567D", "Simon", "Handyside", "1984-10-31") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("EF234567F", "Linda", "Marshall", "1966-06-21") => Some(ResidencyStatus("scotResident","scotResident"))
case CustomerDetails("AC345678C", "Kelly", "Thompson", "1990-02-15") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("BD345678D", "Simon", "Handyside", "1984-10-31") => Some(ResidencyStatus("otherUKResident","scotResident"))
case CustomerDetails("CE345678E", "Zack", "Jackson", "1966-04-04") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("EG345678G", "Linda", "Marshall", "1966-06-21") => Some(ResidencyStatus("scotResident","scotResident"))
case CustomerDetails("AD456789D", "Oscar", "Smith", "1986-06-14") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("BE456789E", "Louise", "Oscar", "1966-04-04") => Some(ResidencyStatus("otherUKResident","scotResident"))
case CustomerDetails("CF456789F", "Raj", "Patel", "1984-10-31") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("EH456789H", "Mary", "Brown", "1982-02-17") => Some(ResidencyStatus("scotResident","scotResident"))
case CustomerDetails("LR325154D", "Jane", "Doe", "1969-06-09") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("CC123456C", "Joe", "Bloggs", "1982-02-17") => Some(ResidencyStatus("scotResident","scotResident"))
case CustomerDetails("PC243122B", "Peter", "Armstrong", "1969-01-01") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("EE123456D", "Steven", "Smith", "1947-08-15") => Some(ResidencyStatus("otherUKResident","scotResident"))
case CustomerDetails("ZR132134C", "Simon", "Handyside", "1984-10-31") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("SG123456D", "Linda", "Marshall", "1966-06-21") => Some(ResidencyStatus("scotResident","scotResident"))
case CustomerDetails("CK355335C", "Kelly", "Thompson", "1990-02-15") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("AR355335C", "Simon", "Handyside", "1984-10-31") => Some(ResidencyStatus("otherUKResident","scotResident"))
case CustomerDetails("NW424252D", "Zack", "Jackson", "1966-04-04") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("KA122234B", "Linda", "Marshall", "1966-06-21") => Some(ResidencyStatus("scotResident","scotResident"))
case CustomerDetails("WK332122D", "Oscar", "Smith", "1986-06-14") => Some(ResidencyStatus("otherUKResident","otherUKResident"))
case CustomerDetails("RW215443D", "Louise", "Oscar", "1966-04-04") => Some(ResidencyStatus("otherUKResident","scotResident"))
case CustomerDetails("SE235112A", "Raj", "Patel", "1984-10-31") => Some(ResidencyStatus("scotResident","otherUKResident"))
case CustomerDetails("AE325433D", "Mary", "Brown", "1982-02-17") => Some(ResidencyStatus("scotResident","scotResident"))
case _ => None
}
}
Expand Down
32 changes: 16 additions & 16 deletions test/uk/gov/hmrc/rasapi/connectors/CachingConnectorSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CachingConnectorSpec extends WordSpec with MockitoSugar with ShouldMatcher

"a valid uuid (2800a7ab-fe20-42ca-98d7-c33f4133cfc2) is found" in {
val result = SUT.getCachedData("2800a7ab-fe20-42ca-98d7-c33f4133cfc2")
result shouldBe Some(CustomerDetails("AA123456A", "Jim", "Jimson", "1989-09-29"))
result shouldBe Some(CustomerDetails("LE241131B", "Jim", "Jimson", "1989-09-29"))
}

"a valid uuid (633e0ee7-315b-49e6-baed-d79c3dffe467) is found" in {
Expand All @@ -41,77 +41,77 @@ class CachingConnectorSpec extends WordSpec with MockitoSugar with ShouldMatcher

"a valid uuid (77648d82-309e-484d-a310-d0ffd2997791) is found" in {
val result = SUT.getCachedData("77648d82-309e-484d-a310-d0ffd2997791")
result shouldBe Some(CustomerDetails("CC123456C", "Jane", "Doe", "1969-06-09"))
result shouldBe Some(CustomerDetails("LR325154D", "Jane", "Doe", "1969-06-09"))
}

"a valid uuid (79f21755-8cd4-4785-9c10-13253f7a8bb6) is found" in {
val result = SUT.getCachedData("79f21755-8cd4-4785-9c10-13253f7a8bb6")
result shouldBe Some(CustomerDetails("EE123456E", "Joe", "Bloggs", "1982-02-17"))
result shouldBe Some(CustomerDetails("CC123456C", "Joe", "Bloggs", "1982-02-17"))
}

"a valid uuid (2900a7ab-fe20-42ca-98d8-c33f4133cfc2) is found" in {
val result = SUT.getCachedData("2900a7ab-fe20-42ca-98d8-c33f4133cfc2")
result shouldBe Some(CustomerDetails("AB234567B", "Peter", "Armstrong", "1969-01-01"))
result shouldBe Some(CustomerDetails("PC243122B", "Peter", "Armstrong", "1969-01-01"))
}

"a valid uuid (743e0ee7-315b-49e7-baed-d79c3dffe467) is found" in {
val result = SUT.getCachedData("743e0ee7-315b-49e7-baed-d79c3dffe467")
result shouldBe Some(CustomerDetails("BC234567C", "Steven", "Smith", "1947-08-15"))
result shouldBe Some(CustomerDetails("EE123456D", "Steven", "Smith", "1947-08-15"))
}

"a valid uuid (88648d82-309e-484e-a310-d0ffd2997791) is found" in {
val result = SUT.getCachedData("88648d82-309e-484e-a310-d0ffd2997791")
result shouldBe Some(CustomerDetails("CD234567D", "Simon", "Handyside", "1984-10-31"))
result shouldBe Some(CustomerDetails("ZR132134C", "Simon", "Handyside", "1984-10-31"))
}

"a valid uuid (88648d82-309e-484d-a310-d0ffd2997792) is found" in {
val result = SUT.getCachedData("88648d82-309e-484d-a310-d0ffd2997792")
result shouldBe Some(CustomerDetails("EF234567F", "Linda", "Marshall", "1966-06-21"))
result shouldBe Some(CustomerDetails("SG123456D", "Linda", "Marshall", "1966-06-21"))
}

"a valid uuid (3000a7ab-fe20-42ca-98d9-c33f4133cfc2) is found" in {
val result = SUT.getCachedData("3000a7ab-fe20-42ca-98d9-c33f4133cfc2")
result shouldBe Some(CustomerDetails("AC345678C", "Kelly", "Thompslon", "1990-02-15"))
result shouldBe Some(CustomerDetails("CK355335C", "Kelly", "Thompson", "1990-02-15"))
}

"a valid uuid (853e0ee7-315b-49e8-baed-d79c3dffe467) is found" in {
val result = SUT.getCachedData("853e0ee7-315b-49e8-baed-d79c3dffe467")
result shouldBe Some(CustomerDetails("BD345678D", "Simon", "Handyside", "1984-10-31"))
result shouldBe Some(CustomerDetails("AR355335C", "Simon", "Handyside", "1984-10-31"))
}

"a valid uuid (99648d82-309e-484f-a310-d0ffd2997791) is found" in {
val result = SUT.getCachedData("99648d82-309e-484f-a310-d0ffd2997791")
result shouldBe Some(CustomerDetails("CE345678E", "Zack", "Jackson", "1966-04-04"))
result shouldBe Some(CustomerDetails("NW424252D", "Zack", "Jackson", "1966-04-04"))
}

"a valid uuid (99648d82-309e-484d-a310-d0ffd2997793) is found" in {
val result = SUT.getCachedData("99648d82-309e-484d-a310-d0ffd2997793")
result shouldBe Some(CustomerDetails("EF234567F", "Linda", "Marshall", "1966-06-21"))
result shouldBe Some(CustomerDetails("KA122234B", "Linda", "Marshall", "1966-06-21"))
}

"a valid uuid (3100a7ab-fe20-42ca-98d1-c33f4133cfc2) is found" in {
val result = SUT.getCachedData("3100a7ab-fe20-42ca-98d1-c33f4133cfc2")
result shouldBe Some(CustomerDetails("AD456789D", "Oscar", "Smith", "1986-06-14"))
result shouldBe Some(CustomerDetails("WK332122D", "Oscar", "Smith", "1986-06-14"))
}

"a valid uuid (963e0ee7-315b-49e-baed-d79c3dffe467) is found" in {
val result = SUT.getCachedData("963e0ee7-315b-49e-baed-d79c3dffe467")
result shouldBe Some(CustomerDetails("BE456789E", "Louise", "Oscar", "1966-04-04"))
result shouldBe Some(CustomerDetails("RW215443D", "Louise", "Oscar", "1966-04-04"))
}

"a valid uuid (11648d82-309e-484g-a310-d0ffd2997791) is found" in {
val result = SUT.getCachedData("11648d82-309e-484g-a310-d0ffd2997791")
result shouldBe Some(CustomerDetails("CF456789F", "Raj", "Patel", "1984-10-31"))
result shouldBe Some(CustomerDetails("SE235112A", "Raj", "Patel", "1984-10-31"))
}

"a valid uuid (76648d82-309e-484d-a310-d0ffd2997794) is found" in {
val result = SUT.getCachedData("76648d82-309e-484d-a310-d0ffd2997794")
result shouldBe Some(CustomerDetails("EH456789H", "Mary", "Brown", "1982-02-17"))
result shouldBe Some(CustomerDetails("AE325433D", "Mary", "Brown", "1982-02-17"))
}

"a valid uuid (76648d82-309e-484d-a310-d0ffd2997795) is found" in {
val result = SUT.getCachedData("76648d82-309e-484d-a310-d0ffd2997795")
result shouldBe Some(CustomerDetails("AA666888B", "Ramin", "Raj", "1947-08-15"))
result shouldBe Some(CustomerDetails("SG325433C", "Mary", "Poppins", "1952-02-17"))
}
}

Expand Down
Loading

0 comments on commit d6f8b74

Please sign in to comment.