|
@@ -14,6 +14,7 @@ import scot.carricksoftware.grants.domains.text.PersonText;
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
|
|
|
|
+import static scot.carricksoftware.grants.GenerateCertificateRandomValues.GetRandomString;
|
|
|
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;
|
|
|
|
|
|
|
@@ -30,15 +31,29 @@ class PersonTextCommandConverterTest {
|
|
|
void covertTest() {
|
|
void covertTest() {
|
|
|
Long Id = GetRandomLong();
|
|
Long Id = GetRandomLong();
|
|
|
Person person = GetRandomPerson();
|
|
Person person = GetRandomPerson();
|
|
|
|
|
+ Long order = GetRandomLong();
|
|
|
|
|
+ Long level = GetRandomLong();
|
|
|
|
|
+ String heading = GetRandomString();
|
|
|
|
|
+ String content = GetRandomString();
|
|
|
|
|
+
|
|
|
PersonTextCommand source = new PersonTextCommandImpl();
|
|
PersonTextCommand source = new PersonTextCommandImpl();
|
|
|
|
|
|
|
|
source.setId(Id);
|
|
source.setId(Id);
|
|
|
source.setPerson(person);
|
|
source.setPerson(person);
|
|
|
|
|
+ source.setOrder(order);
|
|
|
|
|
+ source.setLevel(level);
|
|
|
|
|
+ source.setHeading(heading);
|
|
|
|
|
+ source.setOrder(order);
|
|
|
|
|
+ source.setContent(content);
|
|
|
|
|
|
|
|
PersonText target = converter.convert(source);
|
|
PersonText target = converter.convert(source);
|
|
|
|
|
|
|
|
assertNotNull(target);
|
|
assertNotNull(target);
|
|
|
assertEquals(Id, target.getId());
|
|
assertEquals(Id, target.getId());
|
|
|
assertEquals(person, target.getPerson());
|
|
assertEquals(person, target.getPerson());
|
|
|
|
|
+ assertEquals(order, target.getOrder());
|
|
|
|
|
+ assertEquals(level, target.getLevel());
|
|
|
|
|
+ assertEquals(heading, target.getHeading());
|
|
|
|
|
+ assertEquals(content, target.getContent());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|