|
@@ -13,6 +13,7 @@ import scot.carricksoftware.grants.commands.certificates.birthcertificates.Birth
|
|
|
import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
|
|
import scot.carricksoftware.grants.domains.certificates.BirthCertificate;
|
|
|
import scot.carricksoftware.grants.domains.people.Person;
|
|
import scot.carricksoftware.grants.domains.people.Person;
|
|
|
import scot.carricksoftware.grants.domains.places.Organisation;
|
|
import scot.carricksoftware.grants.domains.places.Organisation;
|
|
|
|
|
+import scot.carricksoftware.grants.domains.places.Place;
|
|
|
import scot.carricksoftware.grants.enums.general.Sex;
|
|
import scot.carricksoftware.grants.enums.general.Sex;
|
|
|
import scot.carricksoftware.grants.enums.certificates.CertificateType;
|
|
import scot.carricksoftware.grants.enums.certificates.CertificateType;
|
|
|
|
|
|
|
@@ -21,6 +22,7 @@ import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRan
|
|
|
import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
|
|
import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
|
|
|
import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
|
|
import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
|
|
|
import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomOrganisation;
|
|
import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomOrganisation;
|
|
|
|
|
+import static scot.carricksoftware.grants.GenerateRandomPlaceValues.GetRandomPlace;
|
|
|
|
|
|
|
|
class BirthCertificateCommandConverterTest {
|
|
class BirthCertificateCommandConverterTest {
|
|
|
|
|
|
|
@@ -33,7 +35,9 @@ class BirthCertificateCommandConverterTest {
|
|
|
|
|
|
|
|
@Test
|
|
@Test
|
|
|
void convertTest() {
|
|
void convertTest() {
|
|
|
|
|
+ String untrackedWhereBorn = GetRandomString();
|
|
|
Long id = GetRandomLong();
|
|
Long id = GetRandomLong();
|
|
|
|
|
+ Place whereBorn = GetRandomPlace();
|
|
|
Person person = GetRandomPerson();
|
|
Person person = GetRandomPerson();
|
|
|
BirthCertificateCommand source = new BirthCertificateCommandImpl();
|
|
BirthCertificateCommand source = new BirthCertificateCommandImpl();
|
|
|
Organisation issuedAt = GetRandomOrganisation();
|
|
Organisation issuedAt = GetRandomOrganisation();
|
|
@@ -45,7 +49,6 @@ class BirthCertificateCommandConverterTest {
|
|
|
String number = GetRandomString();
|
|
String number = GetRandomString();
|
|
|
Sex sex = Sex.MALE;
|
|
Sex sex = Sex.MALE;
|
|
|
String whenBorn = GetRandomString();
|
|
String whenBorn = GetRandomString();
|
|
|
- String whereBorn = GetRandomString();
|
|
|
|
|
Person father = GetRandomPerson();
|
|
Person father = GetRandomPerson();
|
|
|
Person mother = GetRandomPerson();
|
|
Person mother = GetRandomPerson();
|
|
|
String dateAndPlaceOfMarriage = GetRandomString();
|
|
String dateAndPlaceOfMarriage = GetRandomString();
|
|
@@ -64,7 +67,8 @@ class BirthCertificateCommandConverterTest {
|
|
|
source.setRegistrationAuthority(registrationAuthority);
|
|
source.setRegistrationAuthority(registrationAuthority);
|
|
|
source.setSex(sex);
|
|
source.setSex(sex);
|
|
|
source.setWhenBorn(whenBorn);
|
|
source.setWhenBorn(whenBorn);
|
|
|
- source.setUntrackedWhereBorn(whereBorn);
|
|
|
|
|
|
|
+ source.setWhereBorn(whereBorn);
|
|
|
|
|
+ source.setUntrackedWhereBorn(untrackedWhereBorn);
|
|
|
source.setFather(father);
|
|
source.setFather(father);
|
|
|
source.setMother(mother);
|
|
source.setMother(mother);
|
|
|
source.setDateAndPlaceOfMarriage(dateAndPlaceOfMarriage);
|
|
source.setDateAndPlaceOfMarriage(dateAndPlaceOfMarriage);
|
|
@@ -85,7 +89,8 @@ class BirthCertificateCommandConverterTest {
|
|
|
assertEquals(number, target.getNumber());
|
|
assertEquals(number, target.getNumber());
|
|
|
assertEquals(registrationAuthority, target.getRegistrationAuthority());
|
|
assertEquals(registrationAuthority, target.getRegistrationAuthority());
|
|
|
assertEquals(sex, target.getSex());
|
|
assertEquals(sex, target.getSex());
|
|
|
- assertEquals(whereBorn, target.getUntrackedWhereBorn());
|
|
|
|
|
|
|
+ assertEquals(whereBorn, target.getWhereBorn());
|
|
|
|
|
+ assertEquals(untrackedWhereBorn, target.getUntrackedWhereBorn());
|
|
|
assertEquals(whenBorn, target.getWhenBorn());
|
|
assertEquals(whenBorn, target.getWhenBorn());
|
|
|
assertEquals(dateAndPlaceOfMarriage, target.getDateAndPlaceOfMarriage());
|
|
assertEquals(dateAndPlaceOfMarriage, target.getDateAndPlaceOfMarriage());
|
|
|
assertEquals(fatherRank, target.getFatherRank());
|
|
assertEquals(fatherRank, target.getFatherRank());
|