|
|
3dfed3 |
From 02df4868e1614b9fd224e40c1556b78eeb01cd3d Mon Sep 17 00:00:00 2001
|
|
|
3dfed3 |
From: Michael Simacek <msimacek@redhat.com>
|
|
|
3dfed3 |
Date: Wed, 4 Dec 2013 16:52:24 +0100
|
|
|
3dfed3 |
Subject: [PATCH] mockito matcher
|
|
|
3dfed3 |
|
|
|
3dfed3 |
Signed-off-by: Michael Simacek <msimacek@redhat.com>
|
|
|
3dfed3 |
---
|
|
|
3dfed3 |
src/org/mockito/internal/matchers/LocalizedMatcher.java | 8 +++++++-
|
|
|
3dfed3 |
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
|
3dfed3 |
|
|
|
3dfed3 |
diff --git a/src/org/mockito/internal/matchers/LocalizedMatcher.java b/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
|
|
3dfed3 |
index d6dda04..9dffe06 100644
|
|
|
3dfed3 |
--- a/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
|
|
3dfed3 |
+++ b/src/org/mockito/internal/matchers/LocalizedMatcher.java
|
|
|
3dfed3 |
@@ -22,6 +22,12 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
|
|
|
3dfed3 |
this.location = new LocationImpl();
|
|
|
3dfed3 |
}
|
|
|
3dfed3 |
|
|
|
3dfed3 |
+ /* This is a hack for Fedora. Bug has been filed here:
|
|
|
3dfed3 |
+ * https://code.google.com/p/mockito/issues/detail?id=428 */
|
|
|
3dfed3 |
+ public void describeMismatch(Object item, Description mismatchDescription) {
|
|
|
3dfed3 |
+ mismatchDescription.appendText("was ").appendValue(item);
|
|
|
3dfed3 |
+ }
|
|
|
3dfed3 |
+
|
|
|
3dfed3 |
public void _dont_implement_Matcher___instead_extend_BaseMatcher_() {
|
|
|
3dfed3 |
// yeah right
|
|
|
3dfed3 |
}
|
|
|
3dfed3 |
@@ -37,7 +43,7 @@ public class LocalizedMatcher implements Matcher, ContainsExtraTypeInformation,
|
|
|
3dfed3 |
public Location getLocation() {
|
|
|
3dfed3 |
return location;
|
|
|
3dfed3 |
}
|
|
|
3dfed3 |
-
|
|
|
3dfed3 |
+
|
|
|
3dfed3 |
@Override
|
|
|
3dfed3 |
public String toString() {
|
|
|
3dfed3 |
return "Localized: " + this.actualMatcher;
|
|
|
3dfed3 |
--
|
|
|
3dfed3 |
1.8.3.1
|
|
|
3dfed3 |
|