From d6967afcbc87836464b39b22b2d424a336403952 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Fri, 30 Sep 2016 10:54:28 +0300 Subject: Fix parameterized runner to be compatible with TestBench 4.1 Change-Id: I288ad11ad26cedd4495d472ba23276b6bf25ccdf --- .../java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'uitest-common') diff --git a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java index 25261584d2..20107f8058 100644 --- a/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java +++ b/uitest-common/src/main/java/com/vaadin/tests/tb3/ParameterizedTB3Runner.java @@ -22,6 +22,7 @@ import java.util.Collection; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import org.junit.runners.Parameterized.Parameters; import org.junit.runners.model.FrameworkMethod; @@ -162,5 +163,19 @@ public class ParameterizedTB3Runner extends TB3Runner { return parent.getName() + "[" + value + "]"; }; + @Override + public boolean equals(Object obj) { + if (!TBMethodWithBefore.class.isInstance(obj)) { + return false; + } + + TBMethodWithBefore otherTbMethod = (TBMethodWithBefore) obj; + + return super.equals(obj) + && Objects.equals(otherTbMethod.parent, parent) + && Objects.equals(otherTbMethod.setter, setter) + && Objects.equals(otherTbMethod.value, value); + } + } } -- cgit v1.2.3