This is an automated email from the ASF dual-hosted git repository.

reiern70 pushed a commit to branch wicket-9.x
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/wicket-9.x by this push:
     new d5b4392119 [NO_ISSUE] fix test
d5b4392119 is described below

commit d5b439211923472700a7932b78f85143d48f4f46
Author: reiern70 <reier...@gmail.com>
AuthorDate: Wed Nov 1 13:38:16 2023 -0500

    [NO_ISSUE] fix test
---
 .../java/org/apache/wicket/model/IModelTest.java   | 35 ++++++++++++++++++++--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/wicket-core/src/test/java/org/apache/wicket/model/IModelTest.java 
b/wicket-core/src/test/java/org/apache/wicket/model/IModelTest.java
index 4057db4817..fddbec7cfb 100644
--- a/wicket-core/src/test/java/org/apache/wicket/model/IModelTest.java
+++ b/wicket-core/src/test/java/org/apache/wicket/model/IModelTest.java
@@ -22,6 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
 import java.io.Serializable;
+import java.util.Objects;
 import org.apache.wicket.core.util.lang.WicketObjects;
 import org.apache.wicket.model.lambda.Address;
 import org.apache.wicket.model.lambda.Person;
@@ -236,16 +237,33 @@ class IModelTest
                assertEquals("Some Name", clone.getObject());
        }
 
-       interface TextMatchingStatus extends Serializable
+       interface TextMatchingStatus
        {
-               class NotSubmitted implements TextMatchingStatus {}
+               class NotSubmitted implements TextMatchingStatus {
+
+               }
                class Queued implements TextMatchingStatus {}
                class Analysed implements TextMatchingStatus {
                        int matchingInPercent;
 
+                       @Override
+                       public boolean equals(Object o) {
+                               if (this == o) return true;
+                               if (o == null || getClass() != o.getClass()) 
return false;
+                               Analysed analysed = (Analysed) o;
+                               return matchingInPercent == 
analysed.matchingInPercent;
+                       }
+
+                       @Override
+                       public int hashCode() {
+                               return Objects.hash(matchingInPercent);
+                       }
+
                        public Analysed(int matchingInPercent) {
                                this.matchingInPercent = matchingInPercent;
                        }
+
+
                }
                class Error implements TextMatchingStatus {
                        public int errorCode;
@@ -255,6 +273,19 @@ class IModelTest
                                this.errorCode = errorCode;
                                this.humanReadableMessage = 
humanReadableMessage;
                        }
+
+                       @Override
+                       public boolean equals(Object o) {
+                               if (this == o) return true;
+                               if (o == null || getClass() != o.getClass()) 
return false;
+                               Error error = (Error) o;
+                               return errorCode == error.errorCode && 
Objects.equals(humanReadableMessage, error.humanReadableMessage);
+                       }
+
+                       @Override
+                       public int hashCode() {
+                               return Objects.hash(errorCode, 
humanReadableMessage);
+                       }
                }
        }
 

Reply via email to