Improve the error message to mention the full type for better diagnosis

Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/bc85e41c
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/bc85e41c
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/bc85e41c

Branch: refs/heads/master
Commit: bc85e41c1bdc7c6fc2d736433642d87f8954f683
Parents: e409c1d
Author: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
Authored: Sat Oct 15 21:43:47 2016 +0200
Committer: Martin Tzvetanov Grigorov <mgrigo...@apache.org>
Committed: Sat Oct 15 21:44:40 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/wicket/util/tester/BaseWicketTester.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/bc85e41c/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
----------------------------------------------------------------------
diff --git 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
index cca28e6..ad629e3 100644
--- 
a/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
+++ 
b/wicket-core/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java
@@ -1607,8 +1607,8 @@ public class BaseWicketTester
        {
                Component component = assertExists(path);
 
-               return isTrue("component '" + 
Classes.simpleName(component.getClass()) + "' is not type:" +
-                       Classes.simpleName(expectedComponentClass),
+               return isTrue("component '" + 
Classes.name(component.getClass()) + "' is not of type: " +
+                       Classes.name(expectedComponentClass),
                        
expectedComponentClass.isAssignableFrom(component.getClass()));
        }
 

Reply via email to