mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-24 07:14:55 +00:00
No effective change - sys out for CI server - add ReadAuditQueryPlan equals/hashCode for CI issue
This commit is contained in:
1 parent
1d6e480402
commit
90a794fca5
3 files changed
+42
-1
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package com.avaje.ebean.event.readaudit;
|
||||
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotEquals;
|
||||
|
||||
public class ReadAuditQueryPlanTest {
|
||||
|
||||
@Test
|
||||
public void testEquals() {
|
||||
|
||||
ReadAuditQueryPlan plan1 = new ReadAuditQueryPlan("org.Bean", "queryKey", "select id from foo");
|
||||
|
||||
assertEquals(plan1, new ReadAuditQueryPlan("org.Bean", "queryKey", "select id from foo"));
|
||||
assertNotEquals(plan1, new ReadAuditQueryPlan("org.Bean", "queryKey", "select id from Notfoo"));
|
||||
assertNotEquals(plan1, new ReadAuditQueryPlan("org.Bean", "notQueryKey", "select id from foo"));
|
||||
assertNotEquals(plan1, new ReadAuditQueryPlan("org.NotBean", "queryKey", "select id from foo"));
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,7 @@ import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
@@ -358,7 +359,7 @@ public class TestReadAudit extends BaseTestCase {
|
||||
|
||||
class TDReadAuditLogger implements ReadAuditLogger {
|
||||
|
||||
List<ReadAuditQueryPlan> plans = new ArrayList<ReadAuditQueryPlan>();
|
||||
Set<ReadAuditQueryPlan> plans = new HashSet<ReadAuditQueryPlan>();
|
||||
List<ReadEvent> beans = new ArrayList<ReadEvent>();
|
||||
List<ReadEvent> many = new ArrayList<ReadEvent>();
|
||||
|
||||
|
||||
Reference in new issue
Block a user