|
@@ -7,10 +7,12 @@ package scot.carricksoftware.grantswriter.domains.images;
|
|
|
|
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
import org.junit.jupiter.api.Test;
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
+import scot.carricksoftware.grantswriter.domains.people.Person;
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
|
import static scot.carricksoftware.grantswriter.GenerateRandomNumberValues.GetRandomLong;
|
|
import static scot.carricksoftware.grantswriter.GenerateRandomNumberValues.GetRandomLong;
|
|
|
|
+import static scot.carricksoftware.grantswriter.GenerateRandomPeopleValues.GetRandomPerson;
|
|
|
|
|
|
|
|
|
|
class PersonImageTest {
|
|
class PersonImageTest {
|
|
@@ -34,4 +36,16 @@ class PersonImageTest {
|
|
assertEquals(id, image.getId());
|
|
assertEquals(id, image.getId());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Test
|
|
|
|
+ public void getPersonTest() {
|
|
|
|
+ assertNull(image.getPerson());
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Test
|
|
|
|
+ public void setPersonTest() {
|
|
|
|
+ Person person = GetRandomPerson();
|
|
|
|
+ image.setPerson(person);
|
|
|
|
+ assertEquals(person, image.getPerson());
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|