|
@@ -8,10 +8,12 @@ package scot.carricksoftware.grants.commands.census;
|
|
|
|
|
|
import org.junit.jupiter.api.BeforeEach;
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
+import scot.carricksoftware.grants.enums.censusentry.CensusEntryCondition;
|
|
|
import scot.carricksoftware.grants.enums.censusentry.CensusEntryRelationship;
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
import static org.junit.jupiter.api.Assertions.assertNull;
|
|
|
+import static scot.carricksoftware.grants.GenerateCensusEntryConditionRandomValue.GetRandomCensusEntryCondition;
|
|
|
import static scot.carricksoftware.grants.GenerateCensusEntryRelationshipRandomValue.GetRandomCensusEntryRelationship;
|
|
|
|
|
|
class CensusEntryCommandEnumTest {
|
|
@@ -29,10 +31,24 @@ class CensusEntryCommandEnumTest {
|
|
|
}
|
|
|
|
|
|
@Test
|
|
|
- void setNameTest() {
|
|
|
+ void setRelationshipTest() {
|
|
|
CensusEntryRelationship relationship = GetRandomCensusEntryRelationship();
|
|
|
command.setRelationship(relationship);
|
|
|
assertEquals(relationship, command.getRelationship());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void getConditionTest() {
|
|
|
+ assertNull(command.getCondition());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ void setConditionTest() {
|
|
|
+ CensusEntryCondition condition = GetRandomCensusEntryCondition();
|
|
|
+ command.setCondition(condition);
|
|
|
+ assertEquals(condition, command.getCondition());
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
}
|