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 2014/05/13 01:36:11 UTC

git commit: ISIS-421: fixing odd hamcrest compile error

Repository: isis
Updated Branches:
  refs/heads/master ed5254864 -> fa6f105a3


ISIS-421: fixing odd hamcrest compile error

odd because not throwing compile exception for me (nor on a vanilla Unix VM), but is for Oscar and David.

Anyway, the call to build() was missing and should've been there, and probably is the culprit.


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

Branch: refs/heads/master
Commit: fa6f105a372ebc2607ac1f01d95cbda2f8554a1f
Parents: ed52548
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Tue May 13 00:15:53 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Tue May 13 00:15:53 2014 +0100

----------------------------------------------------------------------
 .../oid/collection/Get_thenRepresentation_ok.java  | 15 ++++++++++-----
 .../oid/property/Get_thenRepresentation_ok.java    | 17 +++++++++++------
 2 files changed, 21 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/isis/blob/fa6f105a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
index 4fcf756..6f155ee 100644
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
@@ -72,7 +72,8 @@ public class Get_thenRepresentation_ok {
         assertThat(selfLink, isLink(client)
                                 .httpMethod(RestfulHttpMethod.GET)
                                 .href(endsWith("/objects/BSRL/64/collections/visibleAndEditableCollection"))
-                                .returning(HttpStatusCode.OK));
+                                .returning(HttpStatusCode.OK)
+                                .build());
 
         // up link
         final LinkRepresentation upLink = collectionRepr.getLinkWithRel(Rel.UP);
@@ -81,14 +82,16 @@ public class Get_thenRepresentation_ok {
                                 .href(endsWith("http://localhost:39393/objects/BSRL/64"))
                                 .returning(HttpStatusCode.OK)
                                 .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
-                                .title("Untitled Bus Rules Entity"));
+                                .title("Untitled Bus Rules Entity")
+                                .build());
 
         //addto link
         final LinkRepresentation addtoLink = collectionRepr.getLinkWithRel(Rel.ADD_TO);
         assertThat(addtoLink, isLink(client)
                                 .httpMethod(RestfulHttpMethod.POST)
                                 .type(RepresentationType.OBJECT_COLLECTION.getMediaType())
-                                .href(endsWith("/objects/BSRL/64/collections/visibleAndEditableCollection")));
+                                .href(endsWith("/objects/BSRL/64/collections/visibleAndEditableCollection"))
+                                .build());
 
         assertThat(addtoLink.getArguments(), is(not(nullValue())));
         assertThat(addtoLink.getArguments().isArray(), is(false));
@@ -99,7 +102,8 @@ public class Get_thenRepresentation_ok {
         assertThat(removeFromLink, isLink(client)
                                 .httpMethod(RestfulHttpMethod.DELETE)
                                 .type(RepresentationType.OBJECT_COLLECTION.getMediaType())
-                                .href(endsWith("/objects/BSRL/64/collections/visibleAndEditableCollection")));
+                                .href(endsWith("/objects/BSRL/64/collections/visibleAndEditableCollection"))
+                                .build());
 
         assertThat(removeFromLink.getArguments(), is(not(nullValue())));
         assertThat(removeFromLink.getArguments().isArray(), is(false));
@@ -109,7 +113,8 @@ public class Get_thenRepresentation_ok {
         final LinkRepresentation describedByLink = collectionRepr.getLinkWithRel(Rel.DESCRIBEDBY);
         assertThat(describedByLink, isLink(client)
                                 .returning(HttpStatusCode.OK)
-                                .responseEntityWithSelfHref(describedByLink.getHref()));
+                                .responseEntityWithSelfHref(describedByLink.getHref())
+                                .build());
 
         assertThat(collectionRepr.getArray("value").isArray(),is(true));
 

http://git-wip-us.apache.org/repos/asf/isis/blob/fa6f105a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
index 1583409..8505a69 100644
--- a/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
+++ b/component/viewer/restfulobjects/tck/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
@@ -74,7 +74,8 @@ public class Get_thenRepresentation_ok {
         assertThat(selfLink, isLink(client)
                                 .httpMethod(RestfulHttpMethod.GET)
                                 .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/58/properties/anInt"))
-                                .returning(HttpStatusCode.OK));
+                                .returning(HttpStatusCode.OK)
+                                .build());
 
         // up link
         final LinkRepresentation upLink = propertyRepr.getLinkWithRel(Rel.UP);
@@ -83,14 +84,16 @@ public class Get_thenRepresentation_ok {
                                 .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/58"))
                                 .returning(HttpStatusCode.OK)
                                 .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
-                                .title("default-name"));
+                                .title("default-name")
+                                .build());
 
         //modify link
         final LinkRepresentation modifyLink = propertyRepr.getLinkWithRel(Rel.MODIFY);
         assertThat(modifyLink, isLink(client)
                                 .httpMethod(RestfulHttpMethod.PUT)
                                 .type(RepresentationType.OBJECT_PROPERTY.getMediaType())
-                                .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/58/properties/anInt")));
+                                .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/58/properties/anInt"))
+                                .build());
 
         assertThat(modifyLink.getArguments(), is(not(nullValue())));
         assertThat(modifyLink.getArguments().isArray(), is(false));
@@ -101,13 +104,15 @@ public class Get_thenRepresentation_ok {
         assertThat(clearLink, isLink(client)
                                 .httpMethod(RestfulHttpMethod.DELETE)
                                 .type(RepresentationType.OBJECT_PROPERTY.getMediaType())
-                                .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/58/properties/anInt")));
+                                .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/58/properties/anInt"))
+                                .build());
 
-     // described by link
+        // described by link
         final LinkRepresentation describedByLink = propertyRepr.getLinkWithRel(Rel.DESCRIBEDBY);
         assertThat(describedByLink, isLink(client)
                                 .returning(HttpStatusCode.OK)
-                                .responseEntityWithSelfHref(describedByLink.getHref()));
+                                .responseEntityWithSelfHref(describedByLink.getHref())
+                                .build());
 
         assertThat(propertyRepr.getInt("value"), is(42));
         assertThat(propertyRepr.getString("format"),is("int"));