Browse Source

ValidateNotSamePersonTest (2)

Andrew Grant 3 months ago
parent
commit
eb119988d5

+ 5 - 2
src/test/java/scot/carricksoftware/grants/validators/helpers/ValidateNotSamePersonTest.java

@@ -38,8 +38,11 @@ class ValidateNotSamePersonTest {
     void setUp() {
         validateTwoFieldTypes = new ValidateTwoFieldTypesImpl();
         message = "message";
-        firstPerson = GetRandomPerson();
-        secondPerson = GetRandomPerson();
+        do {
+            firstPerson = GetRandomPerson();
+            secondPerson = GetRandomPerson();
+        } while (firstPerson == secondPerson);
+        secondPerson.setFirstName("blogs");
         firstPersonFieldName = GetRandomString();
         secondPersonFieldName = GetRandomString();
     }