|
|
@@ -14,6 +14,7 @@ import scot.carricksoftware.grants.domains.certificates.DivorceCertificate;
|
|
|
import scot.carricksoftware.grants.domains.people.Person;
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
|
|
|
import static scot.carricksoftware.grants.GenerateRandomNumberValues.GetRandomLong;
|
|
|
import static scot.carricksoftware.grants.GenerateRandomPeopleValues.GetRandomPerson;
|
|
|
|
|
|
@@ -31,11 +32,17 @@ class DivorceCertificateCommandConverterTest {
|
|
|
Long id = GetRandomLong();
|
|
|
Person firstParty = GetRandomPerson();
|
|
|
Person secondParty = GetRandomPerson();
|
|
|
+ String firstPartyDate = GetRandomString();
|
|
|
+ String secondPartyDate = GetRandomString();
|
|
|
+ String registeredDate = GetRandomString();
|
|
|
DivorceCertificateCommand source = new DivorceCertificateCommandImpl();
|
|
|
|
|
|
source.setId(id);
|
|
|
source.setFirstParty(firstParty);
|
|
|
source.setSecondParty(secondParty);
|
|
|
+ source.setFirstPartyDate(firstPartyDate);
|
|
|
+ source.setSecondPartyDate(secondPartyDate);
|
|
|
+ source.setRegisteredDate(registeredDate);
|
|
|
|
|
|
DivorceCertificate target = converter.convert(source);
|
|
|
|
|
|
@@ -43,5 +50,8 @@ class DivorceCertificateCommandConverterTest {
|
|
|
assertEquals(id, target.getId());
|
|
|
assertEquals(firstParty, target.getFirstParty());
|
|
|
assertEquals(secondParty, target.getSecondParty());
|
|
|
+ assertEquals(firstPartyDate, target.getFirstPartyDate());
|
|
|
+ assertEquals(secondPartyDate, target.getSecondPartyDate());
|
|
|
+ assertEquals(registeredDate, target.getRegisteredDate());
|
|
|
}
|
|
|
}
|