You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2013/11/17 11:09:20 UTC

[3/3] git commit: ISIS-587: fixing integ test for example quickstart app

ISIS-587: fixing integ test for example quickstart app


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

Branch: refs/heads/master
Commit: 62c91ddaed9ff26d9baab749a54f61a95ec6f650
Parents: 0d8076d
Author: Dan Haywood <da...@apache.org>
Authored: Sun Nov 17 10:07:45 2013 +0000
Committer: Dan Haywood <da...@apache.org>
Committed: Sun Nov 17 10:07:45 2013 +0000

----------------------------------------------------------------------
 .../tests/props/ToDoItemTest_description.java         | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/62c91dda/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItemTest_description.java
----------------------------------------------------------------------
diff --git a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItemTest_description.java b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItemTest_description.java
index 0411a90..5dadac7 100644
--- a/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItemTest_description.java
+++ b/example/application/quickstart_wicket_restful_jdo/integtests/src/test/java/integration/tests/props/ToDoItemTest_description.java
@@ -77,15 +77,23 @@ public class ToDoItemTest_description extends ToDoIntegTest {
     public void onlyJustShortEnough() throws Exception {
         
         // when, then
-        toDoItem.setDescription("123456789012345678901234567890");
+        toDoItem.setDescription(characters(100));
     }
 
     @Test
     public void tooLong() throws Exception {
         
         // when, then
-        expectedExceptions.expectMessage("The value proposed exceeds the maximum length of 30");
-        toDoItem.setDescription("1234567890123456789012345678901");
+        expectedExceptions.expectMessage("The value proposed exceeds the maximum length of 100");
+        toDoItem.setDescription(characters(101));
+    }
+    
+    private static String characters(final int n) {
+        StringBuffer buf = new StringBuffer();
+        for(int i=0; i<n; i++) {
+            buf.append("a");
+        }
+        return buf.toString();
     }
 
 }
\ No newline at end of file