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 2015/07/25 11:29:19 UTC
[01/48] isis git commit: ISIS-1178: mothballing the tck tests.
Repository: isis
Updated Branches:
refs/heads/master d5e7c90be -> 93a1d5cce
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/webapp/images/banner.png
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/webapp/images/banner.png b/tck/tck-viewer-wicket/src/main/webapp/images/banner.png
deleted file mode 100644
index 3461ffc..0000000
Binary files a/tck/tck-viewer-wicket/src/main/webapp/images/banner.png and /dev/null differ
[31/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..1f9a112
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
+
+ // when
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+
+ // then
+ assertThat(actionPromptJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..dc9bbc5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..f053b03
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+public class Get_thenResponseHeaders_eTag_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java
new file mode 100644
index 0000000..236942f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+public class Get_whenDoesntExistActn_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java
new file mode 100644
index 0000000..5b3f3f8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenDoesntExistOid_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void notFound_usingTemplatedMethod() throws Exception {
+
+ // when
+ final Response resp = resource.service("nonExistentServiceId");
+ final RestfulResponse<JsonRepresentation> jsonResp = RestfulResponse.of(resp);
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..6bcce0c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ request = client.createRequest(RestfulHttpMethod.GET, "/objects/RTNE/78/actions/contains");
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<ObjectActionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<ObjectActionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
new file mode 100644
index 0000000..e20db4d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
new file mode 100644
index 0000000..f27a9f2
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+public class Get_whenRequestHeaders_Accept_isInvalid_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java
new file mode 100644
index 0000000..00a0a7c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+public class Get_whenRequestHeaders_Accept_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java
new file mode 100644
index 0000000..2917e30
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_givenObjectResource_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
+ final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to an action prompt resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java
new file mode 100644
index 0000000..fe6cf33
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_givenServiceResource_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response actionPromptResp = serviceResource.actionPrompt("ActionsEntities", "subListWithOptionalRange");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
+ final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to an action prompt resource is not allowed."));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java
new file mode 100644
index 0000000..83c086a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_givenObjectResource_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
+ final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.PUT);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to an action prompt resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java
new file mode 100644
index 0000000..73c0bd6
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_givenServiceResource_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response actionPromptResp = serviceResource.actionPrompt("ActionsEntities", "subListWithOptionalRange");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
+ final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.PUT);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to an action prompt resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java
new file mode 100644
index 0000000..1dbcecc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Delete_givenObjectAction_thenResponseCode_405_bad {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java
new file mode 100644
index 0000000..66bb000
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.*;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_givenServiceAction_thenResponseCode_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final LinkRepresentation deleteLink = invokeLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
+
+ // then
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting an action invocation resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java
new file mode 100644
index 0000000..3bd0dea
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Ignore("to write - copied from req_safe")
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given, when
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ invokeLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ // not possible to test using resourceProxy
+
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java
new file mode 100644
index 0000000..7ed8a17
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Ignore("to write - copied from req_safe")
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given, when
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ invokeLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ // not possible to test using resourceProxy
+
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java
new file mode 100644
index 0000000..3c054c5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenActionSemanticsOfSafe_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE.andParam("action", "list"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/list/invoke"))
+ .arguments(JsonRepresentation.newMap())
+ .build());
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
+
+ // then
+ then(restfulResponse);
+ }
+
+ private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
+ final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
+ assertThat(listRepr.getValue().size(), is(5));
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ then(restfulResponse);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java
new file mode 100644
index 0000000..a9e2e20
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenDisabled_thenResponseCode_203 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given, when
+ final JsonRepresentation givenAction = Util.givenAction(client, "BusinessRulesEntities", "visibleButNotInvocableAction");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ // then
+ final String disabledReason = actionRepr.getDisabledReason();
+ assertThat(disabledReason, is("Always disabled"));
+
+
+ final LinkRepresentation invokeLink = new LinkRepresentation()
+ .withRel(Rel.INVOKE)
+ .withHref("http://localhost:39393/services/BusinessRulesEntities/actions/visibleButNotInvocableAction/invoke");
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse, disabledReason);
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ Response response = serviceResource.invokeActionQueryOnly("BusinessRulesEntities", "visibleButNotInvocableAction", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse, "Always disabled");
+ }
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse, String disabledReason) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.FORBIDDEN));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is(disabledReason));
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
new file mode 100644
index 0000000..5d11870
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
new file mode 100644
index 0000000..04f61d1
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java
new file mode 100644
index 0000000..37e849b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenMandatorySimpleArg_whenArgMissing_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args = JsonRepresentation.newMap();
+ // nothing for 'from'
+ args.mapPut("to.value", 0);
+ assertThat(args.size(), is(1));
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ // nothing for 'from'
+ args.mapPut("to.value", 0);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("No argument found for (mandatory) parameter 'from'"));
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+
+ RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
+ JsonRepresentation repr = restfulResponseOfError.getEntity();
+
+ assertThat(repr.getString("x-ro-invalidReason"), is("No argument found for (mandatory) parameter 'from'"));
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java
new file mode 100644
index 0000000..9e4de16
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenMandatorySimpleArg_whenArgNullValue_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args.mapPut("from.value", (Integer)null);
+ args.mapPut("to.value", 0);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from.value", (Integer)null);
+ args.mapPut("to.value", 0);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("Validation failed, see body for details"));
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+
+ RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
+ JsonRepresentation repr = restfulResponseOfError.getEntity();
+
+ assertThat(repr.getString("from.invalidReason"), is("'from' is mandatory"));
+ // TODO: really ought to be null, but ObjectActionImpl.isProposedArgumentSetValidResultSet also checks that each argument is valid
+ assertThat(repr.getString("x-ro-invalidReason"), is("'from' is mandatory"));
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java
new file mode 100644
index 0000000..68c6ccd
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO {
+
+}
[29/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..496c6c8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java
new file mode 100644
index 0000000..3082091
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenScalarArg_whenArgMalformedMissingValueNode_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ serviceResource = client.getDomainServiceResource();
+ }
+
+
+ @Test
+ public void usingClientFollow_whenImplicitlySetToNull() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from", JsonRepresentation.newMap());
+ args.mapPut("to.value", (Integer)null);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy_whenExplicitSetToNull() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from", JsonRepresentation.newMap());
+ args.mapPut("to.value", (Integer)null);
+
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+ private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ final JsonRepresentation errorRepr = restfulResponse.wraps(JsonRepresentation.class).getEntity();
+
+ assertThat(errorRepr.getString("from.invalidReason"), is("No 'value' key"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java
new file mode 100644
index 0000000..2c21b50
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenScalarArg_whenArgSurplus_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args = JsonRepresentation.newMap();
+ args.mapPut("from.value", 0);
+ args.mapPut("to.value", 1);
+ args.mapPut("nonExistent.value", 2);
+ assertThat(args.size(), is(3));
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from.value", 0);
+ args.mapPut("to.value", 1);
+ args.mapPut("nonExistent.value", 2);
+ assertThat(args.size(), is(3));
+
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("Argument 'nonExistent' found but no such parameter"));
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+
+ RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
+ JsonRepresentation repr = restfulResponseOfError.getEntity();
+
+ assertThat(repr.getString("x-ro-invalidReason"), is("Argument 'nonExistent' found but no such parameter"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java
new file mode 100644
index 0000000..8aa0734
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenValidationRuleForAllArgs_whenArgFails_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args.mapPut("from.value", 1);
+ args.mapPut("to.value", 0);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from.value", 1);
+ args.mapPut("to.value", 0);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("Validation failed, see body for details"));
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+
+ RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
+ JsonRepresentation repr = restfulResponseOfError.getEntity();
+
+ assertThat(repr.getString("x-ro-invalidReason"), is("'from' cannot be larger than 'to'"));
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java
new file mode 100644
index 0000000..1550dc3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenValidationRuleForSingleArg_whenArgFails_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args.mapPut("from.value", -1);
+ args.mapPut("to.value", 2);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsAValidationError(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from.value", -1);
+ args.mapPut("to.value", 2);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ thenResponseIsAValidationError(restfulResponse);
+ }
+
+ private static void thenResponseIsAValidationError(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
+
+ assertThat(restfulResponse.getHeader(Header.WARNING), containsString("Validation failed, see body for details"));
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+
+ RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
+ JsonRepresentation repr = restfulResponseOfError.getEntity();
+
+ assertThat(repr.getString("from.invalidReason"), is("Cannot be less than zero"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java
new file mode 100644
index 0000000..42f2942
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenViewModel_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Ignore
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java
new file mode 100644
index 0000000..4fd6d59
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.*;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.endsWith;
+
+public class Get_thenRepresentation_containsSelfLink_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findById");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final JsonRepresentation args =invokeLink.getArguments();
+
+ // when
+ args.mapPut("id.value", 1);
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 1);
+
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "findById", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+ }
+
+ private void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws Exception {
+
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getSelf(), isLink()
+ .rel(Rel.SELF)
+ .href(endsWith(":39393/services/ActionsEntities/actions/findById/invoke"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.ACTION_RESULT.getMediaType())
+ );
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java
new file mode 100644
index 0000000..50cb663
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/list/invoke"))
+ .arguments(JsonRepresentation.newMap())
+ .build());
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
+
+ // then
+ then(restfulResponse);
+ }
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ then(restfulResponse);
+ }
+
+ private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..78b051b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+
+ @Ignore("TODO")
+ @Test
+ public void xxx() throws Exception {
+
+ // 2.13
+ // Cache-Control, also Pragma, Date, Expires
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java
new file mode 100644
index 0000000..89d5b70
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void success() throws Exception {
+ // should return 204 (13.3)
+ }
+
+ @Ignore
+ @Test
+ public void failure() throws Exception {
+ // should return 422, etc
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java
new file mode 100644
index 0000000..51388ff
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenCreatedNewObject_then_201_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+ // should return 201 (13.2)
+ // if a newly created object
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..328ab78
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenErrorThrown_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java
new file mode 100644
index 0000000..fdaa10c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void success() throws Exception {
+ // should return 204 (13.3)
+ }
+
+ @Ignore
+ @Test
+ public void failure() throws Exception {
+ // should return 422, etc
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
new file mode 100644
index 0000000..7fca5da
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.*;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenList_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
+ final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
+
+ // then list value
+ assertThat(listRepr.getValue(), is(not(nullValue())));
+ assertThat(listRepr.getValue().size(), is(5));
+
+ final JsonRepresentation domainObjectLinkRepr = listRepr.getValue().arrayGet(0);
+
+ assertThat(domainObjectLinkRepr, is(not(nullValue())));
+ assertThat(domainObjectLinkRepr, isLink()
+ .rel(Rel.ELEMENT)
+ .title("Untitled Actions Entity")
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(matches("http://localhost:\\d+/objects/RTNE/79"))
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
+ .arguments(JsonRepresentation.newMap())
+ .build());
+
+ // then list link element-type
+ assertThat(listRepr.getLinks(), is(not(nullValue())));
+ final LinkRepresentation elementTypeLink = listRepr.getLinkWithRel(Rel.ELEMENT_TYPE);
+ assertThat(elementTypeLink, is(not(nullValue())));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..dcb366b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenList_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+ // 2.4.2, content-type should include "x-ro-element-type"
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java
new file mode 100644
index 0000000..9a85564
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+// Get_whenObject_isNotNull_thenRepr_ok_andRespHeaders_ContentType_andContentLength__andRespCode_200_ok
+public class Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findById");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final JsonRepresentation args =invokeLink.getArguments();
+
+ // when
+ args.mapPut("id.value", 1);
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 1);
+
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "findById", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ then(restfulResponse);
+ }
+
+ private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.DOMAIN_OBJECT));
+ final DomainObjectRepresentation objRepr = actionResultRepr.getResult().as(DomainObjectRepresentation.class);
+
+ assertThat(objRepr.getMembers(), is(not(nullValue())));
+ assertThat(objRepr.getMembers().size(), is(IsisMatchers.greaterThan(0)));
+
+ assertThat(objRepr.getTitle(), is(not(nullValue())));
+
+ assertThat(objRepr.getLinks(), is(not(nullValue())));
+ assertThat(objRepr.getMembers().size(), is(IsisMatchers.greaterThan(0)));
+
+ assertThat(objRepr.getExtensions(), is(not(nullValue())));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java
new file mode 100644
index 0000000..37b1caf
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenObject_isNull_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findById");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final JsonRepresentation args =invokeLink.getArguments();
+
+ // when
+ args.mapPut("id.value", 999);
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 999);
+
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "findById", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ then(restfulResponse);
+ }
+
+ private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.DOMAIN_OBJECT));
+ assertThat(actionResultRepr.getResult(), is(nullValue()));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..3caf190
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenObject_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+ // 2.4.2, content-type should include "x-ro-domain-type"
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
new file mode 100644
index 0000000..290f9a8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java
new file mode 100644
index 0000000..d15e148
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_whenRequestHeaders_Accept_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
new file mode 100644
index 0000000..75bb280
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_whenRequestHeaders_Accept_whenInvalid_406_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..13b3195
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenScalar_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+}
[22/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
deleted file mode 100644
index 045b67b..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.jdo.annotations.Extension;
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Join;
-import javax.jdo.annotations.Persistent;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PIIP")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("PIIP")
-public class PolyInterfaceIdentityStrategyParentEntity extends BaseEntity {
-
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Children
- @Persistent
- @Join
- @Extension(vendorName="datanucleus", key="mapping-strategy", value="identity")
- private Set<PolyInterfaceIdentityStrategy> children = new HashSet<PolyInterfaceIdentityStrategy>();
-
- @MemberOrder(sequence = "1")
- public Set<PolyInterfaceIdentityStrategy> getChildren() {
- return children;
- }
-
- public void setChildren(final Set<PolyInterfaceIdentityStrategy> children) {
- this.children = children;
- }
- // }}
-
-
- // {{ newSubtype1 (action)
- public PolyInterfaceIdentityStrategySubtype1Entity newSubtype1(final String name, int foo) {
- final PolyInterfaceIdentityStrategySubtype1Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype1Entity.class);
- childEntity.setName(name);
- childEntity.setFoo(foo);
- childEntity.setParent(this);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ newSubtype2 (action)
- public PolyInterfaceIdentityStrategySubtype2Entity newSubtype2(final String name, String bar) {
- final PolyInterfaceIdentityStrategySubtype2Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype2Entity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- childEntity.setBar(bar);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ newSubtype3 (action)
- public PolyInterfaceIdentityStrategySubtype3Entity newSubtype3(final String name, BigDecimal boz) {
- final PolyInterfaceIdentityStrategySubtype3Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype3Entity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- childEntity.setBoz(boz);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ removeChild (action)
- public PolyInterfaceIdentityStrategyParentEntity removeChild(final PolyInterfaceIdentityStrategy childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- childEntity.setParent(null);
- }
- return this;
- }
-
- public List<PolyInterfaceIdentityStrategy> choices0RemoveChild() {
- return Arrays.asList(getChildren().toArray(new PolyInterfaceIdentityStrategy[0]));
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
deleted file mode 100644
index 232f177..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("PolyInterfaceIdentityStrategyParentEntities")
-@ObjectType("PolyInterfaceIdentityStrategyParentEntities")
-@DomainService
-public class PolyInterfaceIdentityStrategyParentEntityRepository extends AbstractEntityRepository<PolyInterfaceIdentityStrategyParentEntity> {
-
- public PolyInterfaceIdentityStrategyParentEntityRepository() {
- super(PolyInterfaceIdentityStrategyParentEntity.class, "PolyInterfaceIdentityStrategyParentEntities");
- }
-
- @MemberOrder(sequence = "2")
- public PolyInterfaceIdentityStrategyParentEntity newEntity(final String name) {
- final PolyInterfaceIdentityStrategyParentEntity entity = newTransientInstance(PolyInterfaceIdentityStrategyParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-
- @Hidden
- public void registerType(PolyInterfaceIdentityStrategySubtype1Entity e) { }
-
- @Hidden
- public void registerType(PolyInterfaceIdentityStrategySubtype2Entity e) { }
-
- @Hidden
- public void registerType(PolyInterfaceIdentityStrategySubtype3Entity e) { }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
deleted file mode 100644
index 461c317..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PII1")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PII1")
-public class PolyInterfaceIdentityStrategySubtype1Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
-
-
-
- // {{ Parent (title #1)
- private PolyInterfaceIdentityStrategyParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public PolyInterfaceIdentityStrategyParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Foo (property)
- private int foo;
-
- @MemberOrder(sequence = "1")
- public int getFoo() {
- return foo;
- }
-
- public void setFoo(final int foo) {
- this.foo = foo;
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
deleted file mode 100644
index d7bacbd..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PII2")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PII2")
-public class PolyInterfaceIdentityStrategySubtype2Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
-
-
- // {{ Parent (title #1)
- private PolyInterfaceIdentityStrategyParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public PolyInterfaceIdentityStrategyParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Bar (property)
- private String bar;
-
- @MemberOrder(sequence = "1")
- public String getBar() {
- return bar;
- }
-
- public void setBar(final String bar) {
- this.bar = bar;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
deleted file mode 100644
index c15dc71..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PIIS3")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PIIS3")
-public class PolyInterfaceIdentityStrategySubtype3Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
-
-
-
- // {{ Parent (title #1)
- private PolyInterfaceIdentityStrategyParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public PolyInterfaceIdentityStrategyParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Baz (property)
- private java.math.BigDecimal boz;
-
- @MemberOrder(sequence = "1")
- public java.math.BigDecimal getBoz() {
- return boz;
- }
-
- public void setBoz(final java.math.BigDecimal baz) {
- this.boz = baz;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java
deleted file mode 100644
index 144d401..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Join;
-import javax.jdo.annotations.Persistent;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PIPR")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("PIPR")
-public class PolyInterfaceParentEntity extends BaseEntity {
-
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Children
- @Persistent
- @Join
- private Set<PolyInterface> children = new HashSet<PolyInterface>();
-
- @MemberOrder(sequence = "1")
- public Set<PolyInterface> getChildren() {
- return children;
- }
-
- public void setChildren(final Set<PolyInterface> children) {
- this.children = children;
- }
- // }}
-
-
- // {{ newSubtype1 (action)
- public PolyInterfaceSubtype1Entity newSubtype1(final String name, int foo) {
- final PolyInterfaceSubtype1Entity childEntity = newTransientInstance(PolyInterfaceSubtype1Entity.class);
- childEntity.setName(name);
- childEntity.setFoo(foo);
- childEntity.setParent(this);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ newSubtype2 (action)
- public PolyInterfaceSubtype2Entity newSubtype2(final String name, String bar) {
- final PolyInterfaceSubtype2Entity childEntity = newTransientInstance(PolyInterfaceSubtype2Entity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- childEntity.setBar(bar);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ newSubtype3 (action)
- public PolyInterfaceSubtype3Entity newSubtype3(final String name, BigDecimal boz) {
- final PolyInterfaceSubtype3Entity childEntity = newTransientInstance(PolyInterfaceSubtype3Entity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- childEntity.setBoz(boz);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ removeChild (action)
- public PolyInterfaceParentEntity removeChild(final PolyInterface childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- childEntity.setParent(null);
- }
- return this;
- }
-
- public List<PolyInterface> choices0RemoveChild() {
- return Arrays.asList(getChildren().toArray(new PolyInterface[0]));
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java
deleted file mode 100644
index 5d302e4..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("PolyInterfaceParentEntities")
-@ObjectType("PolyInterfaceParentEntities")
-@DomainService
-public class PolyInterfaceParentEntityRepository extends AbstractEntityRepository<PolyInterfaceParentEntity> {
-
- public PolyInterfaceParentEntityRepository() {
- super(PolyInterfaceParentEntity.class, "PolyInterfaceParentEntities");
- }
-
- @MemberOrder(sequence = "2")
- public PolyInterfaceParentEntity newEntity(final String name) {
- final PolyInterfaceParentEntity entity = newTransientInstance(PolyInterfaceParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-
- @Hidden
- public void registerType(PolyInterfaceSubtype1Entity e) { }
-
- @Hidden
- public void registerType(PolyInterfaceSubtype2Entity e) { }
-
- @Hidden
- public void registerType(PolyInterfaceSubtype3Entity e) { }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java
deleted file mode 100644
index eedc86a..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PIS1")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PIS1")
-public class PolyInterfaceSubtype1Entity extends BaseEntity implements PolyInterface {
-
-
-
- // {{ Parent (title #1)
- private PolyInterfaceParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public PolyInterfaceParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final PolyInterfaceParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Foo (property)
- private int foo;
-
- @MemberOrder(sequence = "1")
- public int getFoo() {
- return foo;
- }
-
- public void setFoo(final int foo) {
- this.foo = foo;
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java
deleted file mode 100644
index ec64f86..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PIS2")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PIS2")
-public class PolyInterfaceSubtype2Entity extends BaseEntity implements PolyInterface {
-
-
- // {{ Parent (title #1)
- private PolyInterfaceParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public PolyInterfaceParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final PolyInterfaceParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Bar (property)
- private String bar;
-
- @MemberOrder(sequence = "1")
- public String getBar() {
- return bar;
- }
-
- public void setBar(final String bar) {
- this.bar = bar;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java
deleted file mode 100644
index 134d76a..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PIS3")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PIS3")
-public class PolyInterfaceSubtype3Entity extends BaseEntity implements PolyInterface {
-
-
-
- // {{ Parent (title #1)
- private PolyInterfaceParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public PolyInterfaceParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final PolyInterfaceParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Baz (property)
- private java.math.BigDecimal boz;
-
- @MemberOrder(sequence = "1")
- public java.math.BigDecimal getBoz() {
- return boz;
- }
-
- public void setBoz(final java.math.BigDecimal baz) {
- this.boz = baz;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java
deleted file mode 100644
index 645e03e..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.List;
-
-import javax.jdo.annotations.IdentityType;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.annotation.NotPersisted;
-import org.apache.isis.applib.annotation.ObjectType;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("RFCG")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("RFCG")
-public class ReferencingEntity extends BaseEntity {
-
-
- // {{ Reference
- private SimpleEntity reference;
-
- public SimpleEntity getReference() {
- return reference;
- }
-
- public void setReference(final SimpleEntity reference) {
- this.reference = reference;
- }
-
- // }}
-
- // {{ AggregatedEntity
- private AggregatedEntity aggregatedReference;
-
- public AggregatedEntity getAggregatedReference() {
- return aggregatedReference;
- }
-
- public void setAggregatedReference(final AggregatedEntity aggregatedReference) {
- this.aggregatedReference = aggregatedReference;
- }
-
- public AggregatedEntity addAggregatedReference() {
- final AggregatedEntity aggregatedEntity = newAggregatedInstance(AggregatedEntity.class);
- setAggregatedReference(aggregatedEntity);
- return aggregatedEntity;
- }
- // }}
-
- // {{ AggregatedEntities
- private List<AggregatedEntity> aggregatedEntities = Lists.newArrayList();
-
- public List<AggregatedEntity> getAggregatedEntities() {
- return aggregatedEntities;
- }
-
- public void setAggregatedEntities(List<AggregatedEntity> aggregatedEntities) {
- this.aggregatedEntities = aggregatedEntities;
- }
-
- public AggregatedEntity addAggregatedEntityToCollection() {
- final AggregatedEntity aggregatedEntity = newAggregatedInstance(AggregatedEntity.class);
- getAggregatedEntities().add(aggregatedEntity);
- return aggregatedEntity;
- }
- // }}
-
- // {{ NotPersisted
- @NotPersisted
- public SimpleEntity getNotPersisted() {
- throw new org.apache.isis.applib.NonRecoverableException("unexpected call");
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java
deleted file mode 100644
index 89c3fc4..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.Date;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.NotPersisted;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("SMPL")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("SMPL")
-public class SimpleEntity extends BaseEntity {
-
- // {{ name: String (title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
- // {{ Date: java.util.Date
- private Date date;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Date getDate() {
- return date;
- }
-
- public void setDate(final Date date) {
- this.date = date;
- }
- // }}
-
- // {{ Size: int
- private int size;
-
- @MemberOrder(sequence = "1")
- public int getSize() {
- return size;
- }
-
- public void setSize(final int size) {
- this.size = size;
- }
-
- // }}
-
- // {{ Nullable: long
- private Long number;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Long getNullable() {
- return number;
- }
-
- public void setNullable(final Long number) {
- this.number = number;
- }
-
- // }}
-
- // {{ NotPersisted: int (nb: throws exception if called)
- @NotPersisted
- public int getNotPersisted() {
- throw new org.apache.isis.applib.NonRecoverableException("unexpected call");
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java
deleted file mode 100644
index 8015cbc..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("UDFC")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("UDFC")
-public class UnidirFkChildEntity extends AbstractDomainObject {
-
-
- // {{ Name (title)
- private String name;
-
- @Title(sequence="1")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java
deleted file mode 100644
index f2be389..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("UDFP")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("UDFP")
-public class UnidirFkParentEntity extends BaseEntity {
-
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Children
- private Set<UnidirFkChildEntity> children = new HashSet<UnidirFkChildEntity>();
-
- public Set<UnidirFkChildEntity> getChildren() {
- return children;
- }
-
- public void setChildren(final Set<UnidirFkChildEntity> children) {
- this.children = children;
- }
- // }}
-
-
- // {{ newChild (action)
- public UnidirFkChildEntity newChild(final String name) {
- final UnidirFkChildEntity childEntity = newTransientInstance(UnidirFkChildEntity.class);
- childEntity.setName(name);
- addChild(childEntity);
- return childEntity;
- }
- // }}
-
-
- // {{ removeChild (action)
- public void addChild(UnidirFkChildEntity childEntity) {
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- }
- // }}
-
- // {{ removeChild (action)
- public UnidirFkParentEntity removeChild(final UnidirFkChildEntity childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- }
- return this;
- }
-
- public List<UnidirFkChildEntity> choices0RemoveChild() {
- return Arrays.asList(getChildren().toArray(new UnidirFkChildEntity[0]));
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java
deleted file mode 100644
index 5277df6..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("UnidirFkParentEntities")
-@ObjectType("UnidirFkParentEntities")
-@DomainService
-public class UnidirFkParentEntityRepository extends AbstractEntityRepository<UnidirFkParentEntity> {
-
- public UnidirFkParentEntityRepository() {
- super(UnidirFkParentEntity.class, "UnidirParentEntities");
- }
-
- @MemberOrder(sequence = "2")
- public UnidirFkParentEntity newEntity(final String name) {
- final UnidirFkParentEntity entity = newTransientInstance(UnidirFkParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java
deleted file mode 100644
index 6452ee6..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("UDJC")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("UDJC")
-public class UnidirJoinChildEntity extends AbstractDomainObject {
-
-
- // {{ Name (title)
- private String name;
-
- @Title(sequence="1")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java
deleted file mode 100644
index 3cf7dcc..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Join;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("UDJP")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("UDJP")
-public class UnidirJoinParentEntity extends BaseEntity {
-
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Children
- @Join
- private Set<UnidirJoinChildEntity> children = new HashSet<UnidirJoinChildEntity>();
-
- public Set<UnidirJoinChildEntity> getChildren() {
- return children;
- }
-
- public void setChildren(final Set<UnidirJoinChildEntity> children) {
- this.children = children;
- }
- // }}
-
-
- // {{ newChild (action)
- public UnidirJoinChildEntity newChild(final String name) {
- final UnidirJoinChildEntity childEntity = newTransientInstance(UnidirJoinChildEntity.class);
- childEntity.setName(name);
- addChild(childEntity);
- return childEntity;
- }
- // }}
-
-
- // {{ removeChild (action)
- public void addChild(UnidirJoinChildEntity childEntity) {
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- }
- // }}
-
- // {{ removeChild (action)
- public UnidirJoinParentEntity removeChild(final UnidirJoinChildEntity childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- }
- return this;
- }
-
- public List<UnidirFkChildEntity> choices0RemoveChild() {
- return Arrays.asList(getChildren().toArray(new UnidirFkChildEntity[0]));
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java
deleted file mode 100644
index 47da2d4..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("UnidirJoinParentEntities")
-@ObjectType("UnidirJoinParentEntities")
-@DomainService
-public class UnidirJoinParentEntityRepository extends AbstractEntityRepository<UnidirJoinParentEntity> {
-
- public UnidirJoinParentEntityRepository() {
- super(UnidirJoinParentEntity.class, "UnidirJoinParentEntities");
- }
-
- @MemberOrder(sequence = "2")
- public UnidirJoinParentEntity newEntity(final String name) {
- final UnidirJoinParentEntity entity = newTransientInstance(UnidirJoinParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java
deleted file mode 100644
index 9049cad..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("UDRD")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("UDRD")
-public class UnidirReferencedEntity extends AbstractDomainObject {
-
-
- // {{ Name (title)
- private String name;
-
- @Title(sequence="1")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java
deleted file mode 100644
index 6decf98..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("UnidirReferencedEntities")
-@ObjectType("UnidirReferencedEntities")
-@DomainService
-public class UnidirReferencedEntityRepository extends AbstractEntityRepository<UnidirReferencedEntity> {
-
- public UnidirReferencedEntityRepository() {
- super(UnidirReferencedEntity.class, "UnidirReferencedEntities");
- }
-
- @MemberOrder(sequence = "2")
- public UnidirReferencedEntity newEntity(final String name) {
- final UnidirReferencedEntity entity = newTransientInstance(UnidirReferencedEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java
deleted file mode 100644
index 170968f..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("UDRG")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("UDRG")
-public class UnidirReferencingEntity extends BaseEntity {
-
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Referenced (property)
- public UnidirReferencedEntity referenced;
-
- @MemberOrder(sequence = "1")
- public UnidirReferencedEntity getReferenced() {
- return referenced;
- }
-
- public void setReferenced(final UnidirReferencedEntity referenced) {
- this.referenced = referenced;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java
deleted file mode 100644
index 9100601..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("UnidirReferencingEntities")
-@ObjectType("UnidirReferencingEntities")
-@DomainService
-public class UnidirReferencingEntityRepository extends AbstractEntityRepository<UnidirReferencingEntity> {
-
- public UnidirReferencingEntityRepository() {
- super(UnidirReferencingEntity.class, "UnidirReferencingEntities");
- }
-
- @MemberOrder(sequence = "2")
- public UnidirReferencingEntity newEntity(final String name) {
- final UnidirReferencingEntity entity = newTransientInstance(UnidirReferencingEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java
deleted file mode 100644
index 0206039..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-import org.apache.isis.applib.value.Color;
-import org.apache.isis.applib.value.Date;
-import org.apache.isis.applib.value.DateTime;
-import org.apache.isis.applib.value.Image;
-import org.apache.isis.applib.value.Money;
-import org.apache.isis.applib.value.Password;
-import org.apache.isis.applib.value.Percentage;
-import org.apache.isis.applib.value.Time;
-import org.apache.isis.applib.value.TimeStamp;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("APLV")
-@javax.jdo.annotations.Query(
- name="jdkv_findByStringProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.scalars.ApplibValuedEntity WHERE stringProperty == :i")
-@ObjectType("APLV")
-public class ApplibValuedEntity extends AbstractDomainObject {
-
-
- // {{ StringProperty (also title, pk)
- private String stringProperty;
-
- @javax.jdo.annotations.PrimaryKey
- @Title
- @Optional
- @MemberOrder(sequence = "1")
- public String getStringProperty() {
- return stringProperty;
- }
-
- public void setStringProperty(final String description) {
- this.stringProperty = description;
- }
-
- public ApplibValuedEntity updateStringProperty(
- @Optional final String description) {
- setStringProperty(stringProperty);
- return this;
- }
-
- // }}
-
-
-
- // {{ DateProperty
- @javax.jdo.annotations.Persistent
- private Date dateProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Date getDateProperty() {
- return dateProperty;
- }
-
- public void setDateProperty(final Date dateProperty) {
- this.dateProperty = dateProperty;
- }
-
- public ApplibValuedEntity updateDateProperty(
- @Optional final Date dateProperty) {
- setDateProperty(dateProperty);
- return this;
- }
-
- // }}
-
- // {{ ColorProperty
- @javax.jdo.annotations.NotPersistent
- private Color colorProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Color getColorProperty() {
- return colorProperty;
- }
-
- public void setColorProperty(final Color colorProperty) {
- this.colorProperty = colorProperty;
- }
-
- public ApplibValuedEntity updateColorProperty(
- @Optional final Color colorProperty) {
- setColorProperty(colorProperty);
- return this;
- }
-
- // }}
-
- // {{ DateTimeProperty
- @javax.jdo.annotations.NotPersistent
- private DateTime dateTimeProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public DateTime getDateTimeProperty() {
- return dateTimeProperty;
- }
-
- public void setDateTimeProperty(final DateTime dateTimeProperty) {
- this.dateTimeProperty = dateTimeProperty;
- }
-
- public ApplibValuedEntity updateDateTimeProperty(
- @Optional final DateTime dateTimeProperty) {
- setDateTimeProperty(dateTimeProperty);
- return this;
- }
- // }}
-
- // {{ ImageProperty
- @javax.jdo.annotations.NotPersistent
- private Image imageProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Image getImageProperty() {
- return imageProperty;
- }
-
- public void setImageProperty(final Image imageProperty) {
- this.imageProperty = imageProperty;
- }
-
- public ApplibValuedEntity updateImageProperty(
- @Optional final Image imageProperty) {
- setImageProperty(imageProperty);
- return this;
- }
-
- // }}
-
- // {{ MoneyProperty
- @javax.jdo.annotations.NotPersistent
- private Money moneyProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Money getMoneyProperty() {
- return moneyProperty;
- }
-
- public void setMoneyProperty(final Money moneyProperty) {
- this.moneyProperty = moneyProperty;
- }
-
- public ApplibValuedEntity updateMoneyProperty(
- @Optional final Money moneyProperty) {
- this.moneyProperty = moneyProperty;
- return this;
- }
-
- // }}
-
- // {{ PasswordProperty
- @javax.jdo.annotations.NotPersistent
- private Password passwordProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Password getPasswordProperty() {
- return passwordProperty;
- }
-
- public void setPasswordProperty(final Password passwordProperty) {
- this.passwordProperty = passwordProperty;
- }
-
- public ApplibValuedEntity updatePasswordProperty(
- @Optional final Password passwordProperty) {
- setPasswordProperty(passwordProperty);
- return this;
- }
-
- // }}
-
- // {{ PercentageProperty
- @javax.jdo.annotations.NotPersistent
- private Percentage percentageProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Percentage getPercentageProperty() {
- return percentageProperty;
- }
-
- public void setPercentageProperty(final Percentage percentageProperty) {
- this.percentageProperty = percentageProperty;
- }
-
- public ApplibValuedEntity updatePercentageProperty(
- @Optional final Percentage percentageProperty) {
- setPercentageProperty(percentageProperty);
- return this;
- }
-
- // }}
-
- // {{ TimeProperty
- @javax.jdo.annotations.NotPersistent
- private Time timeProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Time getTimeProperty() {
- return timeProperty;
- }
-
- public void setTimeProperty(final Time timeProperty) {
- this.timeProperty = timeProperty;
- }
-
- public ApplibValuedEntity updateTimeProperty(
- @Optional final Time timeProperty) {
- setTimeProperty(timeProperty);
- return this;
- }
-
- // }}
-
- // {{ TimeStampProperty
- @javax.jdo.annotations.NotPersistent
- private TimeStamp timeStampProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public TimeStamp getTimeStampProperty() {
- return timeStampProperty;
- }
-
- public void setTimestampProperty(final TimeStamp timestampProperty) {
- this.timeStampProperty = timestampProperty;
- }
-
- public ApplibValuedEntity updateTimestampProperty(
- @Optional final TimeStamp timestampProperty) {
- setTimestampProperty(timestampProperty);
- return this;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java
deleted file mode 100644
index 79c982d..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("ApplibValuedEntities")
-@ObjectType("ApplibValuedEntities")
-@DomainService
-public class ApplibValuedEntityRepository extends AbstractEntityRepository<ApplibValuedEntity> {
-
- public ApplibValuedEntityRepository() {
- super(ApplibValuedEntity.class, "ApplibValuedEntities");
- }
-
- /**
- * Required to discover the ApplibValuedEntity type.
- */
- @Override
- @MemberOrder(sequence = "2")
- public ApplibValuedEntity newEntity() {
- return super.newEntity();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java
deleted file mode 100644
index 46be149..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("AUAS")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("AUAS")
-public class AutoAssignedEntity extends AbstractDomainObject {
-
-
- // {{ StringProperty (used in title)
- private String stringProperty;
-
- @Title(sequence="2")
- @Optional
- @MemberOrder(sequence = "1")
- public String getStringProperty() {
- return stringProperty;
- }
-
- public void setStringProperty(final String description) {
- this.stringProperty = description;
- }
-
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java
deleted file mode 100644
index 9de9e87..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("AutoAssignedEntities")
-@ObjectType("AutoAssignedEntities")
-public class AutoAssignedEntityRepository extends AbstractEntityRepository<AutoAssignedEntity> {
-
- public AutoAssignedEntityRepository() {
- super(AutoAssignedEntity.class, "AutoAssignedEntities");
- }
-
- /**
- * Required to discover the AutoAssignedEntity type.
- */
- @Override
- @MemberOrder(sequence = "2")
- public AutoAssignedEntity newEntity() {
- return super.newEntity();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java
deleted file mode 100644
index 1985e16..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-/**
- * TODO: delete ... OVERLAPS WITH ApplibValuedEntity, JdkValuedEntity, JodaValuedEntity
- *
- * @deprecated
- */
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("APLV")
-@javax.jdo.annotations.Query(
- name="dtmv_findByStringProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.scalars.DateTimeValuedEntity WHERE stringProperty == :i")
-@ObjectType("APLV")
-@Deprecated
-public class DateTimeValuedEntity extends AbstractDomainObject {
-
-
- // {{ StringProperty (also title, pk)
- private String stringProperty;
-
- @javax.jdo.annotations.PrimaryKey
- @Title
- @Optional
- @MemberOrder(sequence = "1")
- public String getStringProperty() {
- return stringProperty;
- }
-
- public void setStringProperty(final String stringProperty) {
- this.stringProperty = stringProperty;
- }
- // }}
-
-
- // {{ JavaUtilDate (property)
- private java.util.Date javaUtilDate;
-
- @Optional
- @MemberOrder(name="dates", sequence = "1")
- public java.util.Date getJavaUtilDate() {
- return javaUtilDate;
- }
-
- public void setJavaUtilDate(final java.util.Date javaUtilDate) {
- this.javaUtilDate = javaUtilDate;
- }
- // }}
-
- // {{ JavaSqlDate (property)
- private java.sql.Date javaSqlDate;
-
- @javax.jdo.annotations.Persistent
- @Optional
- @MemberOrder(name="dates", sequence = "1")
- public java.sql.Date getJavaSqlDate() {
- return javaSqlDate;
- }
-
- public void setJavaSqlDate(final java.sql.Date javaSqlDate) {
- this.javaSqlDate = javaSqlDate;
- }
-
- public DateTimeValuedEntity updateJavaSqlDate(
- @Optional final java.sql.Date javaSqlDate) {
- setJavaSqlDate(javaSqlDate);
- return this;
- }
- // }}
-
- // {{ ApplibDate (property)
- private org.apache.isis.applib.value.Date applibDate;
-
- @javax.jdo.annotations.Persistent
- @Optional
- @MemberOrder(name="dates", sequence = "1")
- public org.apache.isis.applib.value.Date getApplibDate() {
- return applibDate;
- }
-
- public void setApplibDate(final org.apache.isis.applib.value.Date applibDate) {
- this.applibDate = applibDate;
- }
- // }}
-
- // {{ ApplibDateTime (property)
- private org.apache.isis.applib.value.DateTime applibDateTime;
-
- @javax.jdo.annotations.Persistent
- @Optional
- @MemberOrder(name="dates", sequence = "1")
- public org.apache.isis.applib.value.DateTime getApplibDateTime() {
- return applibDateTime;
- }
-
- public void setApplibDateTime(final org.apache.isis.applib.value.DateTime applibDateTime) {
- this.applibDateTime = applibDateTime;
- }
- // }}
-
- // {{ JodaLocalDateTime (property)
- private org.joda.time.LocalDateTime jodaLocalDateTime;
-
- @javax.jdo.annotations.Persistent
- @Optional
- @MemberOrder(name="dates", sequence = "1")
- public org.joda.time.LocalDateTime getJodaLocalDateTime() {
- return jodaLocalDateTime;
- }
- public void setJodaLocalDateTime(final org.joda.time.LocalDateTime jodaLocalDateTime) {
- this.jodaLocalDateTime = jodaLocalDateTime;
- }
- // }}
-
- // {{ JodaLocalDate (property)
- private org.joda.time.LocalDate jodaLocalDate;
-
- @javax.jdo.annotations.Persistent
- @Optional
- @MemberOrder(name="dates", sequence = "1")
- public org.joda.time.LocalDate getJodaLocalDate() {
- return jodaLocalDate;
- }
-
- public void setJodaLocalDate(final org.joda.time.LocalDate jodaLocalDate) {
- this.jodaLocalDate = jodaLocalDate;
- }
- // }}
-
-
- // {{ JodaDateTime (property)
- private org.joda.time.DateTime jodaDateTime;
-
- @javax.jdo.annotations.Persistent
- @Optional
- @MemberOrder(name="dates", sequence = "1")
- public org.joda.time.DateTime getJodaDateTime() {
- return jodaDateTime;
- }
-
- public void setJodaDateTime(final org.joda.time.DateTime jodaDateTime) {
- this.jodaDateTime = jodaDateTime;
- }
- // }}
-
-
-}
[43/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java
new file mode 100644
index 0000000..cd449c8
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java
@@ -0,0 +1,674 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport;
+
+import java.util.Arrays;
+import java.util.List;
+import com.google.common.collect.Lists;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.runner.Description;
+import org.junit.runners.model.Statement;
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.core.commons.authentication.AuthenticationSession;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures.Fixtures.Initialization;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
+import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
+import org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
+import org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller;
+import org.apache.isis.core.runtime.authentication.AuthenticationManager;
+import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
+import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
+import org.apache.isis.core.runtime.system.DeploymentType;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.ObjectStore;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.runtime.system.transaction.IsisTransaction;
+import org.apache.isis.core.runtime.system.transaction.IsisTransaction.State;
+import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
+import org.apache.isis.core.security.authentication.AuthenticationRequestNameOnly;
+import org.apache.isis.core.tck.dom.refs.*;
+import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
+
+/**
+ * Wraps a plain {@link IsisSystemDefault}, and provides a number of features to assist with testing.
+ *
+ * <p>
+ * TODO: need to make inherit from the {@link IsisSystemForTest}.
+ */
+public class IsisSystemWithFixtures implements org.junit.rules.TestRule {
+
+
+ public interface Listener {
+
+ void init(IsisConfiguration configuration) throws Exception;
+
+ void preSetupSystem(boolean firstTime) throws Exception;
+ void postSetupSystem(boolean firstTime) throws Exception;
+
+ void preBounceSystem() throws Exception;
+ void postBounceSystem() throws Exception;
+
+ void preTeardownSystem() throws Exception;
+ void postTeardownSystem() throws Exception;
+
+ }
+
+ public static abstract class ListenerAdapter implements Listener {
+
+ private IsisConfiguration configuration;
+
+ public void init(IsisConfiguration configuration) throws Exception {
+ this.configuration = configuration;
+ }
+
+ protected IsisConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ @Override
+ public void preSetupSystem(boolean firstTime) throws Exception {
+ }
+
+ @Override
+ public void postSetupSystem(boolean firstTime) throws Exception {
+ }
+
+ @Override
+ public void preBounceSystem() throws Exception {
+ }
+
+ @Override
+ public void postBounceSystem() throws Exception {
+ }
+
+ @Override
+ public void preTeardownSystem() throws Exception {
+ }
+
+ @Override
+ public void postTeardownSystem() throws Exception {
+ }
+
+ }
+
+
+
+ /**
+ * A precanned set of fixtures for use by tests if desired.
+ */
+ public static class Fixtures {
+
+ public enum Initialization {
+ INIT,
+ NO_INIT
+ }
+
+ public ParentEntityRepository associatedEntitiesRepository = new ParentEntityRepository();
+
+ public ApplibValuedEntity ave1, ave2;
+ public JdkValuedEntity jve1, jve2;
+ public PrimitiveValuedEntity pve1, pve2;
+ public WrapperValuedEntity wve1, wve2;
+
+ public SimpleEntity smpl1, smpl2, smpl3, smpl4, smpl5, smpl6;
+ public ReferencingEntity rfcg1, rfcg2, rfcg3, rfcg4, rfcg5, rfcg6;
+ public ParentEntity prnt1, prnt2, prnt3, prnt4, prnt5, prnt6;
+ public AggregatedEntity rfcg1_a1, rfcg1_a2, rfcg1_a3, prnt1_a1, prnt1_a2, prnt1_a3;
+
+ private void init(DomainObjectContainer container) {
+ ave1 = container.newTransientInstance(ApplibValuedEntity.class);
+ ave2 = container.newTransientInstance(ApplibValuedEntity.class);
+
+ jve1 = container.newTransientInstance(JdkValuedEntity.class);
+ jve2 = container.newTransientInstance(JdkValuedEntity.class);
+
+ pve1 = container.newTransientInstance(PrimitiveValuedEntity.class);
+ pve2 = container.newTransientInstance(PrimitiveValuedEntity.class);
+
+ wve1 = container.newTransientInstance(WrapperValuedEntity.class);
+ wve2 = container.newTransientInstance(WrapperValuedEntity.class);
+
+ smpl1 = container.newTransientInstance(SimpleEntity.class);smpl1.setName("1");
+ smpl2 = container.newTransientInstance(SimpleEntity.class);smpl2.setName("2");
+ smpl3 = container.newTransientInstance(SimpleEntity.class);smpl3.setName("3");
+ smpl4 = container.newTransientInstance(SimpleEntity.class);smpl4.setName("4");
+ smpl5 = container.newTransientInstance(SimpleEntity.class);smpl5.setName("5");
+ smpl6 = container.newTransientInstance(SimpleEntity.class);smpl6.setName("6");
+ rfcg1 = container.newTransientInstance(ReferencingEntity.class);
+ rfcg2 = container.newTransientInstance(ReferencingEntity.class);
+ rfcg3 = container.newTransientInstance(ReferencingEntity.class);
+ rfcg4 = container.newTransientInstance(ReferencingEntity.class);
+ rfcg5 = container.newTransientInstance(ReferencingEntity.class);
+ rfcg6 = container.newTransientInstance(ReferencingEntity.class);
+ prnt1 = container.newTransientInstance(ParentEntity.class);
+ prnt2 = container.newTransientInstance(ParentEntity.class);
+ prnt3 = container.newTransientInstance(ParentEntity.class);
+ prnt4 = container.newTransientInstance(ParentEntity.class);
+ prnt5 = container.newTransientInstance(ParentEntity.class);
+ prnt6 = container.newTransientInstance(ParentEntity.class);
+ rfcg1_a1 = container.newAggregatedInstance(rfcg1, AggregatedEntity.class);
+ rfcg1_a2 = container.newAggregatedInstance(rfcg1, AggregatedEntity.class);
+ rfcg1_a3 = container.newAggregatedInstance(rfcg1, AggregatedEntity.class);
+ prnt1_a1 = container.newAggregatedInstance(prnt1, AggregatedEntity.class);
+ prnt1_a2 = container.newAggregatedInstance(prnt1, AggregatedEntity.class);
+ prnt1_a3 = container.newAggregatedInstance(prnt1, AggregatedEntity.class);
+ }
+ }
+
+ private IsisSystemDefault isisSystem;
+ private AuthenticationSession authenticationSession;
+
+ // public visibility just to reduce noise in tests
+ public DomainObjectContainer container;
+ // public visibility just to reduce noise in tests
+ public final Fixtures fixtures;
+
+ private Initialization fixturesInitialization;
+ private final IsisConfiguration configuration;
+ private final PersistenceMechanismInstaller persistenceMechanismInstaller;
+ private final AuthenticationRequest authenticationRequest;
+ private final List<Object> services;
+ private List <Listener> listeners;
+ private final MetaModelValidator metaModelValidator;
+ private final ProgrammingModel programmingModel;
+
+
+ ////////////////////////////////////////////////////////////
+ // constructor
+ ////////////////////////////////////////////////////////////
+
+ public static class Builder {
+
+ private AuthenticationRequest authenticationRequest = new AuthenticationRequestNameOnly("tester");
+
+ private Initialization fixturesInitialization = Initialization.INIT;
+ private IsisConfiguration configuration;
+ private PersistenceMechanismInstaller persistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
+ private MetaModelValidator metaModelValidator;
+ private ProgrammingModel programmingModel;
+
+ private final List <Listener> listeners = Lists.newArrayList();
+ private final List<Object> services = Lists.newArrayList();
+
+ public Builder() {
+ withServices(new DomainObjectContainerDefault());
+ }
+
+ public Builder with(IsisConfiguration configuration) {
+ this.configuration = configuration;
+ return this;
+ }
+
+ public Builder with(Initialization initialization) {
+ this.fixturesInitialization = initialization;
+ return this;
+ }
+
+ public Builder with(PersistenceMechanismInstaller persistenceMechanismInstaller) {
+ this.persistenceMechanismInstaller = persistenceMechanismInstaller;
+ return this;
+ }
+
+ public Builder with(AuthenticationRequest authenticationRequest) {
+ this.authenticationRequest = authenticationRequest;
+ return this;
+ }
+
+ public Builder withServices(Object... services) {
+ this.services.addAll(0, Arrays.asList(services));
+ return this;
+ }
+
+ public IsisSystemWithFixtures build() {
+ return new IsisSystemWithFixtures(fixturesInitialization, configuration, programmingModel, metaModelValidator, persistenceMechanismInstaller, authenticationRequest, services, listeners);
+ }
+
+ public Builder with(Listener listener) {
+ if(listener != null) {
+ listeners.add(listener);
+ }
+ return this;
+ }
+
+ public Builder with(MetaModelValidator metaModelValidator) {
+ this.metaModelValidator = metaModelValidator;
+ return this;
+ }
+
+ public Builder with(ProgrammingModel programmingModel) {
+ this.programmingModel = programmingModel;
+ return this;
+ }
+ }
+
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ private IsisSystemWithFixtures(Initialization fixturesInitialization, IsisConfiguration configuration, ProgrammingModel programmingModel, MetaModelValidator metaModelValidator, PersistenceMechanismInstaller persistenceMechanismInstaller, AuthenticationRequest authenticationRequest, List<Object> services, List<Listener> listeners) {
+ this.fixturesInitialization = fixturesInitialization;
+ this.configuration = configuration;
+ this.programmingModel = programmingModel;
+ this.metaModelValidator = metaModelValidator;
+ this.persistenceMechanismInstaller = persistenceMechanismInstaller;
+ this.authenticationRequest = authenticationRequest;
+ this.fixtures = new Fixtures();
+
+ // hacky
+ services.add(fixtures.associatedEntitiesRepository);
+ this.services = services;
+
+ this.listeners = listeners;
+
+ this.container = lookupContainer();
+ }
+
+
+ ////////////////////////////////////////////////////////////
+ // setup, teardown
+ ////////////////////////////////////////////////////////////
+
+
+ /**
+ * Intended to be called from a test's {@link Before} method.
+ */
+ public void setUpSystem() throws Exception {
+ setUpSystem(FireListeners.FIRE);
+ }
+
+ private void setUpSystem(FireListeners fireListeners) throws Exception {
+ org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
+
+ boolean firstTime = isisSystem == null;
+ if (fireListeners.shouldFire()) {
+ fireInitAndPreSetupSystem(firstTime);
+ }
+
+ if (firstTime) {
+ isisSystem = createIsisSystem(services);
+ isisSystem.init();
+ IsisContext.closeSession();
+ }
+
+ final AuthenticationManager authenticationManager = isisSystem.getSessionFactory().getAuthenticationManager();
+ authenticationSession = authenticationManager.authenticate(authenticationRequest);
+
+ IsisContext.openSession(authenticationSession);
+
+ DomainObjectContainer container = lookupContainer();
+ if (firstTime && fixturesInitialization == Fixtures.Initialization.INIT) {
+ fixtures.init(container);
+ }
+ if (fireListeners.shouldFire()) {
+ firePostSetupSystem(firstTime);
+ }
+
+ }
+
+ private DomainObjectContainer lookupContainer() {
+ return lookupContainerIn(services);
+ }
+
+ private static DomainObjectContainer lookupContainerIn(List<Object> services1) {
+ for (Object service : services1) {
+ if(service instanceof DomainObjectContainer) {
+ return (DomainObjectContainer) service;
+ }
+ }
+ throw new IllegalStateException("Could not locate DomainObjectContainer");
+ }
+
+
+ private enum FireListeners {
+ FIRE,
+ DONT_FIRE;
+ public boolean shouldFire() {
+ return this == FIRE;
+ }
+ }
+
+
+ /**
+ * Intended to be called from a test's {@link After} method.
+ */
+ public void tearDownSystem() throws Exception {
+ tearDownSystem(FireListeners.FIRE);
+ }
+
+ private void tearDownSystem(final FireListeners fireListeners) throws Exception {
+ if(fireListeners.shouldFire()) {
+ firePreTeardownSystem();
+ }
+ IsisContext.closeSession();
+ if(fireListeners.shouldFire()) {
+ firePostTeardownSystem();
+ }
+ }
+
+ public void bounceSystem() throws Exception {
+ firePreBounceSystem();
+ tearDownSystem(FireListeners.DONT_FIRE);
+ setUpSystem(FireListeners.DONT_FIRE);
+ firePostBounceSystem();
+ }
+
+
+ private IsisSystemDefault createIsisSystem(List<Object> services) {
+ final IsisSystemDefault system = new IsisSystemDefault(DeploymentType.UNIT_TESTING, services) {
+ @Override
+ public IsisConfiguration getConfiguration() {
+ if(IsisSystemWithFixtures.this.configuration != null) {
+ return IsisSystemWithFixtures.this.configuration;
+ } else {
+ return super.getConfiguration();
+ }
+ }
+ @Override
+ protected ProgrammingModel obtainReflectorProgrammingModel() {
+ if(IsisSystemWithFixtures.this.programmingModel != null) {
+ return IsisSystemWithFixtures.this.programmingModel;
+ } else {
+ return super.obtainReflectorProgrammingModel();
+ }
+ }
+ @Override
+ protected MetaModelValidator obtainReflectorMetaModelValidator() {
+ if(IsisSystemWithFixtures.this.metaModelValidator != null) {
+ return IsisSystemWithFixtures.this.metaModelValidator;
+ } else {
+ return super.obtainReflectorMetaModelValidator();
+ }
+ }
+ @Override
+ protected PersistenceMechanismInstaller obtainPersistenceMechanismInstaller(IsisConfiguration configuration) {
+ final PersistenceMechanismInstaller installer = IsisSystemWithFixtures.this.persistenceMechanismInstaller;
+ configuration.injectInto(installer);
+ return installer;
+ }
+ };
+ return system;
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // listeners
+ ////////////////////////////////////////////////////////////
+
+ private void fireInitAndPreSetupSystem(boolean firstTime) throws Exception {
+ if(firstTime) {
+ for(Listener listener: listeners) {
+ listener.init(configuration);
+ }
+ }
+ for(Listener listener: listeners) {
+ listener.preSetupSystem(firstTime);
+ }
+ }
+
+ private void firePostSetupSystem(boolean firstTime) throws Exception {
+ for(Listener listener: listeners) {
+ listener.postSetupSystem(firstTime);
+ }
+ }
+
+ private void firePreTeardownSystem() throws Exception {
+ for(Listener listener: listeners) {
+ listener.preTeardownSystem();
+ }
+ }
+
+ private void firePostTeardownSystem() throws Exception {
+ for(Listener listener: listeners) {
+ listener.postTeardownSystem();
+ }
+ }
+
+ private void firePreBounceSystem() throws Exception {
+ for(Listener listener: listeners) {
+ listener.preBounceSystem();
+ }
+ }
+
+ private void firePostBounceSystem() throws Exception {
+ for(Listener listener: listeners) {
+ listener.postBounceSystem();
+ }
+ }
+
+
+ ////////////////////////////////////////////////////////////
+ // properties
+ ////////////////////////////////////////////////////////////
+
+ /**
+ * The {@link IsisSystemDefault} created during {@link #setUpSystem()}.
+ */
+ public IsisSystemDefault getIsisSystem() {
+ return isisSystem;
+ }
+
+ /**
+ * The {@link AuthenticationSession} created during {@link #setUpSystem()}.
+ */
+ public AuthenticationSession getAuthenticationSession() {
+ return authenticationSession;
+ }
+
+
+
+ ////////////////////////////////////////////////////////////
+ // Convenience for tests
+ ////////////////////////////////////////////////////////////
+
+ public ObjectSpecification loadSpecification(Class<?> cls) {
+ return getIsisSystem().getSessionFactory().getSpecificationLoader().loadSpecification(cls);
+ }
+
+ public ObjectAdapter persist(Object domainObject) {
+ ensureSessionInProgress();
+ ensureObjectIsNotPersistent(domainObject);
+ container.persist(domainObject);
+ return adapterFor(domainObject);
+ }
+
+ public ObjectAdapter destroy(Object domainObject ) {
+ ensureSessionInProgress();
+ ensureObjectIsPersistent(domainObject);
+ container.remove(domainObject);
+ return adapterFor(domainObject);
+ }
+
+ public ObjectAdapter adapterFor(Object domainObject) {
+ ensureSessionInProgress();
+ return getAdapterManager().adapterFor(domainObject);
+ }
+
+ public ObjectAdapter reload(RootOid oid) {
+ ensureSessionInProgress();
+ final PersistenceSession persistenceSession = getPersistenceSession();
+ return persistenceSession.loadObject(oid);
+ }
+
+ public ObjectAdapter recreateAdapter(RootOid oid) {
+ ensureSessionInProgress();
+ return getAdapterManager().adapterFor(oid);
+ }
+
+ public ObjectAdapter remapAsPersistent(Object pojo, RootOid persistentOid) {
+ ensureSessionInProgress();
+ ensureObjectIsNotPersistent(pojo);
+ final ObjectAdapter adapter = adapterFor(pojo);
+ getPersistenceSession().getAdapterManager().remapAsPersistent(adapter, persistentOid);
+ return adapter;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T extends ObjectStore> T getObjectStore(Class<T> cls) {
+ final PersistenceSession persistenceSession = getPersistenceSession();
+ return (T) persistenceSession.getObjectStore();
+ }
+
+ private static void ensureSessionInProgress() {
+ if(!IsisContext.inSession()) {
+ throw new IllegalStateException("Session must be in progress");
+ }
+ }
+
+ private void ensureObjectIsNotPersistent(Object domainObject) {
+ if(container.isPersistent(domainObject)) {
+ throw new IllegalArgumentException("domain object is already persistent");
+ }
+ }
+
+ private void ensureObjectIsPersistent(Object domainObject) {
+ if(!container.isPersistent(domainObject)) {
+ throw new IllegalArgumentException("domain object is not persistent");
+ }
+ }
+
+ ////////////////////////////////////////////////////////////
+ // JUnit @Rule integration
+ ////////////////////////////////////////////////////////////
+
+ @Override
+ public Statement apply(final Statement base, Description description) {
+ return new Statement() {
+ @Override
+ public void evaluate() throws Throwable {
+ setUpSystem();
+ try {
+ base.evaluate();
+ tearDownSystem();
+ } catch(Throwable ex) {
+ try {
+ tearDownSystem();
+ } catch(Exception ex2) {
+ // ignore, since already one pending
+ }
+ throw ex;
+ }
+ }
+ };
+ }
+
+
+
+ public void beginTran() {
+ final IsisTransactionManager transactionManager = getTransactionManager();
+ final IsisTransaction transaction = transactionManager.getTransaction();
+
+ if(transaction == null) {
+ transactionManager.startTransaction();
+ return;
+ }
+
+ final State state = transaction.getState();
+ switch(state) {
+ case COMMITTED:
+ case ABORTED:
+ transactionManager.startTransaction();
+ break;
+ case IN_PROGRESS:
+ // nothing to do
+ break;
+ case MUST_ABORT:
+ Assert.fail("Transaction is in state of '" + state + "'");
+ break;
+ default:
+ Assert.fail("Unknown transaction state '" + state + "'");
+ }
+
+ }
+
+ public void commitTran() {
+ final IsisTransactionManager transactionManager = getTransactionManager();
+ final IsisTransaction transaction = transactionManager.getTransaction();
+ if(transaction == null) {
+ Assert.fail("No transaction exists");
+ return;
+ }
+ final State state = transaction.getState();
+ switch(state) {
+ case COMMITTED:
+ case ABORTED:
+ case MUST_ABORT:
+ Assert.fail("Transaction is in state of '" + state + "'");
+ break;
+ case IN_PROGRESS:
+ transactionManager.endTransaction();
+ break;
+ default:
+ Assert.fail("Unknown transaction state '" + state + "'");
+ }
+ }
+
+ public void abortTran() {
+ final IsisTransactionManager transactionManager = getTransactionManager();
+ final IsisTransaction transaction = transactionManager.getTransaction();
+ if(transaction == null) {
+ Assert.fail("No transaction exists");
+ return;
+ }
+ final State state = transaction.getState();
+ switch(state) {
+ case ABORTED:
+ break;
+ case COMMITTED:
+ Assert.fail("Transaction is in state of '" + state + "'");
+ break;
+ case MUST_ABORT:
+ case IN_PROGRESS:
+ transactionManager.abortTransaction();
+ break;
+ default:
+ Assert.fail("Unknown transaction state '" + state + "'");
+ }
+ }
+
+ protected IsisTransactionManager getTransactionManager() {
+ return getPersistenceSession().getTransactionManager();
+ }
+
+ public PersistenceSession getPersistor() {
+ return getPersistenceSession();
+ }
+
+ public AdapterManager getAdapterManager() {
+ return getPersistor().getAdapterManager();
+ }
+
+ protected PersistenceSession getPersistenceSession() {
+ return IsisContext.getPersistenceSession();
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java
new file mode 100644
index 0000000..ac72288
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
+
+public class IsisSystemWithFixturesTest_basicTest {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ @Test
+ public void savePojo() throws Exception {
+
+ iswf.beginTran();
+ assertThat(iswf.container.allInstances(JdkValuedEntity.class).size(), is(0));
+
+ iswf.container.persist(iswf.fixtures.jve1);
+
+ assertThat(iswf.container.allInstances(JdkValuedEntity.class).size(), is(1));
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java
new file mode 100644
index 0000000..010c130
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.runner.RunWith;
+import org.apache.isis.applib.DomainObjectContainer;
+import org.apache.isis.applib.services.eventbus.EventBusService;
+import org.apache.isis.applib.services.wrapper.WrapperFactory;
+import org.apache.isis.applib.services.wrapper.WrapperObject;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Product;
+import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.CountriesFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.CustomerOrdersFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.CustomersFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.ProductsFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.CountryRepository;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.CustomerRepository;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.OrderRepository;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.ProductRepository;
+import org.apache.isis.core.wrapper.WrapperFactoryDefault;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+@RunWith(IsisTestRunner.class)
+@Fixtures({ @Fixture(CountriesFixture.class), @Fixture(ProductsFixture.class), @Fixture(CustomersFixture.class), @Fixture(CustomerOrdersFixture.class) })
+@Services({ @Service(CountryRepository.class), @Service(ProductRepository.class), @Service(CustomerRepository.class), @Service(OrderRepository.class), @Service(WrapperFactoryDefault.class), @Service(EventBusService.Noop.class) })
+public abstract class AbstractTest {
+
+ protected Customer custJsDO;
+ protected Customer custJsWO;
+
+ protected Product product355DO;
+ protected Product product355WO;
+
+ protected Product product850DO;
+
+ protected Country countryGbrDO;
+ protected Country countryGbrWO;
+
+ protected Country countryUsaDO;
+ protected Country countryAusDO;
+
+ private ProductRepository productRepository;
+ private CustomerRepository customerRepository;
+ private CountryRepository countryRepository;
+
+ private DomainObjectContainer domainObjectContainer;
+ private WrapperFactory wrapperFactory;
+
+ @Before
+ public void setUp() {
+
+ product355DO = productRepository.findByCode("355-40311");
+ product355WO = wrapperFactory.wrap(product355DO);
+ product850DO = productRepository.findByCode("850-18003");
+
+ countryGbrDO = countryRepository.findByCode("GBR");
+ countryGbrWO = wrapperFactory.wrap(countryGbrDO);
+
+ countryUsaDO = countryRepository.findByCode("USA");
+ countryAusDO = countryRepository.findByCode("AUS");
+
+ custJsDO = customerRepository.findByName("Pawson");
+ custJsWO = wrapperFactory.wrap(custJsDO);
+
+ assertThat(product355WO instanceof WrapperObject, is(true));
+ assertThat(countryGbrWO instanceof WrapperObject, is(true));
+ assertThat(custJsWO instanceof WrapperObject, is(true));
+ }
+
+ @After
+ public void tearDown() {
+ }
+
+ // //////////////////////////////////////////////////////
+ // Injected.
+ // //////////////////////////////////////////////////////
+
+ protected WrapperFactory getWrapperFactory() {
+ return wrapperFactory;
+ }
+
+ public void setWrapperFactory(final WrapperFactory headlessViewer) {
+ this.wrapperFactory = headlessViewer;
+ }
+
+ protected DomainObjectContainer getDomainObjectContainer() {
+ return domainObjectContainer;
+ }
+
+ public void setDomainObjectContainer(final DomainObjectContainer domainObjectContainer) {
+ this.domainObjectContainer = domainObjectContainer;
+ }
+
+ protected ProductRepository getProductRepository() {
+ return productRepository;
+ }
+
+ public void setProductRepository(final ProductRepository productRepository) {
+ this.productRepository = productRepository;
+ }
+
+ protected CustomerRepository getCustomerRepository() {
+ return customerRepository;
+ }
+
+ public void setCustomerRepository(final CustomerRepository customerRepository) {
+ this.customerRepository = customerRepository;
+ }
+
+ protected CountryRepository getCountryRepository() {
+ return countryRepository;
+ }
+
+ public void setCountryRepository(final CountryRepository countryRepository) {
+ this.countryRepository = countryRepository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java
new file mode 100644
index 0000000..edcc3a3
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Ignore;
+import org.junit.Test;
+
+public class DefaultAndChoicesTest extends AbstractTest {
+
+ @Test
+ public void defaults() {
+ final Object[] defaultPlaceOrder = custJsWO.defaultPlaceOrder();
+ assertThat(defaultPlaceOrder.length, is(2));
+ }
+
+ @Ignore("not yet tested")
+ @Test
+ public void choicesDefaults() {
+ // not tested.
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java
new file mode 100644
index 0000000..8669781
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+import org.apache.isis.applib.events.InteractionEvent;
+import org.apache.isis.applib.events.PropertyAccessEvent;
+import org.apache.isis.applib.services.wrapper.listeners.InteractionAdapter;
+import org.apache.isis.applib.services.wrapper.listeners.InteractionListener;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+
+public class InteractionListenerTest extends AbstractTest {
+
+ @Test
+ public void shouldBeAbleToAddListener() {
+ final Customer proxiedCustRP = getWrapperFactory().wrap(custJsDO);
+ final InteractionEvent[] events = { null };
+ final InteractionListener l = new InteractionAdapter() {
+ @Override
+ public void propertyAccessed(final PropertyAccessEvent ev) {
+ events[0] = ev;
+ }
+ };
+ getWrapperFactory().addInteractionListener(l);
+
+ proxiedCustRP.getFirstName();
+ assertThat(events[0], notNullValue());
+ final PropertyAccessEvent ev = (PropertyAccessEvent) events[0];
+ assertThat(ev.getMemberNaturalName(), is("First Name"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java
new file mode 100644
index 0000000..b4a27e0
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.List;
+
+import org.hamcrest.Matchers;
+import org.junit.Test;
+
+import org.apache.isis.applib.services.wrapper.DisabledException;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Order;
+import org.apache.isis.core.metamodel.facets.properties.property.disabled.DisabledFacetForDisabledAnnotationOnProperty;
+import org.apache.isis.core.metamodel.facets.members.disabled.method.DisableForContextFacetViaMethod;
+
+public class MemberDisabledTest extends AbstractTest {
+
+ @Test
+ public void whenValueDisabledForValueThenThrowsException() {
+ custJsDO.disableFirstName = "cannot alter";
+ try {
+ custJsWO.setFirstName("Dick");
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
+ assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
+ }
+ }
+
+ @Test
+ public void whenValueDisabledForNullThenThrowsException() {
+ custJsDO.disableFirstName = "cannot alter";
+ try {
+ custJsWO.setFirstName(null);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
+ assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
+ }
+ }
+
+ @Test
+ public void whenAssociationDisabledForReferenceThenThrowsException() {
+ custJsDO.disableCountryOfBirth = "cannot alter";
+ try {
+ custJsWO.setCountryOfBirth(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
+ assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
+ }
+ }
+
+ @Test
+ public void whenAssociationDisabledForNullThenThrowsException() {
+ custJsDO.disableCountryOfBirth = "cannot alter";
+ try {
+ custJsWO.setCountryOfBirth(null);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
+ assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
+ }
+ }
+
+ @Test
+ public void whenCollectionDisabledThenAddToThrowsException() {
+ final List<Order> orders = custJsWO.getOrders();
+ final Order order = orders.get(0);
+ try {
+ custJsWO.addToMoreOrders(order);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetForDisabledAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("More Orders"));
+ assertThat(ex.getMessage(), Matchers.containsString("Always disabled"));
+ }
+ }
+
+ @Test
+ public void whenCollectionDisabledThenRemovefromThrowsException() {
+ custJsDO.addToVisitedCountries(countryUsaDO);
+ custJsDO.disableVisitedCountries = "cannot alter";
+ try {
+ custJsWO.removeFromVisitedCountries(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
+ assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
+ }
+ }
+
+ @Test
+ public void whenActionDisabledThenThrowsException() {
+ custJsDO.disablePlaceOrder = "cannot invoke";
+ try {
+ custJsWO.placeOrder(product355DO, 3);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Order"));
+ assertThat(ex.getMessage(), Matchers.containsString("cannot invoke"));
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java
new file mode 100644
index 0000000..f2bf3e4
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java
@@ -0,0 +1,356 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import org.junit.Test;
+import org.apache.isis.applib.services.wrapper.HiddenException;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+import org.apache.isis.core.metamodel.facets.properties.property.hidden.HiddenFacetForHiddenAnnotationOnProperty;
+import org.apache.isis.core.metamodel.facets.members.hidden.forsession.HideForSessionFacetViaMethod;
+import org.apache.isis.core.metamodel.facets.members.hidden.method.HideForContextFacetViaMethod;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+public class MemberHiddenTest extends AbstractTest {
+
+ @Test
+ public void whenValueHiddenImperativelyForValueThenModifyThrowsException() {
+ custJsDO.hideFirstName = true;
+ try {
+ custJsWO.setFirstName("Dick");
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
+ }
+ }
+
+ @Test
+ public void whenValueHiddenImperativelyForNullThenModifyThrowsException() {
+ custJsDO.hideFirstName = true;
+ try {
+ custJsWO.setFirstName("Dick");
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
+ }
+ }
+
+ @Test
+ public void whenValueHiddenImperativelyThenReadThrowsException() {
+ custJsDO.hideFirstName = true;
+ try {
+ custJsWO.getFirstName();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
+ }
+ }
+
+ @Test
+ public void whenAssociationHiddenImperativelyForValueThenModifyThrowsException() {
+ custJsDO.hideCountryOfBirth = true;
+ try {
+ custJsWO.setCountryOfBirth(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
+ }
+ }
+
+ @Test
+ public void whenAssociationHiddenImperativelyForNullThenModifyThrowsException() {
+ custJsDO.hideCountryOfBirth = true;
+ try {
+ custJsWO.setCountryOfBirth(null);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
+ }
+ }
+
+ @Test
+ public void whenAssociationHiddenImperativelyThenReadThrowsException() {
+ custJsDO.hideCountryOfBirth = true;
+ try {
+ custJsWO.getCountryOfBirth();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
+ }
+ }
+
+ @Test
+ public void whenIfCollectionHiddenImperativelyThenAddToThrowsException() {
+ custJsDO.hideVisitedCountries = true;
+ try {
+ custJsWO.addToVisitedCountries(countryGbrDO);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenImperativelyThenRemoveFromThrowsException() {
+ custJsDO.hideVisitedCountries = true;
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ try {
+ custJsWO.removeFromVisitedCountries(countryGbrDO);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenImperativelyThenReadThrowsException() {
+ custJsDO.hideVisitedCountries = true;
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ try {
+ custJsWO.getVisitedCountries();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
+ }
+ }
+
+ @Test
+ public void whenActionHiddenImperativelyThenThrowsException() {
+ custJsDO.hidePlaceOrder = true;
+ try {
+ custJsWO.placeOrder(product355DO, 3);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Order"));
+ }
+ }
+
+ @Test
+ public void whenValueHiddenDeclarativelyForValueThenModifyThrowsException() {
+ try {
+ custJsWO.setAlwaysHiddenValue("Dick");
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Value"));
+ }
+ }
+
+ @Test
+ public void whenValueHiddenDeclarativelyForNullThenModifyThrowsException() {
+ try {
+ custJsWO.setAlwaysHiddenValue(null);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Value"));
+ }
+ }
+
+ @Test
+ public void whenValueHiddenDeclarativelyThenReadThrowsException() {
+ try {
+ custJsWO.getAlwaysHiddenValue();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Value"));
+ }
+ }
+
+ @Test
+ public void whenAssociationHiddenDeclarativelyThenModifyThrowsException() {
+ final Country[] values = new Country[] { countryUsaDO, null };
+ for (final Country value : values) {
+ try {
+ custJsWO.setAlwaysHiddenAssociation(value);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Association"));
+ }
+ }
+ }
+
+ @Test
+ public void whenAssociationHiddenDeclarativelyThenReadThrowsException() {
+ try {
+ custJsWO.getAlwaysHiddenAssociation();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Association"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenDeclarativelyThenAddToThrowsException() {
+ try {
+ custJsWO.addToAlwaysHiddenCollection(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Collection"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenDeclarativelyThenRemoveFromThrowsException() {
+ custJsDO.removeFromAlwaysHiddenCollection(countryUsaDO);
+ try {
+ custJsWO.removeFromAlwaysHiddenCollection(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Collection"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenDeclarativelyThenReadThrowsException() {
+ try {
+ custJsWO.getAlwaysHiddenCollection();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Collection"));
+ }
+ }
+
+ @Test
+ public void whenActionHiddenDeclarativelyThenThrowsException() {
+ try {
+ custJsWO.alwaysHiddenAction();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Action"));
+ }
+ }
+
+ @Test
+ public void whenValueHiddenNotAuthorizedThenModifyThrowsException() {
+ final String[] values = new String[] { "Dick", null };
+ for (final String value : values) {
+ try {
+ custJsWO.setSessionHiddenValue(value);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Value"));
+ }
+ }
+ }
+
+ @Test
+ public void whenValueHiddenNotAuthorizedThenReadThrowsException() {
+ try {
+ custJsWO.getSessionHiddenValue();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Value"));
+ }
+ }
+
+ @Test
+ public void whenAssociationHiddenNotAuthorizedThenModifyThrowsException() {
+ final Country[] values = new Country[] { countryUsaDO, null };
+ for (final Country value : values) {
+ try {
+ custJsWO.setSessionHiddenAssociation(value);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Association"));
+ }
+ }
+ }
+
+ @Test
+ public void whenAssociationHiddenNotAuthorizedThenReadThrowsException() {
+ try {
+ custJsWO.getSessionHiddenAssociation();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Association"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenNotAuthorizedThenAddToThrowsException() {
+ try {
+ custJsWO.addToSessionHiddenCollection(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Collection"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenNotAuthorizedThenRemoveFromThrowsException() {
+ custJsDO.addToSessionHiddenCollection(countryUsaDO);
+ try {
+ custJsWO.removeFromSessionHiddenCollection(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Collection"));
+ }
+ }
+
+ @Test
+ public void whenCollectionHiddenNotAuthorizedThenReadThrowsException() {
+ try {
+ custJsWO.getSessionHiddenCollection();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Collection"));
+ }
+ }
+
+ @Test
+ public void whenActionHiddenNotAuthorizedThenThrowsException() {
+ try {
+ custJsWO.sessionHiddenAction();
+ fail("Should have thrown exception");
+ } catch (final HiddenException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Action"));
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java
new file mode 100644
index 0000000..cd17d79
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java
@@ -0,0 +1,255 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import org.hamcrest.Matchers;
+import org.junit.Ignore;
+import org.junit.Test;
+
+import org.apache.isis.applib.services.wrapper.InvalidException;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForMaxLengthAnnotationOnProperty;
+import org.apache.isis.core.metamodel.facets.properties.property.regex.RegExFacetForRegExAnnotationOnProperty;
+import org.apache.isis.core.metamodel.facets.objectvalue.mandatory.MandatoryFacetDefault;
+import org.apache.isis.core.metamodel.facets.actions.validate.method.ActionValidationFacetViaMethod;
+import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateAddToFacetViaMethod;
+import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateRemoveFromFacetViaMethod;
+import org.apache.isis.core.metamodel.facets.properties.validating.method.PropertyValidateFacetViaMethod;
+
+public class MemberInvalidTest extends AbstractTest {
+
+ @Test
+ public void whenValueInvalidImperativelyThenThrowsException() {
+ final String[] values = new String[] { "Dick", "Harry" };
+ for (final String value : values) {
+ custJsDO.validateFirstNameExpectedArg = value;
+ custJsDO.validateFirstName = "bad first name";
+ try {
+ custJsWO.setFirstName(value);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
+ assertThat(ex.getMessage(), Matchers.containsString("bad first name"));
+ }
+ }
+ }
+
+ @Test
+ public void whenValueNullThenDoesNotThrowException() {
+ final String[] values = new String[] { null };
+ for (final String value : values) {
+ custJsDO.validateFirstNameExpectedArg = value;
+ custJsDO.validateFirstName = "bad first name";
+ // should not trigger exception
+ custJsWO.setFirstName(value);
+ }
+ }
+
+
+ @Ignore // different behaviour testing in Eclipse vs Maven (different exception type thrown); not sure why
+ @Test
+ public void whenValueInvalidImperativelyOnMandatoryThenThrowsException() {
+ final String[] values = new String[] { null };
+ for (final String value : values) {
+ custJsDO.validateFirstNameMandatoryExpectedArg = value;
+ custJsDO.validateFirstNameMandatory = "bad first name";
+ try {
+ custJsWO.setFirstNameMandatory(value);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ //assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class)); // in Eclipse?
+ assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class)); // in Maven?
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name Mandatory"));
+ assertThat(ex.getMessage(), Matchers.containsString("bad first name"));
+ }
+ }
+ }
+
+
+
+ @Test
+ public void whenAssociationInvalidImperativelyThenThrowsException() {
+ custJsDO.validateCountryOfBirth = "bad country of birth";
+ final Country[] values = new Country[] { countryUsaDO };
+ for (final Country value : values) {
+ try {
+ custJsWO.setCountryOfBirth(value);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
+ assertThat(ex.getMessage(), Matchers.containsString("bad country of birth"));
+ }
+ }
+ }
+
+ @Test
+ public void whenAssociationNullOnOptionalThenDoesNotThrowException() {
+ final Country[] values = new Country[] { null };
+ for (final Country value : values) {
+ custJsDO.validateCountryOfBirth = "bad country of birth";
+ // should not throw exception
+ custJsWO.setCountryOfBirth(value);
+ }
+ }
+
+
+ @Ignore // different behaviour testing in Eclipse vs Maven (different exception type thrown); not sure why
+ @Test
+ public void whenAssociationNullOnMandatoryImperativelyThenThrowsException() {
+ custJsDO.validateCountryOfBirthMandatory = "bad country of birth";
+ final Country[] values = new Country[] { null };
+ for (final Country value : values) {
+ try {
+ custJsWO.setCountryOfBirthMandatory(value);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ //assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class)); // in Eclipse?
+ assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class)); // in Maven?
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth Mandatory"));
+ assertThat(ex.getMessage(), Matchers.containsString("bad country of birth"));
+ }
+ }
+ }
+
+
+
+ @Test
+ public void whenCollectionInvalidImperativelyThenAddToThrowsException() {
+ custJsDO.validateAddToVisitedCountries = "bad country";
+ try {
+ custJsWO.addToVisitedCountries(countryGbrDO);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(CollectionValidateAddToFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
+ assertThat(ex.getMessage(), Matchers.containsString("bad country"));
+ }
+ }
+
+ @Test
+ public void whenCollectionInvalidImperativelyThenRemoveFromThrowsException() {
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ custJsDO.validateRemoveFromVisitedCountries = "bad country";
+ try {
+ custJsWO.removeFromVisitedCountries(countryGbrDO);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(CollectionValidateRemoveFromFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
+ assertThat(ex.getMessage(), Matchers.containsString("bad country"));
+ }
+ }
+
+ @Test
+ public void whenActionInvalidImperativelyThenThrowsException() {
+ custJsDO.validatePlaceOrder = "can't place order";
+ try {
+ custJsWO.placeOrder(product355DO, 3);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(ActionValidationFacetViaMethod.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Order"));
+ assertThat(ex.getMessage(), Matchers.containsString("can't place order"));
+ }
+ }
+
+ @Test
+ public void whenValueCanSetNullOnOptionalField() {
+ custJsWO.setOptionalValue(null);
+ }
+
+ @Test
+ public void whenAssociationCanSetNullOnOptionalField() {
+ custJsWO.setOptionalAssociation(null);
+ }
+
+ @Test
+ public void whenValueInvalidMandatoryThenThrowsException() {
+ try {
+ custJsWO.setMandatoryValue(null);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Mandatory Value"));
+ }
+ }
+
+ @Test
+ public void whenAssociationInvalidMandatoryThenThrowsException() {
+ try {
+ custJsWO.setMandatoryAssociation(null);
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Mandatory Association"));
+ }
+ }
+
+ @Test
+ public void whenInvalidMaxLengthThenThrowsException() {
+ try {
+ custJsWO.setMaxLengthField("This is far too long");
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(MaxLengthFacetForMaxLengthAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Max Length Field"));
+ }
+ }
+
+ @Test
+ public void whenInvalidRegExCaseSensitiveThenThrowsException() {
+ try {
+ custJsWO.setRegExCaseSensitiveField("abCfoobar");
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Reg Ex Case Sensitive Field"));
+ }
+ }
+
+ @Test
+ public void whenCanSetValidRegExCaseSensitive() {
+ custJsWO.setRegExCaseInsensitiveField("abcfoobar");
+
+ }
+
+ @Test
+ public void whenInvalidRegExCaseInsensitiveThenThrowsException() {
+ try {
+ custJsWO.setRegExCaseInsensitiveField("abXfoobar");
+ fail("Should have thrown exception");
+ } catch (final InvalidException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(RegExFacetForRegExAnnotationOnProperty.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Reg Ex Case Insensitive Field"));
+ }
+ }
+
+ @Test
+ public void whenCanSetValidRegExCaseInsensitive() {
+ custJsWO.setRegExCaseInsensitiveField("AbCfoobar");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java
new file mode 100644
index 0000000..96fd0ff
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import org.apache.isis.applib.services.wrapper.InvalidException;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Order;
+
+public class MemberModifyTest extends AbstractTest {
+
+ @Test
+ public void valueModifiedToNonNull() {
+ custJsWO.setFirstName("Dick");
+
+ assertThat(custJsWO.getFirstName(), equalTo("Dick"));
+ }
+
+ @Test
+ public void valueModifiedToNull() {
+ custJsWO.setFirstName(null);
+
+ assertThat(custJsWO.getFirstName(), nullValue());
+ }
+
+ @Test
+ public void whenValueModifyCalledRatherThanSetForNonNull() {
+ custJsWO.setFirstName("Dick");
+ assertThat(custJsDO.modifyFirstNameCalled, is(true));
+ }
+
+ @Test
+ public void whenValueClearCalledRatherThanSetForNull() {
+ custJsWO.setFirstName(null);
+ assertThat(custJsDO.clearFirstNameCalled, is(true));
+ }
+
+ @Test
+ public void whenAssociationModifyCalledRatherThanSetForNonNull() {
+ custJsWO.setCountryOfBirth(countryUsaDO);
+ assertThat(custJsDO.modifyCountryOfBirthCalled, is(true));
+ }
+
+ @Test
+ public void whenAssociationClearCalledRatherThanSetForNull() {
+ custJsWO.setCountryOfBirth(null);
+ assertThat(custJsDO.clearCountryOfBirthCalled, is(true));
+ }
+
+ @Test
+ public void cannotUseAddDirectlyOnCollections() {
+ final List<Country> visitedCountries = custJsWO.getVisitedCountries();
+ try {
+ visitedCountries.add(countryGbrDO);
+ fail("UnsupportedOperationException should have been thrown.");
+ } catch (final UnsupportedOperationException ex) {
+ // expected
+ }
+ }
+
+ @Test
+ public void cannotUseRemoveDirectlyOnCollections() {
+ final List<Country> visitedCountries = custJsWO.getVisitedCountries();
+ try {
+ visitedCountries.remove(countryGbrDO);
+ fail("UnsupportedOperationException should have been thrown.");
+ } catch (final UnsupportedOperationException ex) {
+ // expected
+ }
+ }
+
+ @Test
+ public void cannotUseClearDirectlyOnCollections() {
+ final List<Country> visitedCountries = custJsWO.getVisitedCountries();
+ try {
+ visitedCountries.clear();
+ fail("UnsupportedOperationException should have been thrown.");
+ } catch (final UnsupportedOperationException ex) {
+ // expected
+ }
+ }
+
+ @Test
+ public void sttemptingToAddNullObjectIntoCollectionThrowsException() {
+ try {
+ custJsWO.addToVisitedCountries(null);
+ fail("Exception should have been raised.");
+ } catch (final IllegalArgumentException ex) {
+ // expected
+ }
+ }
+
+ @Test
+ public void removingNonExistentRemoveObjectFromCollectionDoesNothing() {
+ assertThat(custJsDO.getVisitedCountries().contains(countryGbrDO), is(false));
+
+ custJsWO.removeFromVisitedCountries(countryGbrDO);
+ // no exception raised.
+ }
+
+ @Test
+ public void canInvokeAction() {
+ final int sizeBefore = custJsWO.getOrders().size();
+ final Order orderBefore = custJsWO.getLastOrder();
+ custJsWO.placeOrder(product355DO, 3);
+ final Order orderAfter = custJsWO.getLastOrder();
+
+ final int sizeAfter = custJsWO.getOrders().size();
+ assertThat(sizeAfter, is(sizeBefore + 1));
+ assertThat(orderAfter, is(not(orderBefore)));
+ }
+
+ @Test
+ public void canInvokeActionIfOptionalValueParameterAndNullArgumentProvided() {
+ custJsWO.actionWithOptionalValueParameter(null);
+ assertThat(custJsDO.actionWithOptionalValueParameterArgument, nullValue());
+ }
+
+ @Test
+ public void cannotInvokeActionIfMandatoryValueParameterAndNullArgumentProvided() {
+ try {
+ custJsWO.actionWithMandatoryValueParameter(null);
+ fail("InvalidMandatoryException should have been thrown");
+ } catch (final InvalidException ex) {
+ assertThat(custJsDO.actionWithMandatoryValueParameterArgument, equalTo(Long.MAX_VALUE)); // ie
+ }
+ }
+
+ @Test
+ public void canInvokeActionIfOptionalReferenceParameterAndNullArgumentProvided() {
+ custJsWO.actionWithOptionalReferenceParameter(null);
+ assertThat(custJsDO.actionWithOptionalReferenceParameterArgument, nullValue());
+ }
+
+ @Test
+ public void cannotInvokeActionIfMandatoryReferenceParameterAndNullArgumentProvided() {
+ try {
+ custJsWO.actionWithMandatoryReferenceParameter(null);
+ fail("InvalidMandatoryException should have been thrown");
+ } catch (final InvalidException ex) {
+ assertThat(custJsDO.actionWithMandatoryReferenceParameterArgument, not(nullValue()));
+ }
+ }
+
+ @Test
+ public void canInvokeActionIfOptionalStringParameterAndEmptyStringProvidedAsArgument() {
+ custJsWO.actionWithOptionalStringParameter("");
+ assertThat(custJsDO.actionWithOptionalStringParameterArgument, equalTo(""));
+ }
+
+ @Test
+ public void cannotInvokeActionIfMandatoryStringParameterAndEmptyStringProvidedAsArgument() {
+ try {
+ custJsWO.actionWithMandatoryStringParameter("");
+ fail("InvalidMandatoryException should have been thrown");
+ } catch (final InvalidException ex) {
+ assertThat(custJsDO.actionWithMandatoryStringParameterArgument, equalTo("original value")); // ie
+ }
+ }
+
+ @Test
+ public void canInvokeActionIfParameterMatchRegularExpression() {
+ custJsWO.actionWithRegExStringParameter("6789");
+ assertThat(custJsDO.actionWithRegExStringParameterArgument, equalTo("6789"));
+ }
+
+ @Test
+ public void cannotInvokeActionIfParameterDoesNotMatchRegularExpression() {
+ try {
+ custJsWO.actionWithRegExStringParameter("abcd"); // doesn't match
+ // [0-9]{4}
+ fail("InvalidRegExException should have been thrown");
+ } catch (final InvalidException ex) {
+ assertThat(custJsDO.actionWithRegExStringParameterArgument, equalTo("1234")); // ie
+ // unchanged
+ }
+ }
+
+ @Test
+ public void canInvokeActionIfParameterNoLongerMaximumLength() {
+ custJsWO.actionWithMaxLengthStringParameter("abcd");
+ assertThat(custJsDO.actionWithMaxLengthStringParameterArgument, equalTo("abcd"));
+ }
+
+ @Test
+ public void cannotInvokeActionIfParameterExceedsMaximumLength() {
+ try {
+ custJsWO.actionWithMaxLengthStringParameter("abcde");
+ fail("InvalidMaxLengthException should have been thrown");
+ } catch (final InvalidException ex) {
+ assertThat(custJsDO.actionWithMaxLengthStringParameterArgument, equalTo("1234")); // ie
+ // unchanged
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java
new file mode 100644
index 0000000..17a39b0
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+
+public class MemberReadTest extends AbstractTest {
+
+ @Test
+ public void value() {
+ assertThat(custJsWO.getFirstName(), equalTo("Richard"));
+ }
+
+ @Test
+ public void valueWhenNull() {
+ custJsDO.setFirstName(null);
+ assertThat(custJsWO.getFirstName(), nullValue());
+ }
+
+ @Test
+ public void association() {
+ assertThat(custJsWO.getCountryOfBirth(), equalTo(countryGbrDO));
+ }
+
+ @Test
+ public void associationWhenNull() {
+ custJsDO.setCountryOfBirth(null);
+ assertThat(custJsWO.getCountryOfBirth(), nullValue());
+ }
+
+ @Test
+ public void collectionContainsWhenDoesAndDoesNot() {
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ custJsDO.addToVisitedCountries(countryUsaDO);
+ final List<Country> visitedCountries = custJsWO.getVisitedCountries();
+ assertThat(visitedCountries.contains(countryGbrDO), is(true));
+ assertThat(visitedCountries.contains(countryUsaDO), is(true));
+ assertThat(visitedCountries.contains(countryAusDO), is(false));
+ }
+
+ @Test
+ public void collectionSizeWhenEmpty() {
+ assertThat(custJsWO.getVisitedCountries().size(), is(0));
+ }
+
+ @Test
+ public void collectionSizeWhenNotEmpty() {
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ custJsDO.addToVisitedCountries(countryUsaDO);
+
+ assertThat(custJsWO.getVisitedCountries().size(), is(2));
+ }
+
+ @Test
+ public void isEmptySizeWhenEmpty() {
+ assertThat(custJsWO.getVisitedCountries().isEmpty(), is(true));
+ }
+
+ @Test
+ public void isEmptySizeWhenNotEmpty() {
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ custJsDO.addToVisitedCountries(countryUsaDO);
+
+ assertThat(custJsWO.getVisitedCountries().isEmpty(), is(false));
+ }
+
+}
[25/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..7a094f0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.greaterThan;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private UserResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getUserResource();
+ }
+
+
+ @Test
+ public void ok() throws Exception {
+
+ // given
+ final Response resp = resource.user();
+
+ // when
+ final RestfulResponse<UserRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(greaterThan(100)));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java
new file mode 100644
index 0000000..a737f94
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasParameter;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasSubType;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_ContentType_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private UserResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getUserResource();
+ }
+
+
+ @Test
+ public void ok() throws Exception {
+
+ // given
+ final Response resp = resource.user();
+
+ // when
+ final RestfulResponse<UserRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ final MediaType contentType = restfulResponse.getHeader(Header.CONTENT_TYPE);
+ assertThat(contentType, hasMediaType("application"));
+ assertThat(contentType, hasSubType("json"));
+ assertThat(contentType, hasParameter("profile", "urn:org.restfulobjects:repr-types/user"));
+ assertThat(contentType, is(RepresentationType.USER.getMediaType()));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..2054529
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "user");
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
new file mode 100644
index 0000000..aa01426
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private RestfulRequest request;
+ private RestfulResponse<UserRepresentation> restfulResponse;
+ private UserRepresentation repr;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ }
+
+ @Test
+ public void noFollow() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "user");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getSelf().getValue(), is(nullValue()));
+ assertThat(repr.getUp().getValue(), is(nullValue()));
+ }
+
+ @Test
+ public void self() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "user")
+ .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.SELF.getName() + "]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getSelf().getValue(), is(not(nullValue())));
+ }
+
+ @Test
+ public void up() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "user")
+ .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.UP.getName() + "]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getUp().getValue(), is(not(nullValue())));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java
new file mode 100644
index 0000000..e467907
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import javax.ws.rs.core.MediaType;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "user");
+ }
+
+ @Test
+ public void applicationJson_noProfile_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
+ final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.USER.getMediaType()));
+ }
+
+ @Test
+ public void applicationJson_profileUser_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
+ final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+ @Test
+ public void missingHeader_returns200() throws Exception {
+
+ final RestfulResponse<UserRepresentation> restfulResp = request.executeT();
+
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
new file mode 100644
index 0000000..ebf1b96
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import javax.ws.rs.core.MediaType;
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void applicationJson_profileIncorrect_returns406() throws Exception {
+
+ // given
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "user");
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
+
+ // when
+ final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+ @Test
+ public void incorrectMediaType_returns406() throws Exception {
+
+ // given
+ final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("user");
+ clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
+
+ // when
+ final ClientResponse<?> resp = clientRequest.get();
+ final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java
new file mode 100644
index 0000000..1fd9e68
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private UserResource userResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ userResource = client.getUserResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = userResource.user();
+ final RestfulResponse<UserRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final UserRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the user resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java
new file mode 100644
index 0000000..67df477
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private UserResource userResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ userResource = client.getUserResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = userResource.user();
+ final RestfulResponse<UserRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final UserRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation putLink = selfLink.withMethod(RestfulHttpMethod.PUT);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(putLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the user resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java
new file mode 100644
index 0000000..7114ab7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getVersionResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+
+ // given
+ final Response resp = resource.version();
+
+ final RestfulResponse<VersionRepresentation> jsonResp = RestfulResponse.ofT(resp);
+ final VersionRepresentation repr = jsonResp.getEntity();
+ final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the version resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
new file mode 100644
index 0000000..7c687cb
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getVersionResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
new file mode 100644
index 0000000..a202434
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getVersionResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java
new file mode 100644
index 0000000..e2b9276
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
+import static org.hamcrest.CoreMatchers.endsWith;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getVersionResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response servicesResp = resource.version();
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(servicesResp);
+ assertThat(restfulResponse.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+
+ final VersionRepresentation repr = restfulResponse.getEntity();
+ assertThat(repr, is(not(nullValue())));
+ assertThat(repr, isMap());
+
+ assertThat(repr.getSelf(), isLink(client)
+ .rel(Rel.SELF)
+ .href(endsWith(":39393/version"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.VERSION.getMediaType())
+ .returning(HttpStatusCode.OK)
+ );
+ assertThat(repr.getUp(), isLink(client)
+ .rel(Rel.UP)
+ .href(endsWith(":39393/"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.HOME_PAGE.getMediaType())
+ .returning(HttpStatusCode.OK)
+ );
+
+ assertThat(repr.getString("specVersion"), is("1.0.0"));
+ assertThat(repr.getString("implVersion"), is(not(nullValue())));
+ //assertThat(repr.getString("implVersion"), is(not("UNKNOWN")));
+
+ final JsonRepresentation optionalCapbilitiesRepr = repr.getOptionalCapabilities();
+ assertThat(optionalCapbilitiesRepr, isMap());
+
+ assertThat(optionalCapbilitiesRepr.getString("blobsClobs"), is("yes"));
+ assertThat(optionalCapbilitiesRepr.getString("deleteObjects"), is("yes"));
+ assertThat(optionalCapbilitiesRepr.getString("domainModel"), is("formal"));
+ assertThat(optionalCapbilitiesRepr.getString("validateOnly"), is("yes"));
+ assertThat(optionalCapbilitiesRepr.getString("protoPersistentObjects"), is("yes"));
+
+ assertThat(repr.getLinks(), isArray());
+ assertThat(repr.getExtensions(), is(not(nullValue())));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java
new file mode 100644
index 0000000..93cf511
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMaxAge;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_CacheControl_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getVersionResource();
+ }
+
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.version();
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ final CacheControl cacheControl = restfulResponse.getHeader(Header.CACHE_CONTROL);
+ assertThat(cacheControl, hasMaxAge(24 * 60 * 60));
+ assertThat(cacheControl.getMaxAge(), is(24 * 60 * 60));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..085eb69
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getVersionResource();
+ }
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.version();
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(100)));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java
new file mode 100644
index 0000000..70a1fb1
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasParameter;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasSubType;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_ContentType_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getVersionResource();
+ }
+
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.version();
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ final MediaType contentType = restfulResponse.getHeader(Header.CONTENT_TYPE);
+ assertThat(contentType, hasMediaType("application"));
+ assertThat(contentType, hasSubType("json"));
+ assertThat(contentType, hasParameter("profile", "urn:org.restfulobjects:repr-types/version"));
+ assertThat(contentType, is(RepresentationType.VERSION.getMediaType()));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..6787203
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ request = client.createRequest(RestfulHttpMethod.GET, "version");
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
new file mode 100644
index 0000000..bceefbf
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private RestfulRequest request;
+ private RestfulResponse<VersionRepresentation> restfulResponse;
+ private VersionRepresentation repr;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ }
+
+ @Test
+ public void noFollow() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "version");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getSelf().getValue(), is(nullValue()));
+ assertThat(repr.getUp().getValue(), is(nullValue()));
+ }
+
+ @Test
+ public void self() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "version")
+ .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.SELF.getName() + "]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getSelf().getValue(), is(not(nullValue())));
+ }
+
+ @Test
+ public void up() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "version")
+ .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.UP.getName() + "]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getUp().getValue(), is(not(nullValue())));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java
new file mode 100644
index 0000000..41657e2
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.MediaType;
+
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenRequestHeaders_Accept_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "version");
+ }
+
+ @Test
+ public void applicationJson_noProfile_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.VERSION.getMediaType()));
+ }
+
+
+ @Test
+ public void applicationJson_profileVersion_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+ @Test
+ public void missingHeader_returns200() throws Exception {
+
+ final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
+
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
new file mode 100644
index 0000000..2cc8d9f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import javax.ws.rs.core.MediaType;
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void applicationJson_profileIncorrect_returns406() throws Exception {
+
+ // given
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "version");
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+ @Test
+ public void incorrectMediaType_returnsNotAcceptable() throws Exception {
+
+ // given
+ final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("version");
+ clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
+
+ // when
+ final ClientResponse<?> resp = clientRequest.get();
+ final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java
new file mode 100644
index 0000000..4e067c7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getVersionResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response resp = resource.version();
+
+ final RestfulResponse<VersionRepresentation> jsonResp = RestfulResponse.ofT(resp);
+ final VersionRepresentation repr = jsonResp.getEntity();
+ final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the version resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java
new file mode 100644
index 0000000..7944cd6
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.version;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private VersionResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getVersionResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response resp = resource.version();
+
+ final RestfulResponse<VersionRepresentation> jsonResp = RestfulResponse.ofT(resp);
+ final VersionRepresentation repr = jsonResp.getEntity();
+ final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation putLink = selfLink.withMethod(RestfulHttpMethod.PUT);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(putLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the version resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch b/mothballed/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch
new file mode 100644
index 0000000..a50d466
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="isis-viewer-wicket-tck"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/pom.xml b/mothballed/tck/tck-viewer-wicket/pom.xml
new file mode 100644
index 0000000..0183d84
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/pom.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-tck-viewer-wicket</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+
+ <name>Isis TCK Wicket Viewer tests</name>
+
+
+ <properties>
+ <siteBaseDir>..</siteBaseDir>
+ <relativeUrl>wicket-tck/</relativeUrl>
+ <!-- until someone comes up with a better solution -->
+ <distMgmtSiteUrl>file:///tmp/m2-sites/isis/viewer/wicket</distMgmtSiteUrl>
+ </properties>
+
+ <packaging>war</packaging>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ <resource>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+
+ <!-- other modules in this project -->
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-dom</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-fixture</artifactId>
+ </dependency>
+
+ <!-- isis viewer -->
+ <dependency>
+ <groupId>org.apache.isis.viewer</groupId>
+ <artifactId>isis-viewer-wicket-impl</artifactId>
+ </dependency>
+
+ <!-- isis runtime -->
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-security</artifactId>
+ </dependency>
+
+ <!-- to run using WebServer -->
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-webserver</artifactId>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java b/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java
new file mode 100644
index 0000000..a6f375a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package viewer.wicket.app;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Module;
+import com.google.inject.util.Modules;
+
+import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
+
+public class TckApplication extends IsisWicketApplication {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ protected Module newIsisWicketModule() {
+ return Modules.override(super.newIsisWicketModule()).with(new AbstractModule() {
+ @Override
+ protected void configure() {
+ // bindConstant().annotatedWith(ApplicationCssUrl.class).to("myapp.css");
+ }
+ });
+ }
+}
[06/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java
deleted file mode 100644
index 2c21b50..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgSurplus_bad.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenScalarArg_whenArgSurplus_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args = JsonRepresentation.newMap();
- args.mapPut("from.value", 0);
- args.mapPut("to.value", 1);
- args.mapPut("nonExistent.value", 2);
- assertThat(args.size(), is(3));
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from.value", 0);
- args.mapPut("to.value", 1);
- args.mapPut("nonExistent.value", 2);
- assertThat(args.size(), is(3));
-
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("Argument 'nonExistent' found but no such parameter"));
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
-
- RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
- JsonRepresentation repr = restfulResponseOfError.getEntity();
-
- assertThat(repr.getString("x-ro-invalidReason"), is("Argument 'nonExistent' found but no such parameter"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java
deleted file mode 100644
index 8aa0734..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForAllArgs_whenArgFails_bad.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenValidationRuleForAllArgs_whenArgFails_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args.mapPut("from.value", 1);
- args.mapPut("to.value", 0);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from.value", 1);
- args.mapPut("to.value", 0);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("Validation failed, see body for details"));
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
-
- RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
- JsonRepresentation repr = restfulResponseOfError.getEntity();
-
- assertThat(repr.getString("x-ro-invalidReason"), is("'from' cannot be larger than 'to'"));
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java
deleted file mode 100644
index 1550dc3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenValidationRuleForSingleArg_whenArgFails_bad.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenValidationRuleForSingleArg_whenArgFails_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args.mapPut("from.value", -1);
- args.mapPut("to.value", 2);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsAValidationError(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from.value", -1);
- args.mapPut("to.value", 2);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- thenResponseIsAValidationError(restfulResponse);
- }
-
- private static void thenResponseIsAValidationError(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
-
- assertThat(restfulResponse.getHeader(Header.WARNING), containsString("Validation failed, see body for details"));
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
-
- RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
- JsonRepresentation repr = restfulResponseOfError.getEntity();
-
- assertThat(repr.getString("from.invalidReason"), is("Cannot be less than zero"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java
deleted file mode 100644
index 42f2942..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenViewModel_ok_TODO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenViewModel_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Ignore
- @Test
- public void usingClientFollow() throws Exception {
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java
deleted file mode 100644
index 4fd6d59..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRepresentation_containsSelfLink_ok.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.*;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.endsWith;
-
-public class Get_thenRepresentation_containsSelfLink_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findById");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final JsonRepresentation args =invokeLink.getArguments();
-
- // when
- args.mapPut("id.value", 1);
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(restfulResponse);
- }
-
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
-
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("id.value", 1);
-
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "findById", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
- }
-
- private void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws Exception {
-
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getSelf(), isLink()
- .rel(Rel.SELF)
- .href(endsWith(":39393/services/ActionsEntities/actions/findById/invoke"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.ACTION_RESULT.getMediaType())
- );
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java
deleted file mode 100644
index 50cb663..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenRespHeaders_ContentType_andContentLength_andRespCode_200_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/list/invoke"))
- .arguments(JsonRepresentation.newMap())
- .build());
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
-
- // then
- then(restfulResponse);
- }
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- then(restfulResponse);
- }
-
- private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index 78b051b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-
- @Ignore("TODO")
- @Test
- public void xxx() throws Exception {
-
- // 2.13
- // Cache-Control, also Pragma, Date, Expires
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java
deleted file mode 100644
index 89d5b70..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenArgIsValid_and_thenQueryArg_XroValidateOnly_2xx_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void success() throws Exception {
- // should return 204 (13.3)
- }
-
- @Ignore
- @Test
- public void failure() throws Exception {
- // should return 422, etc
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java
deleted file mode 100644
index 51388ff..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenCreatedNewObject_then_201_ok_TODO.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenCreatedNewObject_then_201_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
- // should return 201 (13.2)
- // if a newly created object
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 328ab78..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenErrorThrown_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenErrorThrown_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java
deleted file mode 100644
index fdaa10c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenInvalidArg_andQueryArg_XroValidateOnly_then_4xx_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void success() throws Exception {
- // should return 204 (13.3)
- }
-
- @Ignore
- @Test
- public void failure() throws Exception {
- // should return 422, etc
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
deleted file mode 100644
index 7fca5da..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenRepresentation_ok.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.*;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenList_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
-
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
- final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
-
- // then list value
- assertThat(listRepr.getValue(), is(not(nullValue())));
- assertThat(listRepr.getValue().size(), is(5));
-
- final JsonRepresentation domainObjectLinkRepr = listRepr.getValue().arrayGet(0);
-
- assertThat(domainObjectLinkRepr, is(not(nullValue())));
- assertThat(domainObjectLinkRepr, isLink()
- .rel(Rel.ELEMENT)
- .title("Untitled Actions Entity")
- .httpMethod(RestfulHttpMethod.GET)
- .href(matches("http://localhost:\\d+/objects/RTNE/79"))
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
- .arguments(JsonRepresentation.newMap())
- .build());
-
- // then list link element-type
- assertThat(listRepr.getLinks(), is(not(nullValue())));
- final LinkRepresentation elementTypeLink = listRepr.getLinkWithRel(Rel.ELEMENT_TYPE);
- assertThat(elementTypeLink, is(not(nullValue())));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index dcb366b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenList_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenList_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
- // 2.4.2, content-type should include "x-ro-element-type"
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java
deleted file mode 100644
index 9a85564..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-// Get_whenObject_isNotNull_thenRepr_ok_andRespHeaders_ContentType_andContentLength__andRespCode_200_ok
-public class Get_whenObject_isNotNull_thenRepr_andRespHeaders_and_200_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findById");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final JsonRepresentation args =invokeLink.getArguments();
-
- // when
- args.mapPut("id.value", 1);
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
-
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("id.value", 1);
-
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "findById", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- then(restfulResponse);
- }
-
- private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
-
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.DOMAIN_OBJECT));
- final DomainObjectRepresentation objRepr = actionResultRepr.getResult().as(DomainObjectRepresentation.class);
-
- assertThat(objRepr.getMembers(), is(not(nullValue())));
- assertThat(objRepr.getMembers().size(), is(IsisMatchers.greaterThan(0)));
-
- assertThat(objRepr.getTitle(), is(not(nullValue())));
-
- assertThat(objRepr.getLinks(), is(not(nullValue())));
- assertThat(objRepr.getMembers().size(), is(IsisMatchers.greaterThan(0)));
-
- assertThat(objRepr.getExtensions(), is(not(nullValue())));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java
deleted file mode 100644
index 37b1caf..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_isNull_thenRepresentation_ok.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenObject_isNull_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findById");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final JsonRepresentation args =invokeLink.getArguments();
-
- // when
- args.mapPut("id.value", 999);
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
-
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("id.value", 999);
-
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "findById", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- then(restfulResponse);
- }
-
- private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
-
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.DOMAIN_OBJECT));
- assertThat(actionResultRepr.getResult(), is(nullValue()));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 3caf190..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenObject_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenObject_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
- // 2.4.2, content-type should include "x-ro-domain-type"
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
deleted file mode 100644
index 290f9a8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java
deleted file mode 100644
index d15e148..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_whenRequestHeaders_Accept_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
deleted file mode 100644
index 75bb280..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_whenRequestHeaders_Accept_whenInvalid_406_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 13b3195..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenScalar_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index d558786..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 023d719..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 28921d3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenVoid_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index aaccf4b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
[05/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 6e702a4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void todo() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java
deleted file mode 100644
index 00450fa..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Ignore("to write - copied from req_safe")
- @Test
- public void usingClientFollow() throws Exception {
-
- // given, when
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- invokeLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- // not possible to test using resourceProxy
-
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java
deleted file mode 100644
index fa8e824..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Ignore("currently failing")
- @Test
- public void usingClientFollow() throws Exception {
-
- // given, when
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- invokeLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- // not possible to test using resourceProxy
-
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java
deleted file mode 100644
index c167c62..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import javax.ws.rs.core.Response;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_givenViewModel_then_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Ignore
- @Test
- public void usingClientFollow() throws Exception {
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java
deleted file mode 100644
index 8f898f3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-public class Post_thenRepresentation_doesNotContainSelfLink_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
-
- /**
- * Tests might change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findByIdNotIdempotent");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final JsonRepresentation args =invokeLink.getArguments();
-
- // when
- args.mapPut("id.value", 1);
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(restfulResponse);
- }
-
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- final JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("id.value", 1);
-
- final Response response = serviceResource.invokeAction("ActionsEntities", "findByIdNotIdempotent", JsonNodeUtils.asInputStream(args));
- final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
-
- }
-
- private void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws Exception {
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
- assertThat(actionResultRepr.mapHas("links[rel=self]"), is(false));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
deleted file mode 100644
index 2c1fc94..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.jboss.resteasy.client.core.executors.URLConnectionClientExecutor;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.tck.dom.refs.ParentEntity;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectCollectionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-/**
- * This test calls {@link ParentEntity#getChildren()} to retrieve the list of children,
- * then invokes {@link ParentEntity#removeChild(org.apache.isis.core.tck.dom.refs.ChildEntity)} to remove
- * one of the children (expoiting the fact that a list of {@link ParentEntity#choices0RemoveChild() choices} is
- * provided), then finally calls {@link ParentEntity#getChildren()} once more to confirm that one of the children has been removed.
- */
-public class Post_whenInvokeArgWithObjectReference_thenOK {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainObjectResource objectResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient(new URLConnectionClientExecutor());
- objectResource = client.getDomainObjectResource();
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- RestfulResponse<ObjectCollectionRepresentation> childrenRestfulResponse =
- RestfulResponse.ofT(objectResource.accessCollection("PRNT", "53", "children"));
- ObjectCollectionRepresentation childrenRepr = childrenRestfulResponse.getEntity();
-
- JsonRepresentation collValue = childrenRepr.getValue();
-
- final int numChildren = collValue.size();
- assertThat(numChildren, is(IsisMatchers.greaterThan(0)));
-
- final LinkRepresentation firstChildRepr = collValue.arrayIterator(LinkRepresentation.class).next();
-
- // when
- final RestfulResponse<ObjectActionRepresentation> removeChildRestfulResponse =
- RestfulResponse.ofT(objectResource.actionPrompt("PRNT", "53", "removeChild"));
- final ObjectActionRepresentation removeChildRepr = removeChildRestfulResponse.getEntity();
-
- LinkRepresentation invokeLinkRepr = removeChildRepr.getLinkWithRel(Rel.INVOKE);
- JsonRepresentation args = invokeLinkRepr.getArguments();
- args.mapPut("childEntity.value", firstChildRepr);
- RestfulResponse<JsonRepresentation> invokeResp = client.follow(invokeLinkRepr, args);
-
- @SuppressWarnings("unused")
- JsonRepresentation invokeRepr = invokeResp.getEntity();
- final HttpStatusCode status = invokeResp.getStatus();
- assertThat(status, is(HttpStatusCode.OK));
-
- // then
- childrenRestfulResponse =
- RestfulResponse.ofT(objectResource.accessCollection("PRNT", "53", "children"));
- childrenRepr = childrenRestfulResponse.getEntity();
-
- collValue = childrenRepr.getValue();
- assertThat(collValue.size(), is(numChildren-1));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java
deleted file mode 100644
index 2a06d0a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_whenRequestHeaders_Accept_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
deleted file mode 100644
index f3998aa..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Post_whenRequestHeaders_Accept_whenInvalid_406_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java
deleted file mode 100644
index 6f804d4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Ignore("to write - copied from req_safe")
- @Test
- public void usingClientFollow() throws Exception {
-
- // given, when
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- invokeLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- // not possible to test using resourceProxy
-
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java
deleted file mode 100644
index 6aba617..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_givenActionSemanticsOfSafe_then_405_bad_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Ignore("to write - copied from req_safe")
- @Test
- public void usingClientFollow() throws Exception {
-
- // given, when
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- invokeLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- // not possible to test using resourceProxy
-
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java
deleted file mode 100644
index 80aa93e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_givenViewModel_then_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Ignore
- @Test
- public void usingClientFollow() throws Exception {
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java
deleted file mode 100644
index 86355e7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-public class Put_thenRepresentation_doesNotContainSelfLink_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- /**
- * Tests might change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findByIdIdempotent");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final JsonRepresentation args =invokeLink.getArguments();
-
- // when
- args.mapPut("id.value", 1);
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(restfulResponse);
- }
-
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- final JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("id.value", 1);
-
- final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "findByIdIdempotent", JsonNodeUtils.asInputStream(args));
- final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
-
- }
-
- private void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws Exception {
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
- assertThat(actionResultRepr.getSelf(), is(nullValue()));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java
deleted file mode 100644
index be2dfda..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_whenRequestHeaders_Accept_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
deleted file mode 100644
index ed3c13f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Put_whenRequestHeaders_Accept_whenInvalid_406_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java
deleted file mode 100644
index fdd940e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import javax.ws.rs.core.Response;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-// ISIS-797
-public class Put_whenStringArgsContainsPlusSymbol_then_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- /**
- * Tests might change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- final JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("str1.value", "abc+def");
- args.mapPut("str2.value", "HOORAY");
-
- final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "concatenate", JsonNodeUtils.asInputStream(args));
- final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final ActionResultRepresentation entity = restfulResponse.getEntity();
- final ScalarValueRepresentation svr = entity.getResult().as(ScalarValueRepresentation.class);
- assertThat(svr.getValue().asString(), is("abc+defHOORAY"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java
deleted file mode 100644
index a8e6591..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import javax.ws.rs.core.Response;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_whenStringArgs_then_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- /**
- * Tests might change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "concatenate");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final JsonRepresentation args =invokeLink.getArguments();
-
- // when
- args.mapPut("str1.value", "IVA VENDITE 21%");
- args.mapPut("str2.value", "AAA");
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(restfulResponse, "IVA VENDITE 21%AAA");
- }
-
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- final JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("str1.value", "IVA VENDITE 21%");
- args.mapPut("str2.value", "AAA");
-
- final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "concatenate", JsonNodeUtils.asInputStream(args));
- final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse, "IVA VENDITE 21%AAA");
- }
-
- private void then(RestfulResponse<ActionResultRepresentation> restfulResponse, final String expected) throws Exception {
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final ActionResultRepresentation entity = restfulResponse.getEntity();
- final ScalarValueRepresentation svr = entity.getResult().as(ScalarValueRepresentation.class);
- assertThat(svr.getValue().asString(), is(expected));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java
deleted file mode 100644
index 7a1e97f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource domainServiceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainServiceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = domainServiceResource.service("ActionsEntities");
- final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation upLink = serviceRepr.getLinkWithRel(Rel.UP);
- final LinkRepresentation deleteLink = upLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the services resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
deleted file mode 100644
index fce2fc7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getDomainServiceResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
deleted file mode 100644
index 3c4824d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.*;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getDomainServiceResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java
deleted file mode 100644
index 02cefba..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.endsWith;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // when
- final Response response = resource.services();
- final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- final ListRepresentation repr = restfulResponse.getEntity();
-
- assertThat(repr, isMap());
-
- assertThat(repr.getSelf(), isLink(client)
- .rel(Rel.SELF)
- .href(endsWith(":39393/services"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.LIST.getMediaType())
- .returning(HttpStatusCode.OK)
- );
- assertThat(repr.getUp(), isLink(client)
- .rel(Rel.UP)
- .href(endsWith(":39393/"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.HOME_PAGE.getMediaType())
- .returning(HttpStatusCode.OK)
- );
-
- assertThat(repr.getValue(), isArray());
-
- assertThat(repr.getLinks(), isArray());
- assertThat(repr.getExtensions(), isMap());
- }
-
- @Test
- public void linksToDomainServiceResources() throws Exception {
-
- // given
- final RestfulResponse<ListRepresentation> jsonResp = RestfulResponse.ofT(resource.services());
- final ListRepresentation repr = jsonResp.getEntity();
-
- // when
- final JsonRepresentation values = repr.getValue();
-
- // then
- for (final LinkRepresentation link : values.arrayIterable(LinkRepresentation.class)) {
- assertThat("HiddenRepository should not show up in services list", false, is(link.getHref().endsWith("HiddenRepository")));
- }
-
- // and also
- for (final LinkRepresentation link : values.arrayIterable(LinkRepresentation.class)) {
-
- assertThat(link, isLink(client)
- .rel(containsString(Rel.SERVICE.getName()))
- .href(containsString(":39393/"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
- );
- assertThat(link, isLink(client)
- .returning(HttpStatusCode.OK)
- .responseEntityWithSelfHref(link.getHref())
- );
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java
deleted file mode 100644
index 041f2b4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMaxAge;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.CacheControl;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_CacheControl_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getDomainServiceResource();
- }
-
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.services();
-
- // when
- final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- final CacheControl cacheControl = restfulResponse.getHeader(Header.CACHE_CONTROL);
- assertThat(cacheControl, hasMaxAge(24 * 60 * 60));
- assertThat(cacheControl.getMaxAge(), is(24 * 60 * 60));
- }
-
-}
[20/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java
deleted file mode 100644
index 42cb18b..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture.scalars;
-
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.scalars.JodaValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.JodaValuedEntityRepository;
-
-public class JodaValuedEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- }
-
- private JodaValuedEntity createEntity() {
- final JodaValuedEntity jve = jodaValuesEntityRepository.newEntity();
- jve.setLocalDateProperty(new LocalDate(2008,3,21));
- jve.setLocalDateTimeProperty(new LocalDateTime(2009, 4, 29, 13, 45, 22));
- jve.setDateTimeProperty(new DateTime(2010, 3, 31, 9, 50, 43, DateTimeZone.UTC));
- return jve;
- }
-
- private JodaValuedEntityRepository jodaValuesEntityRepository;
-
- public void setJdkValuesEntityRepository(final JodaValuedEntityRepository jodaValuesEntityRepository) {
- this.jodaValuesEntityRepository = jodaValuesEntityRepository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java
deleted file mode 100644
index e9db111..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture.scalars;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-
-public class PrimitiveValuedEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- }
-
- private PrimitiveValuedEntity createEntity() {
- final PrimitiveValuedEntity pve = primitiveValuesEntityRepository.newEntity();
- pve.setBooleanProperty(true);
- pve.setByteProperty((byte)123);
- pve.setShortProperty((short)32123);
- pve.setCharProperty('a');
- pve.setIntProperty(987654321);
- pve.setLongProperty(2345678901234567890L);
- pve.setFloatProperty(12345678901234567890.1234567890F);
- pve.setDoubleProperty(12345678901234567890.1234567890);
- return pve;
- }
-
- private PrimitiveValuedEntityRepository primitiveValuesEntityRepository;
-
- public void setPrimitiveValuesEntityRepository(final PrimitiveValuedEntityRepository primitiveValuesEntityRepository) {
- this.primitiveValuesEntityRepository = primitiveValuesEntityRepository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java
deleted file mode 100644
index 0d9d869..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture.scalars;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntityRepository;
-
-public class WrapperValuedEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- }
-
- private WrapperValuedEntity createEntity() {
- final WrapperValuedEntity wve = wrapperValuesEntityRepository.newEntity();
- wve.setBooleanProperty(true);
- wve.setByteProperty((byte)123);
- wve.setShortProperty((short)32123);
- wve.setCharacterProperty('a');
- wve.setIntegerProperty(987654321);
- wve.setLongProperty(2345678901234567890L);
- wve.setFloatProperty(12345678901234567890.1234567890F);
- wve.setDoubleProperty(12345678901234567890.1234567890);
-
- return wve;
- }
-
- private WrapperValuedEntityRepository wrapperValuesEntityRepository;
-
- public void setPrimitiveValuesEntityRepository(final WrapperValuedEntityRepository wrapperValuesEntityRepository) {
- this.wrapperValuesEntityRepository = wrapperValuesEntityRepository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/lib/.gitignore
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/lib/.gitignore b/tck/tck-integtests/lib/.gitignore
deleted file mode 100644
index 4c21459..0000000
--- a/tck/tck-integtests/lib/.gitignore
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-
-#
-# explicitly ignoring Microsoft JDBC4 jar
-# (cannot redistribute, licensing)
-#
-sqljdbc4.jar
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/pom.xml
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/pom.xml b/tck/tck-integtests/pom.xml
deleted file mode 100644
index dee873d..0000000
--- a/tck/tck-integtests/pom.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-tck-integtests</artifactId>
- <name>Isis TCK IntegTests</name>
-
- <properties>
- <siteBaseDir>..</siteBaseDir>
- <relativeUrl>objectstore-jdo-datanucleus/</relativeUrl>
- </properties>
-
- <!-- used in Site generation for relative references. -->
- <url>http://isis.apache.org/${relativeUrl}</url>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/java</directory>
- <filtering>false</filtering>
- <includes>
- <include>**</include>
- </includes>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- <resource>
- <directory>src/main/resources</directory>
- <filtering>false</filtering>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
-
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-unittestsupport</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-runtime</artifactId>
- </dependency>
-
- <!-- other modules in this project -->
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-dom</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-fixture</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-integtestsupport</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.hsqldb</groupId>
- <artifactId>hsqldb</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!--
- <dependency>
- <groupId>com.microsoft.sqlserver</groupId>
- <artifactId>jdbc</artifactId>
- <version>4.0</version>
- <scope>system</scope>
- <optional>true</optional>
- <systemPath>${basedir}/lib/sqljdbc4.jar</systemPath>
- </dependency>
- -->
-
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java
deleted file mode 100644
index cd449c8..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixtures.java
+++ /dev/null
@@ -1,674 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport;
-
-import java.util.Arrays;
-import java.util.List;
-import com.google.common.collect.Lists;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.runner.Description;
-import org.junit.runners.model.Statement;
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.core.commons.authentication.AuthenticationSession;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures.Fixtures.Initialization;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.progmodel.ProgrammingModel;
-import org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.metamodel.specloader.validator.MetaModelValidator;
-import org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller;
-import org.apache.isis.core.runtime.authentication.AuthenticationManager;
-import org.apache.isis.core.runtime.authentication.AuthenticationRequest;
-import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
-import org.apache.isis.core.runtime.system.DeploymentType;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.ObjectStore;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.runtime.system.transaction.IsisTransaction;
-import org.apache.isis.core.runtime.system.transaction.IsisTransaction.State;
-import org.apache.isis.core.runtime.system.transaction.IsisTransactionManager;
-import org.apache.isis.core.security.authentication.AuthenticationRequestNameOnly;
-import org.apache.isis.core.tck.dom.refs.*;
-import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
-
-/**
- * Wraps a plain {@link IsisSystemDefault}, and provides a number of features to assist with testing.
- *
- * <p>
- * TODO: need to make inherit from the {@link IsisSystemForTest}.
- */
-public class IsisSystemWithFixtures implements org.junit.rules.TestRule {
-
-
- public interface Listener {
-
- void init(IsisConfiguration configuration) throws Exception;
-
- void preSetupSystem(boolean firstTime) throws Exception;
- void postSetupSystem(boolean firstTime) throws Exception;
-
- void preBounceSystem() throws Exception;
- void postBounceSystem() throws Exception;
-
- void preTeardownSystem() throws Exception;
- void postTeardownSystem() throws Exception;
-
- }
-
- public static abstract class ListenerAdapter implements Listener {
-
- private IsisConfiguration configuration;
-
- public void init(IsisConfiguration configuration) throws Exception {
- this.configuration = configuration;
- }
-
- protected IsisConfiguration getConfiguration() {
- return configuration;
- }
-
- @Override
- public void preSetupSystem(boolean firstTime) throws Exception {
- }
-
- @Override
- public void postSetupSystem(boolean firstTime) throws Exception {
- }
-
- @Override
- public void preBounceSystem() throws Exception {
- }
-
- @Override
- public void postBounceSystem() throws Exception {
- }
-
- @Override
- public void preTeardownSystem() throws Exception {
- }
-
- @Override
- public void postTeardownSystem() throws Exception {
- }
-
- }
-
-
-
- /**
- * A precanned set of fixtures for use by tests if desired.
- */
- public static class Fixtures {
-
- public enum Initialization {
- INIT,
- NO_INIT
- }
-
- public ParentEntityRepository associatedEntitiesRepository = new ParentEntityRepository();
-
- public ApplibValuedEntity ave1, ave2;
- public JdkValuedEntity jve1, jve2;
- public PrimitiveValuedEntity pve1, pve2;
- public WrapperValuedEntity wve1, wve2;
-
- public SimpleEntity smpl1, smpl2, smpl3, smpl4, smpl5, smpl6;
- public ReferencingEntity rfcg1, rfcg2, rfcg3, rfcg4, rfcg5, rfcg6;
- public ParentEntity prnt1, prnt2, prnt3, prnt4, prnt5, prnt6;
- public AggregatedEntity rfcg1_a1, rfcg1_a2, rfcg1_a3, prnt1_a1, prnt1_a2, prnt1_a3;
-
- private void init(DomainObjectContainer container) {
- ave1 = container.newTransientInstance(ApplibValuedEntity.class);
- ave2 = container.newTransientInstance(ApplibValuedEntity.class);
-
- jve1 = container.newTransientInstance(JdkValuedEntity.class);
- jve2 = container.newTransientInstance(JdkValuedEntity.class);
-
- pve1 = container.newTransientInstance(PrimitiveValuedEntity.class);
- pve2 = container.newTransientInstance(PrimitiveValuedEntity.class);
-
- wve1 = container.newTransientInstance(WrapperValuedEntity.class);
- wve2 = container.newTransientInstance(WrapperValuedEntity.class);
-
- smpl1 = container.newTransientInstance(SimpleEntity.class);smpl1.setName("1");
- smpl2 = container.newTransientInstance(SimpleEntity.class);smpl2.setName("2");
- smpl3 = container.newTransientInstance(SimpleEntity.class);smpl3.setName("3");
- smpl4 = container.newTransientInstance(SimpleEntity.class);smpl4.setName("4");
- smpl5 = container.newTransientInstance(SimpleEntity.class);smpl5.setName("5");
- smpl6 = container.newTransientInstance(SimpleEntity.class);smpl6.setName("6");
- rfcg1 = container.newTransientInstance(ReferencingEntity.class);
- rfcg2 = container.newTransientInstance(ReferencingEntity.class);
- rfcg3 = container.newTransientInstance(ReferencingEntity.class);
- rfcg4 = container.newTransientInstance(ReferencingEntity.class);
- rfcg5 = container.newTransientInstance(ReferencingEntity.class);
- rfcg6 = container.newTransientInstance(ReferencingEntity.class);
- prnt1 = container.newTransientInstance(ParentEntity.class);
- prnt2 = container.newTransientInstance(ParentEntity.class);
- prnt3 = container.newTransientInstance(ParentEntity.class);
- prnt4 = container.newTransientInstance(ParentEntity.class);
- prnt5 = container.newTransientInstance(ParentEntity.class);
- prnt6 = container.newTransientInstance(ParentEntity.class);
- rfcg1_a1 = container.newAggregatedInstance(rfcg1, AggregatedEntity.class);
- rfcg1_a2 = container.newAggregatedInstance(rfcg1, AggregatedEntity.class);
- rfcg1_a3 = container.newAggregatedInstance(rfcg1, AggregatedEntity.class);
- prnt1_a1 = container.newAggregatedInstance(prnt1, AggregatedEntity.class);
- prnt1_a2 = container.newAggregatedInstance(prnt1, AggregatedEntity.class);
- prnt1_a3 = container.newAggregatedInstance(prnt1, AggregatedEntity.class);
- }
- }
-
- private IsisSystemDefault isisSystem;
- private AuthenticationSession authenticationSession;
-
- // public visibility just to reduce noise in tests
- public DomainObjectContainer container;
- // public visibility just to reduce noise in tests
- public final Fixtures fixtures;
-
- private Initialization fixturesInitialization;
- private final IsisConfiguration configuration;
- private final PersistenceMechanismInstaller persistenceMechanismInstaller;
- private final AuthenticationRequest authenticationRequest;
- private final List<Object> services;
- private List <Listener> listeners;
- private final MetaModelValidator metaModelValidator;
- private final ProgrammingModel programmingModel;
-
-
- ////////////////////////////////////////////////////////////
- // constructor
- ////////////////////////////////////////////////////////////
-
- public static class Builder {
-
- private AuthenticationRequest authenticationRequest = new AuthenticationRequestNameOnly("tester");
-
- private Initialization fixturesInitialization = Initialization.INIT;
- private IsisConfiguration configuration;
- private PersistenceMechanismInstaller persistenceMechanismInstaller = new InMemoryPersistenceMechanismInstaller();
- private MetaModelValidator metaModelValidator;
- private ProgrammingModel programmingModel;
-
- private final List <Listener> listeners = Lists.newArrayList();
- private final List<Object> services = Lists.newArrayList();
-
- public Builder() {
- withServices(new DomainObjectContainerDefault());
- }
-
- public Builder with(IsisConfiguration configuration) {
- this.configuration = configuration;
- return this;
- }
-
- public Builder with(Initialization initialization) {
- this.fixturesInitialization = initialization;
- return this;
- }
-
- public Builder with(PersistenceMechanismInstaller persistenceMechanismInstaller) {
- this.persistenceMechanismInstaller = persistenceMechanismInstaller;
- return this;
- }
-
- public Builder with(AuthenticationRequest authenticationRequest) {
- this.authenticationRequest = authenticationRequest;
- return this;
- }
-
- public Builder withServices(Object... services) {
- this.services.addAll(0, Arrays.asList(services));
- return this;
- }
-
- public IsisSystemWithFixtures build() {
- return new IsisSystemWithFixtures(fixturesInitialization, configuration, programmingModel, metaModelValidator, persistenceMechanismInstaller, authenticationRequest, services, listeners);
- }
-
- public Builder with(Listener listener) {
- if(listener != null) {
- listeners.add(listener);
- }
- return this;
- }
-
- public Builder with(MetaModelValidator metaModelValidator) {
- this.metaModelValidator = metaModelValidator;
- return this;
- }
-
- public Builder with(ProgrammingModel programmingModel) {
- this.programmingModel = programmingModel;
- return this;
- }
- }
-
- public static Builder builder() {
- return new Builder();
- }
-
- private IsisSystemWithFixtures(Initialization fixturesInitialization, IsisConfiguration configuration, ProgrammingModel programmingModel, MetaModelValidator metaModelValidator, PersistenceMechanismInstaller persistenceMechanismInstaller, AuthenticationRequest authenticationRequest, List<Object> services, List<Listener> listeners) {
- this.fixturesInitialization = fixturesInitialization;
- this.configuration = configuration;
- this.programmingModel = programmingModel;
- this.metaModelValidator = metaModelValidator;
- this.persistenceMechanismInstaller = persistenceMechanismInstaller;
- this.authenticationRequest = authenticationRequest;
- this.fixtures = new Fixtures();
-
- // hacky
- services.add(fixtures.associatedEntitiesRepository);
- this.services = services;
-
- this.listeners = listeners;
-
- this.container = lookupContainer();
- }
-
-
- ////////////////////////////////////////////////////////////
- // setup, teardown
- ////////////////////////////////////////////////////////////
-
-
- /**
- * Intended to be called from a test's {@link Before} method.
- */
- public void setUpSystem() throws Exception {
- setUpSystem(FireListeners.FIRE);
- }
-
- private void setUpSystem(FireListeners fireListeners) throws Exception {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
-
- boolean firstTime = isisSystem == null;
- if (fireListeners.shouldFire()) {
- fireInitAndPreSetupSystem(firstTime);
- }
-
- if (firstTime) {
- isisSystem = createIsisSystem(services);
- isisSystem.init();
- IsisContext.closeSession();
- }
-
- final AuthenticationManager authenticationManager = isisSystem.getSessionFactory().getAuthenticationManager();
- authenticationSession = authenticationManager.authenticate(authenticationRequest);
-
- IsisContext.openSession(authenticationSession);
-
- DomainObjectContainer container = lookupContainer();
- if (firstTime && fixturesInitialization == Fixtures.Initialization.INIT) {
- fixtures.init(container);
- }
- if (fireListeners.shouldFire()) {
- firePostSetupSystem(firstTime);
- }
-
- }
-
- private DomainObjectContainer lookupContainer() {
- return lookupContainerIn(services);
- }
-
- private static DomainObjectContainer lookupContainerIn(List<Object> services1) {
- for (Object service : services1) {
- if(service instanceof DomainObjectContainer) {
- return (DomainObjectContainer) service;
- }
- }
- throw new IllegalStateException("Could not locate DomainObjectContainer");
- }
-
-
- private enum FireListeners {
- FIRE,
- DONT_FIRE;
- public boolean shouldFire() {
- return this == FIRE;
- }
- }
-
-
- /**
- * Intended to be called from a test's {@link After} method.
- */
- public void tearDownSystem() throws Exception {
- tearDownSystem(FireListeners.FIRE);
- }
-
- private void tearDownSystem(final FireListeners fireListeners) throws Exception {
- if(fireListeners.shouldFire()) {
- firePreTeardownSystem();
- }
- IsisContext.closeSession();
- if(fireListeners.shouldFire()) {
- firePostTeardownSystem();
- }
- }
-
- public void bounceSystem() throws Exception {
- firePreBounceSystem();
- tearDownSystem(FireListeners.DONT_FIRE);
- setUpSystem(FireListeners.DONT_FIRE);
- firePostBounceSystem();
- }
-
-
- private IsisSystemDefault createIsisSystem(List<Object> services) {
- final IsisSystemDefault system = new IsisSystemDefault(DeploymentType.UNIT_TESTING, services) {
- @Override
- public IsisConfiguration getConfiguration() {
- if(IsisSystemWithFixtures.this.configuration != null) {
- return IsisSystemWithFixtures.this.configuration;
- } else {
- return super.getConfiguration();
- }
- }
- @Override
- protected ProgrammingModel obtainReflectorProgrammingModel() {
- if(IsisSystemWithFixtures.this.programmingModel != null) {
- return IsisSystemWithFixtures.this.programmingModel;
- } else {
- return super.obtainReflectorProgrammingModel();
- }
- }
- @Override
- protected MetaModelValidator obtainReflectorMetaModelValidator() {
- if(IsisSystemWithFixtures.this.metaModelValidator != null) {
- return IsisSystemWithFixtures.this.metaModelValidator;
- } else {
- return super.obtainReflectorMetaModelValidator();
- }
- }
- @Override
- protected PersistenceMechanismInstaller obtainPersistenceMechanismInstaller(IsisConfiguration configuration) {
- final PersistenceMechanismInstaller installer = IsisSystemWithFixtures.this.persistenceMechanismInstaller;
- configuration.injectInto(installer);
- return installer;
- }
- };
- return system;
- }
-
-
-
- ////////////////////////////////////////////////////////////
- // listeners
- ////////////////////////////////////////////////////////////
-
- private void fireInitAndPreSetupSystem(boolean firstTime) throws Exception {
- if(firstTime) {
- for(Listener listener: listeners) {
- listener.init(configuration);
- }
- }
- for(Listener listener: listeners) {
- listener.preSetupSystem(firstTime);
- }
- }
-
- private void firePostSetupSystem(boolean firstTime) throws Exception {
- for(Listener listener: listeners) {
- listener.postSetupSystem(firstTime);
- }
- }
-
- private void firePreTeardownSystem() throws Exception {
- for(Listener listener: listeners) {
- listener.preTeardownSystem();
- }
- }
-
- private void firePostTeardownSystem() throws Exception {
- for(Listener listener: listeners) {
- listener.postTeardownSystem();
- }
- }
-
- private void firePreBounceSystem() throws Exception {
- for(Listener listener: listeners) {
- listener.preBounceSystem();
- }
- }
-
- private void firePostBounceSystem() throws Exception {
- for(Listener listener: listeners) {
- listener.postBounceSystem();
- }
- }
-
-
- ////////////////////////////////////////////////////////////
- // properties
- ////////////////////////////////////////////////////////////
-
- /**
- * The {@link IsisSystemDefault} created during {@link #setUpSystem()}.
- */
- public IsisSystemDefault getIsisSystem() {
- return isisSystem;
- }
-
- /**
- * The {@link AuthenticationSession} created during {@link #setUpSystem()}.
- */
- public AuthenticationSession getAuthenticationSession() {
- return authenticationSession;
- }
-
-
-
- ////////////////////////////////////////////////////////////
- // Convenience for tests
- ////////////////////////////////////////////////////////////
-
- public ObjectSpecification loadSpecification(Class<?> cls) {
- return getIsisSystem().getSessionFactory().getSpecificationLoader().loadSpecification(cls);
- }
-
- public ObjectAdapter persist(Object domainObject) {
- ensureSessionInProgress();
- ensureObjectIsNotPersistent(domainObject);
- container.persist(domainObject);
- return adapterFor(domainObject);
- }
-
- public ObjectAdapter destroy(Object domainObject ) {
- ensureSessionInProgress();
- ensureObjectIsPersistent(domainObject);
- container.remove(domainObject);
- return adapterFor(domainObject);
- }
-
- public ObjectAdapter adapterFor(Object domainObject) {
- ensureSessionInProgress();
- return getAdapterManager().adapterFor(domainObject);
- }
-
- public ObjectAdapter reload(RootOid oid) {
- ensureSessionInProgress();
- final PersistenceSession persistenceSession = getPersistenceSession();
- return persistenceSession.loadObject(oid);
- }
-
- public ObjectAdapter recreateAdapter(RootOid oid) {
- ensureSessionInProgress();
- return getAdapterManager().adapterFor(oid);
- }
-
- public ObjectAdapter remapAsPersistent(Object pojo, RootOid persistentOid) {
- ensureSessionInProgress();
- ensureObjectIsNotPersistent(pojo);
- final ObjectAdapter adapter = adapterFor(pojo);
- getPersistenceSession().getAdapterManager().remapAsPersistent(adapter, persistentOid);
- return adapter;
- }
-
- @SuppressWarnings("unchecked")
- public <T extends ObjectStore> T getObjectStore(Class<T> cls) {
- final PersistenceSession persistenceSession = getPersistenceSession();
- return (T) persistenceSession.getObjectStore();
- }
-
- private static void ensureSessionInProgress() {
- if(!IsisContext.inSession()) {
- throw new IllegalStateException("Session must be in progress");
- }
- }
-
- private void ensureObjectIsNotPersistent(Object domainObject) {
- if(container.isPersistent(domainObject)) {
- throw new IllegalArgumentException("domain object is already persistent");
- }
- }
-
- private void ensureObjectIsPersistent(Object domainObject) {
- if(!container.isPersistent(domainObject)) {
- throw new IllegalArgumentException("domain object is not persistent");
- }
- }
-
- ////////////////////////////////////////////////////////////
- // JUnit @Rule integration
- ////////////////////////////////////////////////////////////
-
- @Override
- public Statement apply(final Statement base, Description description) {
- return new Statement() {
- @Override
- public void evaluate() throws Throwable {
- setUpSystem();
- try {
- base.evaluate();
- tearDownSystem();
- } catch(Throwable ex) {
- try {
- tearDownSystem();
- } catch(Exception ex2) {
- // ignore, since already one pending
- }
- throw ex;
- }
- }
- };
- }
-
-
-
- public void beginTran() {
- final IsisTransactionManager transactionManager = getTransactionManager();
- final IsisTransaction transaction = transactionManager.getTransaction();
-
- if(transaction == null) {
- transactionManager.startTransaction();
- return;
- }
-
- final State state = transaction.getState();
- switch(state) {
- case COMMITTED:
- case ABORTED:
- transactionManager.startTransaction();
- break;
- case IN_PROGRESS:
- // nothing to do
- break;
- case MUST_ABORT:
- Assert.fail("Transaction is in state of '" + state + "'");
- break;
- default:
- Assert.fail("Unknown transaction state '" + state + "'");
- }
-
- }
-
- public void commitTran() {
- final IsisTransactionManager transactionManager = getTransactionManager();
- final IsisTransaction transaction = transactionManager.getTransaction();
- if(transaction == null) {
- Assert.fail("No transaction exists");
- return;
- }
- final State state = transaction.getState();
- switch(state) {
- case COMMITTED:
- case ABORTED:
- case MUST_ABORT:
- Assert.fail("Transaction is in state of '" + state + "'");
- break;
- case IN_PROGRESS:
- transactionManager.endTransaction();
- break;
- default:
- Assert.fail("Unknown transaction state '" + state + "'");
- }
- }
-
- public void abortTran() {
- final IsisTransactionManager transactionManager = getTransactionManager();
- final IsisTransaction transaction = transactionManager.getTransaction();
- if(transaction == null) {
- Assert.fail("No transaction exists");
- return;
- }
- final State state = transaction.getState();
- switch(state) {
- case ABORTED:
- break;
- case COMMITTED:
- Assert.fail("Transaction is in state of '" + state + "'");
- break;
- case MUST_ABORT:
- case IN_PROGRESS:
- transactionManager.abortTransaction();
- break;
- default:
- Assert.fail("Unknown transaction state '" + state + "'");
- }
- }
-
- protected IsisTransactionManager getTransactionManager() {
- return getPersistenceSession().getTransactionManager();
- }
-
- public PersistenceSession getPersistor() {
- return getPersistenceSession();
- }
-
- public AdapterManager getAdapterManager() {
- return getPersistor().getAdapterManager();
- }
-
- protected PersistenceSession getPersistenceSession() {
- return IsisContext.getPersistenceSession();
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java
deleted file mode 100644
index ac72288..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/IsisSystemWithFixturesTest_basicTest.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
-
-public class IsisSystemWithFixturesTest_basicTest {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- @Test
- public void savePojo() throws Exception {
-
- iswf.beginTran();
- assertThat(iswf.container.allInstances(JdkValuedEntity.class).size(), is(0));
-
- iswf.container.persist(iswf.fixtures.jve1);
-
- assertThat(iswf.container.allInstances(JdkValuedEntity.class).size(), is(1));
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java
deleted file mode 100644
index 010c130..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/AbstractTest.java
+++ /dev/null
@@ -1,140 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.runner.RunWith;
-import org.apache.isis.applib.DomainObjectContainer;
-import org.apache.isis.applib.services.eventbus.EventBusService;
-import org.apache.isis.applib.services.wrapper.WrapperFactory;
-import org.apache.isis.applib.services.wrapper.WrapperObject;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Product;
-import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.CountriesFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.CustomerOrdersFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.CustomersFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.fixtures.ProductsFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.CountryRepository;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.CustomerRepository;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.OrderRepository;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.ProductRepository;
-import org.apache.isis.core.wrapper.WrapperFactoryDefault;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-@RunWith(IsisTestRunner.class)
-@Fixtures({ @Fixture(CountriesFixture.class), @Fixture(ProductsFixture.class), @Fixture(CustomersFixture.class), @Fixture(CustomerOrdersFixture.class) })
-@Services({ @Service(CountryRepository.class), @Service(ProductRepository.class), @Service(CustomerRepository.class), @Service(OrderRepository.class), @Service(WrapperFactoryDefault.class), @Service(EventBusService.Noop.class) })
-public abstract class AbstractTest {
-
- protected Customer custJsDO;
- protected Customer custJsWO;
-
- protected Product product355DO;
- protected Product product355WO;
-
- protected Product product850DO;
-
- protected Country countryGbrDO;
- protected Country countryGbrWO;
-
- protected Country countryUsaDO;
- protected Country countryAusDO;
-
- private ProductRepository productRepository;
- private CustomerRepository customerRepository;
- private CountryRepository countryRepository;
-
- private DomainObjectContainer domainObjectContainer;
- private WrapperFactory wrapperFactory;
-
- @Before
- public void setUp() {
-
- product355DO = productRepository.findByCode("355-40311");
- product355WO = wrapperFactory.wrap(product355DO);
- product850DO = productRepository.findByCode("850-18003");
-
- countryGbrDO = countryRepository.findByCode("GBR");
- countryGbrWO = wrapperFactory.wrap(countryGbrDO);
-
- countryUsaDO = countryRepository.findByCode("USA");
- countryAusDO = countryRepository.findByCode("AUS");
-
- custJsDO = customerRepository.findByName("Pawson");
- custJsWO = wrapperFactory.wrap(custJsDO);
-
- assertThat(product355WO instanceof WrapperObject, is(true));
- assertThat(countryGbrWO instanceof WrapperObject, is(true));
- assertThat(custJsWO instanceof WrapperObject, is(true));
- }
-
- @After
- public void tearDown() {
- }
-
- // //////////////////////////////////////////////////////
- // Injected.
- // //////////////////////////////////////////////////////
-
- protected WrapperFactory getWrapperFactory() {
- return wrapperFactory;
- }
-
- public void setWrapperFactory(final WrapperFactory headlessViewer) {
- this.wrapperFactory = headlessViewer;
- }
-
- protected DomainObjectContainer getDomainObjectContainer() {
- return domainObjectContainer;
- }
-
- public void setDomainObjectContainer(final DomainObjectContainer domainObjectContainer) {
- this.domainObjectContainer = domainObjectContainer;
- }
-
- protected ProductRepository getProductRepository() {
- return productRepository;
- }
-
- public void setProductRepository(final ProductRepository productRepository) {
- this.productRepository = productRepository;
- }
-
- protected CustomerRepository getCustomerRepository() {
- return customerRepository;
- }
-
- public void setCustomerRepository(final CustomerRepository customerRepository) {
- this.customerRepository = customerRepository;
- }
-
- protected CountryRepository getCountryRepository() {
- return countryRepository;
- }
-
- public void setCountryRepository(final CountryRepository countryRepository) {
- this.countryRepository = countryRepository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java
deleted file mode 100644
index edcc3a3..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/DefaultAndChoicesTest.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Ignore;
-import org.junit.Test;
-
-public class DefaultAndChoicesTest extends AbstractTest {
-
- @Test
- public void defaults() {
- final Object[] defaultPlaceOrder = custJsWO.defaultPlaceOrder();
- assertThat(defaultPlaceOrder.length, is(2));
- }
-
- @Ignore("not yet tested")
- @Test
- public void choicesDefaults() {
- // not tested.
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java
deleted file mode 100644
index 8669781..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/InteractionListenerTest.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.notNullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-import org.apache.isis.applib.events.InteractionEvent;
-import org.apache.isis.applib.events.PropertyAccessEvent;
-import org.apache.isis.applib.services.wrapper.listeners.InteractionAdapter;
-import org.apache.isis.applib.services.wrapper.listeners.InteractionListener;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-
-public class InteractionListenerTest extends AbstractTest {
-
- @Test
- public void shouldBeAbleToAddListener() {
- final Customer proxiedCustRP = getWrapperFactory().wrap(custJsDO);
- final InteractionEvent[] events = { null };
- final InteractionListener l = new InteractionAdapter() {
- @Override
- public void propertyAccessed(final PropertyAccessEvent ev) {
- events[0] = ev;
- }
- };
- getWrapperFactory().addInteractionListener(l);
-
- proxiedCustRP.getFirstName();
- assertThat(events[0], notNullValue());
- final PropertyAccessEvent ev = (PropertyAccessEvent) events[0];
- assertThat(ev.getMemberNaturalName(), is("First Name"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java
deleted file mode 100644
index b4a27e0..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberDisabledTest.java
+++ /dev/null
@@ -1,132 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import org.hamcrest.Matchers;
-import org.junit.Test;
-
-import org.apache.isis.applib.services.wrapper.DisabledException;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Order;
-import org.apache.isis.core.metamodel.facets.properties.property.disabled.DisabledFacetForDisabledAnnotationOnProperty;
-import org.apache.isis.core.metamodel.facets.members.disabled.method.DisableForContextFacetViaMethod;
-
-public class MemberDisabledTest extends AbstractTest {
-
- @Test
- public void whenValueDisabledForValueThenThrowsException() {
- custJsDO.disableFirstName = "cannot alter";
- try {
- custJsWO.setFirstName("Dick");
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
- assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
- }
- }
-
- @Test
- public void whenValueDisabledForNullThenThrowsException() {
- custJsDO.disableFirstName = "cannot alter";
- try {
- custJsWO.setFirstName(null);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
- assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
- }
- }
-
- @Test
- public void whenAssociationDisabledForReferenceThenThrowsException() {
- custJsDO.disableCountryOfBirth = "cannot alter";
- try {
- custJsWO.setCountryOfBirth(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
- assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
- }
- }
-
- @Test
- public void whenAssociationDisabledForNullThenThrowsException() {
- custJsDO.disableCountryOfBirth = "cannot alter";
- try {
- custJsWO.setCountryOfBirth(null);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
- assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
- }
- }
-
- @Test
- public void whenCollectionDisabledThenAddToThrowsException() {
- final List<Order> orders = custJsWO.getOrders();
- final Order order = orders.get(0);
- try {
- custJsWO.addToMoreOrders(order);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetForDisabledAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("More Orders"));
- assertThat(ex.getMessage(), Matchers.containsString("Always disabled"));
- }
- }
-
- @Test
- public void whenCollectionDisabledThenRemovefromThrowsException() {
- custJsDO.addToVisitedCountries(countryUsaDO);
- custJsDO.disableVisitedCountries = "cannot alter";
- try {
- custJsWO.removeFromVisitedCountries(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
- assertThat(ex.getMessage(), Matchers.containsString("cannot alter"));
- }
- }
-
- @Test
- public void whenActionDisabledThenThrowsException() {
- custJsDO.disablePlaceOrder = "cannot invoke";
- try {
- custJsWO.placeOrder(product355DO, 3);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisableForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Order"));
- assertThat(ex.getMessage(), Matchers.containsString("cannot invoke"));
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java
deleted file mode 100644
index f2bf3e4..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberHiddenTest.java
+++ /dev/null
@@ -1,356 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import org.junit.Test;
-import org.apache.isis.applib.services.wrapper.HiddenException;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-import org.apache.isis.core.metamodel.facets.properties.property.hidden.HiddenFacetForHiddenAnnotationOnProperty;
-import org.apache.isis.core.metamodel.facets.members.hidden.forsession.HideForSessionFacetViaMethod;
-import org.apache.isis.core.metamodel.facets.members.hidden.method.HideForContextFacetViaMethod;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-public class MemberHiddenTest extends AbstractTest {
-
- @Test
- public void whenValueHiddenImperativelyForValueThenModifyThrowsException() {
- custJsDO.hideFirstName = true;
- try {
- custJsWO.setFirstName("Dick");
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
- }
- }
-
- @Test
- public void whenValueHiddenImperativelyForNullThenModifyThrowsException() {
- custJsDO.hideFirstName = true;
- try {
- custJsWO.setFirstName("Dick");
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
- }
- }
-
- @Test
- public void whenValueHiddenImperativelyThenReadThrowsException() {
- custJsDO.hideFirstName = true;
- try {
- custJsWO.getFirstName();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
- }
- }
-
- @Test
- public void whenAssociationHiddenImperativelyForValueThenModifyThrowsException() {
- custJsDO.hideCountryOfBirth = true;
- try {
- custJsWO.setCountryOfBirth(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
- }
- }
-
- @Test
- public void whenAssociationHiddenImperativelyForNullThenModifyThrowsException() {
- custJsDO.hideCountryOfBirth = true;
- try {
- custJsWO.setCountryOfBirth(null);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
- }
- }
-
- @Test
- public void whenAssociationHiddenImperativelyThenReadThrowsException() {
- custJsDO.hideCountryOfBirth = true;
- try {
- custJsWO.getCountryOfBirth();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
- }
- }
-
- @Test
- public void whenIfCollectionHiddenImperativelyThenAddToThrowsException() {
- custJsDO.hideVisitedCountries = true;
- try {
- custJsWO.addToVisitedCountries(countryGbrDO);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
- }
- }
-
- @Test
- public void whenCollectionHiddenImperativelyThenRemoveFromThrowsException() {
- custJsDO.hideVisitedCountries = true;
- custJsDO.addToVisitedCountries(countryGbrDO);
- try {
- custJsWO.removeFromVisitedCountries(countryGbrDO);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
- }
- }
-
- @Test
- public void whenCollectionHiddenImperativelyThenReadThrowsException() {
- custJsDO.hideVisitedCountries = true;
- custJsDO.addToVisitedCountries(countryGbrDO);
- try {
- custJsWO.getVisitedCountries();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
- }
- }
-
- @Test
- public void whenActionHiddenImperativelyThenThrowsException() {
- custJsDO.hidePlaceOrder = true;
- try {
- custJsWO.placeOrder(product355DO, 3);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForContextFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Order"));
- }
- }
-
- @Test
- public void whenValueHiddenDeclarativelyForValueThenModifyThrowsException() {
- try {
- custJsWO.setAlwaysHiddenValue("Dick");
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Value"));
- }
- }
-
- @Test
- public void whenValueHiddenDeclarativelyForNullThenModifyThrowsException() {
- try {
- custJsWO.setAlwaysHiddenValue(null);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Value"));
- }
- }
-
- @Test
- public void whenValueHiddenDeclarativelyThenReadThrowsException() {
- try {
- custJsWO.getAlwaysHiddenValue();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Value"));
- }
- }
-
- @Test
- public void whenAssociationHiddenDeclarativelyThenModifyThrowsException() {
- final Country[] values = new Country[] { countryUsaDO, null };
- for (final Country value : values) {
- try {
- custJsWO.setAlwaysHiddenAssociation(value);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Association"));
- }
- }
- }
-
- @Test
- public void whenAssociationHiddenDeclarativelyThenReadThrowsException() {
- try {
- custJsWO.getAlwaysHiddenAssociation();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Association"));
- }
- }
-
- @Test
- public void whenCollectionHiddenDeclarativelyThenAddToThrowsException() {
- try {
- custJsWO.addToAlwaysHiddenCollection(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Collection"));
- }
- }
-
- @Test
- public void whenCollectionHiddenDeclarativelyThenRemoveFromThrowsException() {
- custJsDO.removeFromAlwaysHiddenCollection(countryUsaDO);
- try {
- custJsWO.removeFromAlwaysHiddenCollection(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Collection"));
- }
- }
-
- @Test
- public void whenCollectionHiddenDeclarativelyThenReadThrowsException() {
- try {
- custJsWO.getAlwaysHiddenCollection();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Collection"));
- }
- }
-
- @Test
- public void whenActionHiddenDeclarativelyThenThrowsException() {
- try {
- custJsWO.alwaysHiddenAction();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HiddenFacetForHiddenAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Always Hidden Action"));
- }
- }
-
- @Test
- public void whenValueHiddenNotAuthorizedThenModifyThrowsException() {
- final String[] values = new String[] { "Dick", null };
- for (final String value : values) {
- try {
- custJsWO.setSessionHiddenValue(value);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Value"));
- }
- }
- }
-
- @Test
- public void whenValueHiddenNotAuthorizedThenReadThrowsException() {
- try {
- custJsWO.getSessionHiddenValue();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Value"));
- }
- }
-
- @Test
- public void whenAssociationHiddenNotAuthorizedThenModifyThrowsException() {
- final Country[] values = new Country[] { countryUsaDO, null };
- for (final Country value : values) {
- try {
- custJsWO.setSessionHiddenAssociation(value);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Association"));
- }
- }
- }
-
- @Test
- public void whenAssociationHiddenNotAuthorizedThenReadThrowsException() {
- try {
- custJsWO.getSessionHiddenAssociation();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Association"));
- }
- }
-
- @Test
- public void whenCollectionHiddenNotAuthorizedThenAddToThrowsException() {
- try {
- custJsWO.addToSessionHiddenCollection(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Collection"));
- }
- }
-
- @Test
- public void whenCollectionHiddenNotAuthorizedThenRemoveFromThrowsException() {
- custJsDO.addToSessionHiddenCollection(countryUsaDO);
- try {
- custJsWO.removeFromSessionHiddenCollection(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Collection"));
- }
- }
-
- @Test
- public void whenCollectionHiddenNotAuthorizedThenReadThrowsException() {
- try {
- custJsWO.getSessionHiddenCollection();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Collection"));
- }
- }
-
- @Test
- public void whenActionHiddenNotAuthorizedThenThrowsException() {
- try {
- custJsWO.sessionHiddenAction();
- fail("Should have thrown exception");
- } catch (final HiddenException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(HideForSessionFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Session Hidden Action"));
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java
deleted file mode 100644
index cd17d79..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberInvalidTest.java
+++ /dev/null
@@ -1,255 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import org.hamcrest.Matchers;
-import org.junit.Ignore;
-import org.junit.Test;
-
-import org.apache.isis.applib.services.wrapper.InvalidException;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForMaxLengthAnnotationOnProperty;
-import org.apache.isis.core.metamodel.facets.properties.property.regex.RegExFacetForRegExAnnotationOnProperty;
-import org.apache.isis.core.metamodel.facets.objectvalue.mandatory.MandatoryFacetDefault;
-import org.apache.isis.core.metamodel.facets.actions.validate.method.ActionValidationFacetViaMethod;
-import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateAddToFacetViaMethod;
-import org.apache.isis.core.metamodel.facets.collections.validate.CollectionValidateRemoveFromFacetViaMethod;
-import org.apache.isis.core.metamodel.facets.properties.validating.method.PropertyValidateFacetViaMethod;
-
-public class MemberInvalidTest extends AbstractTest {
-
- @Test
- public void whenValueInvalidImperativelyThenThrowsException() {
- final String[] values = new String[] { "Dick", "Harry" };
- for (final String value : values) {
- custJsDO.validateFirstNameExpectedArg = value;
- custJsDO.validateFirstName = "bad first name";
- try {
- custJsWO.setFirstName(value);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name"));
- assertThat(ex.getMessage(), Matchers.containsString("bad first name"));
- }
- }
- }
-
- @Test
- public void whenValueNullThenDoesNotThrowException() {
- final String[] values = new String[] { null };
- for (final String value : values) {
- custJsDO.validateFirstNameExpectedArg = value;
- custJsDO.validateFirstName = "bad first name";
- // should not trigger exception
- custJsWO.setFirstName(value);
- }
- }
-
-
- @Ignore // different behaviour testing in Eclipse vs Maven (different exception type thrown); not sure why
- @Test
- public void whenValueInvalidImperativelyOnMandatoryThenThrowsException() {
- final String[] values = new String[] { null };
- for (final String value : values) {
- custJsDO.validateFirstNameMandatoryExpectedArg = value;
- custJsDO.validateFirstNameMandatory = "bad first name";
- try {
- custJsWO.setFirstNameMandatory(value);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- //assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class)); // in Eclipse?
- assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class)); // in Maven?
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("First Name Mandatory"));
- assertThat(ex.getMessage(), Matchers.containsString("bad first name"));
- }
- }
- }
-
-
-
- @Test
- public void whenAssociationInvalidImperativelyThenThrowsException() {
- custJsDO.validateCountryOfBirth = "bad country of birth";
- final Country[] values = new Country[] { countryUsaDO };
- for (final Country value : values) {
- try {
- custJsWO.setCountryOfBirth(value);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth"));
- assertThat(ex.getMessage(), Matchers.containsString("bad country of birth"));
- }
- }
- }
-
- @Test
- public void whenAssociationNullOnOptionalThenDoesNotThrowException() {
- final Country[] values = new Country[] { null };
- for (final Country value : values) {
- custJsDO.validateCountryOfBirth = "bad country of birth";
- // should not throw exception
- custJsWO.setCountryOfBirth(value);
- }
- }
-
-
- @Ignore // different behaviour testing in Eclipse vs Maven (different exception type thrown); not sure why
- @Test
- public void whenAssociationNullOnMandatoryImperativelyThenThrowsException() {
- custJsDO.validateCountryOfBirthMandatory = "bad country of birth";
- final Country[] values = new Country[] { null };
- for (final Country value : values) {
- try {
- custJsWO.setCountryOfBirthMandatory(value);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- //assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class)); // in Eclipse?
- assertThat(ex.getAdvisorClass(), classEqualTo(PropertyValidateFacetViaMethod.class)); // in Maven?
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Country Of Birth Mandatory"));
- assertThat(ex.getMessage(), Matchers.containsString("bad country of birth"));
- }
- }
- }
-
-
-
- @Test
- public void whenCollectionInvalidImperativelyThenAddToThrowsException() {
- custJsDO.validateAddToVisitedCountries = "bad country";
- try {
- custJsWO.addToVisitedCountries(countryGbrDO);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(CollectionValidateAddToFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
- assertThat(ex.getMessage(), Matchers.containsString("bad country"));
- }
- }
-
- @Test
- public void whenCollectionInvalidImperativelyThenRemoveFromThrowsException() {
- custJsDO.addToVisitedCountries(countryGbrDO);
- custJsDO.validateRemoveFromVisitedCountries = "bad country";
- try {
- custJsWO.removeFromVisitedCountries(countryGbrDO);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(CollectionValidateRemoveFromFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Visited Countries"));
- assertThat(ex.getMessage(), Matchers.containsString("bad country"));
- }
- }
-
- @Test
- public void whenActionInvalidImperativelyThenThrowsException() {
- custJsDO.validatePlaceOrder = "can't place order";
- try {
- custJsWO.placeOrder(product355DO, 3);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(ActionValidationFacetViaMethod.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Order"));
- assertThat(ex.getMessage(), Matchers.containsString("can't place order"));
- }
- }
-
- @Test
- public void whenValueCanSetNullOnOptionalField() {
- custJsWO.setOptionalValue(null);
- }
-
- @Test
- public void whenAssociationCanSetNullOnOptionalField() {
- custJsWO.setOptionalAssociation(null);
- }
-
- @Test
- public void whenValueInvalidMandatoryThenThrowsException() {
- try {
- custJsWO.setMandatoryValue(null);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Mandatory Value"));
- }
- }
-
- @Test
- public void whenAssociationInvalidMandatoryThenThrowsException() {
- try {
- custJsWO.setMandatoryAssociation(null);
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(MandatoryFacetDefault.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Mandatory Association"));
- }
- }
-
- @Test
- public void whenInvalidMaxLengthThenThrowsException() {
- try {
- custJsWO.setMaxLengthField("This is far too long");
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(MaxLengthFacetForMaxLengthAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Max Length Field"));
- }
- }
-
- @Test
- public void whenInvalidRegExCaseSensitiveThenThrowsException() {
- try {
- custJsWO.setRegExCaseSensitiveField("abCfoobar");
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Reg Ex Case Sensitive Field"));
- }
- }
-
- @Test
- public void whenCanSetValidRegExCaseSensitive() {
- custJsWO.setRegExCaseInsensitiveField("abcfoobar");
-
- }
-
- @Test
- public void whenInvalidRegExCaseInsensitiveThenThrowsException() {
- try {
- custJsWO.setRegExCaseInsensitiveField("abXfoobar");
- fail("Should have thrown exception");
- } catch (final InvalidException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(RegExFacetForRegExAnnotationOnProperty.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Reg Ex Case Insensitive Field"));
- }
- }
-
- @Test
- public void whenCanSetValidRegExCaseInsensitive() {
- custJsWO.setRegExCaseInsensitiveField("AbCfoobar");
- }
-
-}
[33/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java
new file mode 100644
index 0000000..59ff384
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Delete_whenDoesntExistOid_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java
new file mode 100644
index 0000000..8b79a0a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Delete_whenDoesntExistProp_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..9fa170b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Get_givenDisabled_thenRepresentation_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..3f9076d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..c0a479c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..ce2fe98
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenViewModel_thenRepresentation_ok_TODO {
+
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Ignore("TODO")
+ @Test
+ public void representation() throws Exception {
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
new file mode 100644
index 0000000..60968e3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenRepresentation_ok {
+
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Test
+ public void representation() throws Exception {
+
+ // when
+ final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
+ final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
+ assertThat(idPropertyJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ // then
+ final ObjectPropertyRepresentation propertyRepr = idPropertyJsonResp.getEntity();
+
+ assertThat(propertyRepr.getString("memberType"), is("property"));
+
+ // self link
+ final LinkRepresentation selfLink = propertyRepr.getLinkWithRel(Rel.SELF);
+ assertThat(selfLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt"))
+ .returning(HttpStatusCode.OK)
+ .build());
+
+ // up link
+ final LinkRepresentation upLink = propertyRepr.getLinkWithRel(Rel.UP);
+ assertThat(upLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68"))
+ .returning(HttpStatusCode.OK)
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
+ .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/68/properties/anInt"))
+ .build());
+
+ assertThat(modifyLink.getArguments(), is(not(nullValue())));
+ assertThat(modifyLink.getArguments().isArray(), is(false));
+ assertThat(modifyLink.getArguments().size(), is(1));
+
+ //clear link
+ final LinkRepresentation clearLink = propertyRepr.getLinkWithRel(Rel.CLEAR);
+ assertThat(clearLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.DELETE)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType())
+ .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt"))
+ .build());
+
+ // described by link
+ final LinkRepresentation describedByLink = propertyRepr.getLinkWithRel(Rel.DESCRIBEDBY);
+ assertThat(describedByLink, isLink(client)
+ .returning(HttpStatusCode.OK)
+ .responseEntityWithSelfHref(describedByLink.getHref())
+ .build());
+
+ assertThat(propertyRepr.getInt("value"), is(42));
+ assertThat(propertyRepr.getString("format"),is("int"));
+ assertThat(propertyRepr.getString("extensions.x-isis-format"), is("int"));
+ assertThat(propertyRepr.getExtensions(), isMap());
+ assertThat(propertyRepr.getExtensions().getArray("changed").isArray(), is(true));
+ assertThat(propertyRepr.getExtensions().getArray("disposed").isArray(), is(true));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..00b2de8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..e7c8614
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Test
+ public void propertyDetails() throws Exception {
+
+ // when
+ final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
+ //given
+ final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
+ //then
+ assertThat(idPropertyJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..68eeefa
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..9b77eff
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Get_thenResponseHeaders_eTag_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java
new file mode 100644
index 0000000..275e202
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_then_200_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Test
+ public void propertyDetails() throws Exception {
+
+ // when
+ final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
+ final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
+ assertThat(idPropertyJsonResp.getStatus(), is(HttpStatusCode.OK));
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java
new file mode 100644
index 0000000..2fb3e8c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Get_whenArg_then_405_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java
new file mode 100644
index 0000000..df55dee
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+public class Get_whenDoesntExistOid_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private LinkRepresentation link;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ link = new LinkRepresentation();
+ }
+
+ @Test
+ public void whenObjectDoesntExist() throws Exception {
+
+ // given
+ link.withHref("http://localhost:39393/objects/PRMV/nonExistent/properties/booleanProperty");
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResp = client.follow(link);
+
+ // then
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java
new file mode 100644
index 0000000..a6397f3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenDoesntExistProp_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private LinkRepresentation link;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ link = new LinkRepresentation();
+ }
+
+ @Test
+ public void whenPropertyDoesntExist() throws Exception {
+
+ Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+
+ // given
+ final LinkRepresentation linkToExistingObject = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+ link.withHref(linkToExistingObject.getHref() + "/properties/nonExistentProperty");
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResp = client.follow(link);
+
+ // then
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
+
+ Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java
new file mode 100644
index 0000000..e6b1115
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenHiddenProp_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void returns404() throws Exception {
+
+ // given
+ RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/properties/invisibleProperty");
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..8f87283
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ request = client.createRequest(RestfulHttpMethod.GET, "/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt");
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<ObjectPropertyRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<ObjectPropertyRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
new file mode 100644
index 0000000..ce85061
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java
new file mode 100644
index 0000000..7b6bd70
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import javax.ws.rs.core.MediaType;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt");
+ }
+
+ @Test
+ public void applicationJson_noProfile_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+
+ @Test
+ public void applicationJson_profileObjectProperty_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.OBJECT_PROPERTY.getMediaType());
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+ @Test
+ public void missingHeader_returns200() throws Exception {
+
+ final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
+
+ assertThat(restfulResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java
new file mode 100644
index 0000000..6dce0fa
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import javax.ws.rs.core.MediaType;
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_whenInvalid_406 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void applicationJson_profileIncorrect_returns406() throws Exception {
+
+ // given
+ RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/55/properties/anInt");
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+ @Test
+ public void incorrectMediaType_returnsNotAcceptable() throws Exception {
+
+ // given
+ final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/55/properties/anInt");
+ clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
+
+ // when
+ final ClientResponse<?> resp = clientRequest.get();
+ final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..49e8c1b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..6e5e668
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..b304818
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java
new file mode 100644
index 0000000..fe7dd9c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
+ final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
+ final ObjectPropertyRepresentation propertyRepr = idPropertyJsonResp.getEntity();
+ final LinkRepresentation selfLink = propertyRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to a property resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java
new file mode 100644
index 0000000..0c29429
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_givenDisabled_thenResponseCode_203_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
new file mode 100644
index 0000000..869f8b9
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
new file mode 100644
index 0000000..ae1414e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..cc5c809
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_givenViewModel_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..152f7b0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..3309a2c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
[48/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
ISIS-1178: mothballing the tck tests.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/93a1d5cc
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/93a1d5cc
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/93a1d5cc
Branch: refs/heads/master
Commit: 93a1d5cce0346779fdbb638f077a7b889364c259
Parents: d5e7c90
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Sat Jul 25 10:17:47 2015 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Sat Jul 25 10:17:47 2015 +0100
----------------------------------------------------------------------
mothballed/tck/pom.xml | 226 +++++
mothballed/tck/tck-dom/.gitignore | 19 +
mothballed/tck/tck-dom/log4j.properties | 40 +
mothballed/tck/tck-dom/pom.xml | 137 +++
.../appended-resources/supplemental-models.xml | 8 +
.../core/tck/dom/AbstractEntityRepository.java | 74 ++
.../core/tck/dom/actions/ActionsEntity.java | 76 ++
.../dom/actions/ActionsEntityRepository.java | 126 +++
.../core/tck/dom/busrules/BusRulesEntity.java | 165 ++++
.../tck/dom/busrules/BusRulesEntityChild.java | 55 ++
.../dom/busrules/BusRulesEntityRepository.java | 68 ++
.../core/tck/dom/claimapp/claims/Approver.java | 24 +
.../core/tck/dom/claimapp/claims/Claim.java | 239 +++++
.../core/tck/dom/claimapp/claims/ClaimItem.java | 77 ++
.../dom/claimapp/claims/ClaimRepository.java | 36 +
.../claimapp/claims/ClaimRepositoryImpl.java | 46 +
.../core/tck/dom/claimapp/claims/Claimant.java | 26 +
.../tck/dom/claimapp/employees/Employee.java | 120 +++
.../claimapp/employees/EmployeeRepository.java | 32 +
.../employees/EmployeeRepositoryImpl.java | 35 +
.../core/tck/dom/defaults/HiddenRepository.java | 31 +
.../tck/dom/defaults/WithDefaultsEntity.java | 112 +++
.../defaults/WithDefaultsEntityRepository.java | 58 ++
.../apache/isis/core/tck/dom/movies/Movie.java | 68 ++
.../tck/dom/movies/MovieDomainRepository.java | 50 ++
.../apache/isis/core/tck/dom/movies/Person.java | 54 ++
.../apache/isis/core/tck/dom/movies/Role.java | 54 ++
.../apache/isis/core/tck/dom/poly/Empty.java | 23 +
.../dom/poly/EmptyEntityWithOwnProperty.java | 36 +
.../dom/poly/ReferencingPolyTypesEntity.java | 110 +++
.../tck/dom/poly/SelfReferencingEntity.java | 85 ++
.../core/tck/dom/poly/StringBaseEntity.java | 50 ++
.../core/tck/dom/poly/StringBaseEntitySub.java | 49 +
.../tck/dom/poly/StringBaseEntitySubThree.java | 44 +
.../tck/dom/poly/StringBaseEntitySubTwo.java | 48 +
.../isis/core/tck/dom/poly/Stringable.java | 24 +
.../StringableEntityWithOwnDerivedProperty.java | 41 +
.../poly/StringableEntityWithOwnProperties.java | 71 ++
.../poly/StringableEntityWithOwnProperty.java | 51 ++
.../core/tck/dom/refs/AggregatedEntity.java | 47 +
.../isis/core/tck/dom/refs/BaseEntity.java | 26 +
.../tck/dom/refs/BidirWithListChildEntity.java | 94 ++
.../tck/dom/refs/BidirWithListParentEntity.java | 99 +++
.../BidirWithListParentEntityRepository.java | 45 +
.../tck/dom/refs/BidirWithSetChildEntity.java | 93 ++
.../tck/dom/refs/BidirWithSetParentEntity.java | 100 +++
.../BidirWithSetParentEntityRepository.java | 45 +
.../isis/core/tck/dom/refs/ChildEntity.java | 88 ++
.../isis/core/tck/dom/refs/ParentEntity.java | 128 +++
.../tck/dom/refs/ParentEntityRepository.java | 51 ++
.../core/tck/dom/refs/PolyClassChildEntity.java | 96 ++
.../tck/dom/refs/PolyClassParentEntity.java | 125 +++
.../refs/PolyClassParentEntityRepository.java | 52 ++
.../tck/dom/refs/PolyClassSubtype1Entity.java | 52 ++
.../tck/dom/refs/PolyClassSubtype2Entity.java | 52 ++
.../tck/dom/refs/PolyClassSubtype3Entity.java | 53 ++
.../isis/core/tck/dom/refs/PolyInterface.java | 30 +
.../dom/refs/PolyInterfaceIdentityStrategy.java | 30 +
...lyInterfaceIdentityStrategyParentEntity.java | 129 +++
...eIdentityStrategyParentEntityRepository.java | 52 ++
...InterfaceIdentityStrategySubtype1Entity.java | 86 ++
...InterfaceIdentityStrategySubtype2Entity.java | 86 ++
...InterfaceIdentityStrategySubtype3Entity.java | 87 ++
.../tck/dom/refs/PolyInterfaceParentEntity.java | 127 +++
.../PolyInterfaceParentEntityRepository.java | 52 ++
.../dom/refs/PolyInterfaceSubtype1Entity.java | 86 ++
.../dom/refs/PolyInterfaceSubtype2Entity.java | 86 ++
.../dom/refs/PolyInterfaceSubtype3Entity.java | 87 ++
.../core/tck/dom/refs/ReferencingEntity.java | 95 ++
.../isis/core/tck/dom/refs/SimpleEntity.java | 104 +++
.../core/tck/dom/refs/UnidirFkChildEntity.java | 52 ++
.../core/tck/dom/refs/UnidirFkParentEntity.java | 101 +++
.../refs/UnidirFkParentEntityRepository.java | 45 +
.../tck/dom/refs/UnidirJoinChildEntity.java | 52 ++
.../tck/dom/refs/UnidirJoinParentEntity.java | 103 +++
.../refs/UnidirJoinParentEntityRepository.java | 45 +
.../tck/dom/refs/UnidirReferencedEntity.java | 52 ++
.../refs/UnidirReferencedEntityRepository.java | 45 +
.../tck/dom/refs/UnidirReferencingEntity.java | 66 ++
.../refs/UnidirReferencingEntityRepository.java | 45 +
.../tck/dom/scalars/ApplibValuedEntity.java | 267 ++++++
.../scalars/ApplibValuedEntityRepository.java | 45 +
.../tck/dom/scalars/AutoAssignedEntity.java | 53 ++
.../scalars/AutoAssignedEntityRepository.java | 43 +
.../tck/dom/scalars/DateTimeValuedEntity.java | 171 ++++
.../scalars/DateTimeValuedEntityRepository.java | 44 +
.../core/tck/dom/scalars/JdkValuedEntity.java | 201 +++++
.../dom/scalars/JdkValuedEntityRepository.java | 46 +
.../core/tck/dom/scalars/JodaValuedEntity.java | 126 +++
.../dom/scalars/JodaValuedEntityRepository.java | 46 +
.../isis/core/tck/dom/scalars/MyEnum.java | 29 +
.../tck/dom/scalars/PrimitiveValuedEntity.java | 214 +++++
.../PrimitiveValuedEntityRepository.java | 43 +
.../tck/dom/scalars/WrapperValuedEntity.java | 229 +++++
.../scalars/WrapperValuedEntityRepository.java | 46 +
.../dom/sqlos/SqlDomainObjectRepository.java | 175 ++++
.../core/tck/dom/sqlos/data/SimpleClass.java | 61 ++
.../core/tck/dom/sqlos/data/SimpleClassTwo.java | 75 ++
.../core/tck/dom/sqlos/data/SqlDataClass.java | 338 +++++++
.../tck/dom/viewmodels/SimpleViewModel.java | 61 ++
.../apache/isis/core/tck/dom/xmlos/Person.java | 27 +
.../apache/isis/core/tck/dom/xmlos/Role.java | 53 ++
.../apache/isis/core/tck/dom/xmlos/Team.java | 27 +
.../tck/dom/xmlos/TeamDomainRepository.java | 50 ++
.../src/main/resources/images/ToDoItem.gif | Bin 0 -> 1592 bytes
mothballed/tck/tck-fixture/pom.xml | 38 +
.../core/tck/fixture/LogonAsSvenFixture.java | 30 +
.../fixture/actions/ActionsEntityFixture.java | 52 ++
.../fixture/busrules/BusRulesEntityFixture.java | 50 ++
.../defaults/WithDefaultsEntityFixture.java | 50 ++
.../tck/fixture/refs/ParentEntitiesFixture.java | 50 ++
.../scalars/ApplibValuedEntityFixture.java | 47 +
.../scalars/DateTimeValuedEntityFixture.java | 47 +
.../fixture/scalars/JdkValuedEntityFixture.java | 81 ++
.../scalars/JodaValuedEntityFixture.java | 55 ++
.../scalars/PrimitiveValuedEntityFixture.java | 56 ++
.../scalars/WrapperValuedEntityFixture.java | 57 ++
mothballed/tck/tck-integtests/lib/.gitignore | 24 +
mothballed/tck/tck-integtests/pom.xml | 116 +++
.../IsisSystemWithFixtures.java | 674 ++++++++++++++
.../IsisSystemWithFixturesTest_basicTest.java | 47 +
.../integtestsupport/legacy/AbstractTest.java | 140 +++
.../legacy/DefaultAndChoicesTest.java | 42 +
.../legacy/InteractionListenerTest.java | 54 ++
.../legacy/MemberDisabledTest.java | 132 +++
.../legacy/MemberHiddenTest.java | 356 ++++++++
.../legacy/MemberInvalidTest.java | 255 ++++++
.../legacy/MemberModifyTest.java | 223 +++++
.../integtestsupport/legacy/MemberReadTest.java | 93 ++
.../legacy/ObjectImmutableTest.java | 87 ++
.../legacy/SaveObjectsTest.java | 113 +++
.../core/integtestsupport/legacy/TitleTest.java | 33 +
.../integtestsupport/legacy/ViewObjectTest.java | 91 ++
.../legacy/sample/domain/Country.java | 155 ++++
.../legacy/sample/domain/Customer.java | 889 +++++++++++++++++++
.../legacy/sample/domain/Order.java | 185 ++++
.../legacy/sample/domain/Product.java | 186 ++++
.../sample/fixtures/CountriesFixture.java | 65 ++
.../sample/fixtures/CustomerOrdersFixture.java | 107 +++
.../sample/fixtures/CustomersFixture.java | 89 ++
.../sample/fixtures/JoeBloggsFixture.java | 30 +
.../legacy/sample/fixtures/ProductsFixture.java | 73 ++
.../sample/service/CountryRepository.java | 81 ++
.../sample/service/CustomerRepository.java | 117 +++
.../legacy/sample/service/OrderRepository.java | 68 ++
.../sample/service/ProductRepository.java | 104 +++
.../PersistorSessionHydratorTest.java | 122 +++
.../persistence/RuntimeTestPojo.java | 52 ++
.../tck/ObjectStoreContractTest_persist.java | 176 ++++
.../InMemoryObjectStoreTest_debug.java | 78 ++
.../InMemoryObjectStoreTest_init.java | 44 +
.../InMemoryObjectStoreTest_name.java | 41 +
.../InMemoryObjectStoreTest_openAndClose.java | 119 +++
.../InMemoryObjectStoreTest_persist.java | 37 +
...MemoryObjectStoreTest_persistAggregated.java | 55 ++
.../InMemoryObjectStoreTest_reset.java | 80 ++
.../InMemoryObjectStoreTest_retrieve.java | 166 ++++
...InMemoryObjectStoreTest_serviceRegistry.java | 113 +++
.../ObjectFixtureFilePersistorTest.java | 222 +++++
.../ObjectFixtureServiceTest_loadFile.java | 88 ++
...xtureServiceTest_loadFile_nothingExists.java | 73 ++
.../ObjectFixtureServiceTest_save.java | 84 ++
.../isis/core/runtime/memento/MementoTest.java | 221 +++++
.../core/runtime/memento/MementoTest_data.java | 93 ++
.../memento/MementoTest_encodedData.java | 80 ++
...rsistenceMechanismInstallerTest_getName.java | 46 +
...sistenceMechanismInstallerTest_services.java | 62 ++
.../isis/objectstore/jdo/datanucleus/Utils.java | 124 +++
.../spi/JdoObjectIdSerializerTest.java | 150 ++++
.../adaptermanager/Persistence_lazyLoading.java | 84 ++
.../adaptermanager/Persistence_loadObject.java | 102 +++
.../Persistence_persistentAdapterFor.java | 115 +++
...Persistence_persist_bidirWithListParent.java | 86 ++
.../Persistence_persist_bidirWithSetParent.java | 127 +++
.../refs/Persistence_persist_polyclass.java | 94 ++
.../refs/Persistence_persist_polyinter.java | 95 ++
...tence_persist_polyinterIdentityStrategy.java | 94 ++
.../refs/Persistence_persist_referencing.java | 133 +++
.../refs/Persistence_persist_unidir.java | 128 +++
.../refs/Persistence_persist_unidirJoin.java | 128 +++
...Persistence_update_using_domMethodCalls.java | 108 +++
.../scalar/Persistence_allInstances.java | 86 ++
.../scalar/Persistence_bounceSystem.java | 44 +
.../scalar/Persistence_findInstance.java | 67 ++
.../scalar/Persistence_namedQuery_all.java | 108 +++
.../Persistence_namedQuery_firstOnly.java | 112 +++
...nce_persistAndUpdate_applibValuedEntity.java | 92 ++
...stence_persistAndUpdate_jdkValuedEntity.java | 117 +++
...istence_persistAndUpdate_objectAdapters.java | 112 +++
..._persistAndUpdate_primitiveValuedEntity.java | 119 +++
...ce_persistAndUpdate_wrapperValuedEntity.java | 118 +++
...nce_persist_dataStoreAssignedPrimaryKey.java | 59 ++
.../README-testcases.md | 80 ++
.../eclipse/launch/viewer-restful-tck.launch | 19 +
.../tck/tck-viewer-restfulobjects/pom.xml | 119 +++
.../isis/viewer/restfulobjects/tck/Dummy.java | 24 +
.../src/main/webapp/WEB-INF/isis.properties | 42 +
.../src/main/webapp/WEB-INF/logging.properties | 30 +
.../src/main/webapp/WEB-INF/web.xml | 141 +++
.../restfulobjects/tck/IsisWebServerRule.java | 83 ++
.../restfulobjects/tck/RelTest_matches.java | 50 ++
.../restfulobjects/tck/RestfulMatchers.java | 660 ++++++++++++++
.../isis/viewer/restfulobjects/tck/Util.java | 152 ++++
.../tck/all/stories/UserStoryTest_TOFIX.java | 86 ++
.../tck/any/NotAuthorizedTest_TODO.java | 51 ++
.../AnyResourceTest_serverSideException.java | 63 ++
.../domainobject/oid/Delete_then_405_bad.java | 65 ++
...enDisabledMembers_thenRepresentation_ok.java | 80 ++
...hemeIsFormal_thenRepresentation_ok_TODO.java | 52 ++
...hemeIsSimple_thenRepresentation_ok_TODO.java | 52 ++
...EntityWithActions_thenRepresentation_ok.java | 94 ++
...ibProperties_thenRepresentation_ok_TODO.java | 80 ++
...hCollections_thenRepresentation_ok_TODO.java | 74 ++
...WithJdkProperties_thenRepresentation_ok.java | 160 ++++
...ithJodaProperties_thenRepresentation_ok.java | 122 +++
...imitiveProperties_thenRepresentation_ok.java | 178 ++++
...WrapperProperties_thenRepresentation_ok.java | 168 ++++
...thenRepresentation_ofTitleIdLinksEtc_ok.java | 98 ++
...ivenHasIcon_thenRepresentation_ok_TOFIX.java | 84 ++
...ivenHiddenMembers_thenRepresentation_ok.java | 78 ++
...enTransient_thenRepresentation_ok_TOFIX.java | 83 ++
...venViewModel_thenRepresentation_ok_TODO.java | 88 ++
...Code_andContentType_andContentLength_ok.java | 88 ++
...Get_thenResponseHeaders_CacheControl_ok.java | 93 ++
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 +
.../oid/Get_whenDoesntExistOid_then_404.java | 86 ++
.../oid/Get_whenQueryArg_xRoDomainModel_ok.java | 69 ++
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 +
.../oid/Get_whenRequestHeaders_Accept_ok.java | 78 ++
...enRequestHeaders_Accept_whenInvalid_406.java | 79 ++
.../tck/domainobject/oid/Post_then_405_bad.java | 65 ++
.../oid/Put_givenDisabled_then_203_TODO.java | 23 +
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 51 ++
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 +
..._givenViewModel_thenRepresentation_TODO.java | 58 ++
.../oid/Put_thenRepresentation_TODO.java | 57 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 52 ++
...enResponseHeaders_ContentLength_ok_TODO.java | 50 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 52 ++
.../Put_thenResponseHeaders_eTag_ok_TODO.java | 50 ++
.../domainobject/oid/Put_then_200_ok_TODO.java | 50 ++
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 +
...dQueryArg_XRoValidateOnly_then_4xx_TODO.java | 23 +
...dQueryArg_XRoValidateOnly_then_2xx_TODO.java | 23 +
...Put_whenArgMandatoryButMissing_bad_TODO.java | 23 +
.../oid/Put_whenArgValueIsInvalid_bad_TODO.java | 23 +
...henArgsValid_thenMultiplePropertyUpdate.java | 219 +++++
.../Put_whenDoesntExistOid_then_404_TODO.java | 23 +
.../Delete_givenDisabled_then_203_TODO.java | 23 +
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 ++
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 +
.../Delete_givenHidden_then_404_TODO.java | 23 +
.../Delete_thenRepresentation_ok_TODO.java | 50 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 52 ++
...enResponseHeaders_ContentLength_ok_TODO.java | 52 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 52 ++
...Delete_thenResponseHeaders_eTag_ok_TODO.java | 50 ++
.../oid/collection/Delete_then_200_ok_TODO.java | 50 ++
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 +
...yThatExistsButIsNotInCollection_ok_TODO.java | 23 +
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 +
.../Delete_whenArgIsMalformed_bad_TODO.java | 23 +
...ete_whenArgMandatoryButMissing_bad_TODO.java | 23 +
...thenEntityRemovedFromCollection_ok_TODO.java | 50 ++
...id_andQueryArg_XRoValidateOnly_4xx_TODO.java | 23 +
.../Delete_whenArgValueIsInvalid_bad_TODO.java | 23 +
...id_andQueryArg_XRoValidateOnly_2xx_TODO.java | 23 +
...elete_whenDoesntExistColl_then_404_TODO.java | 23 +
...Delete_whenDoesntExistOid_then_404_TODO.java | 23 +
...lSchemeIsFormal_thenRepresentation_TODO.java | 51 ++
...lSchemeIsSimple_thenRepresentation_TODO.java | 51 ++
.../collection/Get_thenRepresentation_ok.java | 126 +++
...henResponseHeaders_CacheControl_ok_TODO.java | 42 +
...et_thenResponseHeaders_ContentLength_ok.java | 63 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 44 +
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 +
.../oid/collection/Get_then_200_ok.java | 60 ++
.../Get_whenArg_then_405_bad_TODO.java | 23 +
.../Get_whenDoesntExistColl_then_404.java | 58 ++
.../Get_whenDoesntExistOid_then_404.java | 67 ++
.../collection/Get_whenHiddenColl_then_404.java | 58 ++
.../Get_whenQueryArg_xRoDomainModel_ok.java | 69 ++
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 +
.../Get_whenRequestHeaders_Accept_ok_TODO.java | 78 ++
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 +
.../Post_givenDisabled_then_203_TODO.java | 23 +
...n_whenArgIsHrefAndLinksToEntity_ok_TODO.java | 50 ++
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 ++
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 +
.../Post_givenHidden_then_404_TODO.java | 23 +
...enHrefArg_thenResponseCode_205_bad_TODO.java | 43 +
.../Post_thenRepresentation_ok_TODO.java | 50 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 52 ++
...enResponseHeaders_ContentLength_ok_TODO.java | 52 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 53 ++
.../Post_thenResponseHeaders_eTag_ok_TODO.java | 50 ++
.../oid/collection/Post_then_200_ok_TODO.java | 50 ++
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 +
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 +
.../Post_whenArgIsMalformed_bad_TODO.java | 23 +
...ost_whenArgMandatoryButMissing_bad_TODO.java | 23 +
...lid_thenEntityAddedToCollection_ok_TODO.java | 50 ++
...id_andQueryArg_XRoValidateOnly_4xx_TODO.java | 23 +
.../Post_whenArgValueIsInvalid_bad_TODO.java | 23 +
...id_andQueryArg_XRoValidateOnly_2xx_TODO.java | 23 +
...esntExistColl_thenResponseCode_404_TODO.java | 23 +
...oesntExistOid_thenResponseCode_404_TODO.java | 23 +
.../Put_givenDisabled_then_403_TODO.java | 23 +
...tion_whenArgsValid_thenNoChange_ok_TODO.java | 23 +
...d_thenEntityAddedFromCollection_ok_TODO.java | 50 ++
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 ++
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 +
.../Put_givenHidden_then_404_TODO.java | 23 +
...enHrefArg_thenResponseCode_205_bad_TODO.java | 23 +
.../Put_thenRepresentation_ok_TODO.java | 50 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 52 ++
...enResponseHeaders_ContentLength_ok_TODO.java | 52 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 52 ++
.../Put_thenResponseHeaders_eTag_ok_TODO.java | 50 ++
.../oid/collection/Put_then_200_ok_TODO.java | 50 ++
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 +
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 +
.../Put_whenArgIsMalformed_bad_TODO.java | 23 +
...Put_whenArgMandatoryButMissing_bad_TODO.java | 23 +
...lid_thenEntityAddedToCollection_ok_TODO.java | 50 ++
...id_andQueryArg_XRoValidateOnly_4xx_TODO.java | 23 +
.../Put_whenArgValueIsInvalid_bad_TODO.java | 23 +
...id_andQueryArg_XRoValidateOnly_2xx_TODO.java | 23 +
.../Put_whenDoesntExistColl_then_404_TODO.java | 23 +
.../Put_whenDoesntExistOid_then_404_TODO.java | 23 +
.../Delete_givenDisabled_then_203_TODO.java | 23 +
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 ++
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 +
...e_givenHidden_thenResponseCode_404_TODO.java | 23 +
...venViewModel_thenRepresentation_ok_TODO.java | 50 ++
...Delete_thenPropertyValueCleared_ok_TODO.java | 50 ++
.../Delete_thenRepresentation_ok_TODO.java | 50 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 52 ++
...enResponseHeaders_ContentLength_ok_TODO.java | 53 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 52 ++
...Delete_thenResponseHeaders_eTag_ok_TODO.java | 50 ++
.../oid/property/Delete_then_200_ok_TODO.java | 50 ++
...lete_whenArgs_thenResponseCode_4xx_TODO.java | 23 +
...Delete_whenDoesntExistOid_then_404_TODO.java | 23 +
...elete_whenDoesntExistProp_then_404_TODO.java | 23 +
...ivenDisabled_thenRepresentation_ok_TODO.java | 23 +
...hemeIsFormal_thenRepresentation_ok_TODO.java | 51 ++
...hemeIsSimple_thenRepresentation_ok_TODO.java | 51 ++
...venViewModel_thenRepresentation_ok_TODO.java | 65 ++
.../oid/property/Get_thenRepresentation_ok.java | 124 +++
...henResponseHeaders_CacheControl_ok_TODO.java | 42 +
...et_thenResponseHeaders_ContentLength_ok.java | 65 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 42 +
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 +
.../oid/property/Get_then_200_ok.java | 62 ++
.../property/Get_whenArg_then_405_bad_TODO.java | 23 +
.../Get_whenDoesntExistOid_then_404.java | 68 ++
.../Get_whenDoesntExistProp_then_404.java | 72 ++
.../property/Get_whenHiddenProp_then_404.java | 58 ++
.../Get_whenQueryArg_xRoDomainModel_ok.java | 69 ++
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 +
.../Get_whenRequestHeaders_Accept_ok.java | 78 ++
...enRequestHeaders_Accept_whenInvalid_406.java | 79 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 43 +
...enResponseHeaders_ContentLength_ok_TODO.java | 42 +
...whenResponseHeaders_ContentType_ok_TODO.java | 42 +
.../oid/property/Post_then_405_bad.java | 73 ++
...givenDisabled_thenResponseCode_203_TODO.java | 23 +
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 ++
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 +
...venViewModel_thenRepresentation_ok_TODO.java | 50 ++
.../Put_thenRepresentation_ok_TODO.java | 50 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 52 ++
...enResponseHeaders_ContentLength_ok_TODO.java | 53 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 52 ++
.../Put_thenResponseHeaders_eTag_ok_TODO.java | 50 ++
.../oid/property/Put_then_200_ok.java | 103 +++
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 +
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 +
.../Put_whenArgIsMalformed_bad_TODO.java | 23 +
...Put_whenArgMandatoryButMissing_bad_TODO.java | 23 +
...sPlus_thenStringPropertyUpdated_ok_TODO.java | 103 +++
..._whenArgValid_thenJdkPropertyUpdated_ok.java | 177 ++++
...lid_thenJodaTimePropertyUpdated_ok_TODO.java | 152 ++++
...rgValid_thenPrimitivePropertyUpdated_ok.java | 143 +++
...oesntExistOid_thenResponseCode_404_TODO.java | 23 +
...esntExistProp_thenResponseCode_404_TODO.java | 23 +
...Delete_givenObjectResource_then_405_bad.java | 72 ++
...elete_givenServiceResource_then_405_bad.java | 74 ++
.../action/Get_givenDisabled_then_403_TODO.java | 23 +
...lSchemeIsFormal_thenRepresentation_TODO.java | 50 ++
...lSchemeIsSimple_thenRepresentation_TODO.java | 50 ++
.../id/action/Get_givenHidden_then_404.java | 58 ++
...venViewModel_thenRepresentation_ok_TODO.java | 65 ++
.../id/action/Get_thenRepresentation_ok.java | 107 +++
.../id/action/Get_thenResponseCode_200_ok.java | 59 ++
...henResponseHeaders_CacheControl_ok_TODO.java | 43 +
...et_thenResponseHeaders_ContentLength_ok.java | 64 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 42 +
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 +
.../Get_whenDoesntExistActn_then_404_TODO.java | 23 +
.../action/Get_whenDoesntExistOid_then_404.java | 60 ++
.../Get_whenQueryArg_xRoDomainModel_ok.java | 71 ++
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 +
...equestHeaders_Accept_isInvalid_bad_TODO.java | 23 +
.../Get_whenRequestHeaders_Accept_ok_TODO.java | 23 +
.../Post_givenObjectResource_then_405_bad.java | 72 ++
.../Post_givenServiceResource_then_405_bad.java | 74 ++
.../Put_givenObjectResource_then_405_bad.java | 72 ++
.../Put_givenServiceResource_then_405_bad.java | 73 ++
...enObjectAction_thenResponseCode_405_bad.java | 23 +
...nServiceAction_thenResponseCode_405_bad.java | 72 ++
...dempotent_thenResponseCode_205_bad_TODO.java | 105 +++
...empotent_thenResponseCode_205_bad_TOFIX.java | 105 +++
.../Get_givenActionSemanticsOfSafe_ok.java | 108 +++
.../Get_givenDisabled_thenResponseCode_203.java | 112 +++
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 23 +
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 +
...enMandatorySimpleArg_whenArgMissing_bad.java | 128 +++
...MandatorySimpleArg_whenArgNullValue_bad.java | 128 +++
...ArgsOfEveryType_whenArgsCorrect_ok_TODO.java | 23 +
...givenNoArgRequired_whenNoArgProvided_ok.java | 108 +++
...gs_whenQueryArg_XroValidateOnly_ok_TODO.java | 56 ++
...t_givenOptionalArg_whenNoArgProvided_ok.java | 159 ++++
...rgIsHrefAndLinksToNonExistentEntity_bad.java | 121 +++
.../Get_givenRefArg_whenArgProvided_ok.java | 168 ++++
...HrefAndLinksToEntityOfWrongType_ok_TODO.java | 55 ++
...ArgBigDecimal_whenArgMalformed_bad_TODO.java | 23 +
...arArgBigDecimal_whenArgProvided_ok_TODO.java | 23 +
...ArgBigInteger_whenArgMalformed_bad_TODO.java | 23 +
...arArgBigInteger_whenArgProvided_ok_TODO.java | 23 +
...ScalarArgBlob_whenArgMalformed_bad_TODO.java | 23 +
...enScalarArgBlob_whenArgProvided_ok_TODO.java | 23 +
...larArgBoolean_whenArgMalformed_bad_TODO.java | 23 +
...calarArgBoolean_whenArgProvided_ok_TODO.java | 23 +
...ScalarArgClob_whenArgMalformed_bad_TODO.java | 23 +
...arArgDateTime_whenArgMalformed_bad_TODO.java | 23 +
...alarArgDateTime_whenArgProvided_ok_TODO.java | 23 +
...ScalarArgDate_whenArgMalformed_bad_TODO.java | 23 +
...enScalarArgDate_whenArgProvided_ok_TODO.java | 23 +
...larArgDecimal_whenArgMalformed_bad_TODO.java | 23 +
...calarArgDecimal_whenArgProvided_ok_TODO.java | 23 +
...larArgInteger_whenArgMalformed_bad_TODO.java | 120 +++
...ivenScalarArgInteger_whenArgProvided_ok.java | 120 +++
...alarArgString_whenArgMalformed_bad_TODO.java | 23 +
...ScalarArgString_whenArgProvided_ok_TODO.java | 23 +
...ScalarArgTime_whenArgMalformed_bad_TODO.java | 23 +
...enScalarArgTime_whenArgProvided_ok_TODO.java | 23 +
...rgUtcMillisec_whenArgMalformed_bad_TODO.java | 23 +
...rArgUtcMillisec_whenArgProvided_ok_TODO.java | 23 +
...rg_whenArgMalformedMissingValueNode_bad.java | 113 +++
.../Get_givenScalarArg_whenArgSurplus_bad.java | 130 +++
...lidationRuleForAllArgs_whenArgFails_bad.java | 125 +++
...dationRuleForSingleArg_whenArgFails_bad.java | 126 +++
.../invoke/Get_givenViewModel_ok_TODO.java | 55 ++
..._thenRepresentation_containsSelfLink_ok.java | 104 +++
...ype_andContentLength_andRespCode_200_ok.java | 105 +++
...henResponseHeaders_CacheControl_ok_TODO.java | 51 ++
...d_thenQueryArg_XroValidateOnly_2xx_TODO.java | 55 ++
...t_whenCreatedNewObject_then_201_ok_TODO.java | 49 +
...nErrorThrown_thenRepresentation_ok_TODO.java | 48 +
...dQueryArg_XroValidateOnly_then_4xx_TODO.java | 55 ++
.../Get_whenList_thenRepresentation_ok.java | 92 ++
...thenResponseHeaders_ContentType_ok_TODO.java | 48 +
...Null_thenRepr_andRespHeaders_and_200_ok.java | 124 +++
...whenObject_isNull_thenRepresentation_ok.java | 105 +++
...thenResponseHeaders_ContentType_ok_TODO.java | 48 +
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 +
.../Get_whenRequestHeaders_Accept_ok_TODO.java | 23 +
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 +
...t_whenScalar_thenRepresentation_ok_TODO.java | 40 +
...enResponseHeaders_ContentLength_ok_TODO.java | 48 +
...thenResponseHeaders_ContentType_ok_TODO.java | 48 +
...Get_whenVoid_thenRepresentation_ok_TODO.java | 48 +
...enResponseHeaders_ContentLength_ok_TODO.java | 41 +
...thenResponseHeaders_ContentType_ok_TODO.java | 48 +
...SemanticsOfIdempotent_then_205_bad_TODO.java | 105 +++
...ctionSemanticsOfSafe_then_205_bad_TOFIX.java | 105 +++
.../Post_givenViewModel_then_ok_TODO.java | 71 ++
...epresentation_doesNotContainSelfLink_ok.java | 111 +++
...whenInvokeArgWithObjectReference_thenOK.java | 110 +++
.../Post_whenRequestHeaders_Accept_ok_TODO.java | 50 ++
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 +
...anticsOfNotIdempotent_then_405_bad_TODO.java | 105 +++
...ActionSemanticsOfSafe_then_405_bad_TODO.java | 105 +++
.../invoke/Put_givenViewModel_then_ok_TODO.java | 62 ++
...epresentation_doesNotContainSelfLink_ok.java | 110 +++
.../Put_whenRequestHeaders_Accept_ok_TODO.java | 50 ++
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 +
...henStringArgsContainsPlusSymbol_then_ok.java | 83 ++
.../invoke/Put_whenStringArgs_then_ok.java | 111 +++
.../domainservice/root/Delete_then_405_bad.java | 72 ++
...lSchemeIsFormal_thenRepresentation_TODO.java | 52 ++
...lSchemeIsSimple_thenRepresentation_TODO.java | 61 ++
.../root/Get_thenRepresentation_ok.java | 128 +++
...Get_thenResponseHeaders_CacheControl_ok.java | 68 ++
...et_thenResponseHeaders_ContentLength_ok.java | 64 ++
.../Get_thenResponseHeaders_ContentType_ok.java | 73 ++
.../Get_whenQueryArg_xRoDomainModel_ok.java | 68 ++
.../Get_whenQueryArg_xRoFollowLinks_ok.java | 147 +++
...equestHeaders_Accept_isInvalid_bad_TODO.java | 23 +
.../root/Get_whenRequestHeaders_Accept_ok.java | 105 +++
.../domainservice/root/Post_then_405_bad.java | 72 ++
.../domainservice/root/Put_then_405_bad.java | 72 ++
.../serviceId/Delete_then_405_bad.java | 72 ++
...lSchemeIsFormal_thenRepresentation_TODO.java | 51 ++
...lSchemeIsSimple_thenRepresentation_TODO.java | 51 ++
...iddenMembers_thenRepresentation_ok_TODO.java | 23 +
.../serviceId/Get_thenRepresentation_ok.java | 195 ++++
...Get_thenResponseHeaders_CacheControl_ok.java | 63 ++
...et_thenResponseHeaders_ContentLength_ok.java | 64 ++
.../Get_thenResponseHeaders_ContentType_ok.java | 64 ++
.../Get_thenResponseHeaders_eTag_ok.java | 65 ++
.../serviceId/Get_then_200_ok.java | 64 ++
..._whenDoesntExistId_thenResponseCode_404.java | 60 ++
.../Get_whenQueryArg_xRoDomainModel_ok.java | 73 ++
.../Get_whenQueryArg_xRoFollowLinks_ok.java | 161 ++++
...equestHeaders_Accept_isInvalid_bad_TODO.java | 23 +
.../Get_whenRequestHeaders_Accept_ok.java | 111 +++
.../serviceId/Post_then_405_bad.java | 72 ++
.../serviceId/Put_then_405_bad.java | 76 ++
.../tck/homepage/root/Delete_then_405_bad.java | 73 ++
...lSchemeIsFormal_thenRepresentation_TODO.java | 48 +
...lSchemeIsSimple_thenRepresentation_TODO.java | 48 +
.../tck/homepage/root/Post_then_405_bad.java | 73 ++
.../tck/homepage/root/Put_then_405_bad.java | 73 ++
.../objectsoftype/Delete_then_405_bad_TODO.java | 23 +
.../objectsoftype/Get_then_405_bad_TODO.java | 23 +
.../tck/objectsoftype/Post_ok_TODO.java | 45 +
...henResponseHeaders_CacheControl_ok_TODO.java | 41 +
...enResponseHeaders_ContentLength_ok_TODO.java | 41 +
...thenResponseHeaders_ContentType_ok_TODO.java | 41 +
...st_thenResponseHeaders_Location_ok_TODO.java | 23 +
.../Post_thenResponseHeaders_eTag_ok_TODO.java | 23 +
.../objectsoftype/Post_then_201_ok_TODO.java | 23 +
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 +
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 +
.../Post_whenArgsMalformed_bad_TODO.java | 23 +
...st_whenArgsMandatoryButMissing_bad_TODO.java | 23 +
...henArgsValid_thenPersistsObject_ok_TODO.java | 23 +
.../objectsoftype/Put_then_405_bad_TODO.java | 23 +
.../tck/user/root/Delete_then_405_bad.java | 73 ++
...lSchemeIsFormal_thenRepresentation_TODO.java | 50 ++
...lSchemeIsSimple_thenRepresentation_TODO.java | 50 ++
.../user/root/Get_thenRepresentation_ok.java | 106 +++
...Get_thenResponseHeaders_CacheControl_ok.java | 68 ++
...et_thenResponseHeaders_ContentLength_ok.java | 64 ++
.../Get_thenResponseHeaders_ContentType_ok.java | 73 ++
.../Get_whenQueryArg_xRoDomainModel_ok.java | 70 ++
...rg_xRoFollowLinks_thenRepresentation_ok.java | 89 ++
.../root/Get_whenRequestHeaders_Accept_ok.java | 78 ++
...Headers_Accept_whenInvalid_then_406_bad.java | 80 ++
.../tck/user/root/Post_then_405_bad.java | 72 ++
.../tck/user/root/Put_then_405_bad.java | 72 ++
.../tck/version/Delete_then_405_bad.java | 78 ++
...lSchemeIsFormal_thenRepresentation_TODO.java | 51 ++
...lSchemeIsSimple_thenRepresentation_TODO.java | 51 ++
.../tck/version/Get_thenRepresentation_ok.java | 113 +++
...Get_thenResponseHeaders_CacheControl_ok.java | 71 ++
...et_thenResponseHeaders_ContentLength_ok.java | 65 ++
.../Get_thenResponseHeaders_ContentType_ok.java | 76 ++
.../Get_whenQueryArg_xRoDomainModel_ok.java | 71 ++
...rg_xRoFollowLinks_thenRepresentation_ok.java | 88 ++
.../Get_whenRequestHeaders_Accept_ok.java | 85 ++
...Headers_Accept_whenInvalid_then_406_bad.java | 81 ++
.../tck/version/Post_then_405_bad.java | 71 ++
.../tck/version/Put_then_405_bad.java | 71 ++
.../ide/eclipse/launch/viewer-wicket-tck.launch | 19 +
mothballed/tck/tck-viewer-wicket/pom.xml | 105 +++
.../java/viewer/wicket/app/TckApplication.java | 41 +
.../main/java/viewer/wicket/app/application.css | 31 +
.../src/main/resources/images/Default.png | Bin 0 -> 3016 bytes
.../src/main/webapp/WEB-INF/isis.properties | 60 ++
.../src/main/webapp/WEB-INF/logging.properties | 30 +
.../src/main/webapp/WEB-INF/security_file.allow | 16 +
.../main/webapp/WEB-INF/security_file.passwords | 20 +
.../src/main/webapp/WEB-INF/web.xml | 45 +
.../src/main/webapp/images/banner.pdn | Bin 0 -> 176237 bytes
.../src/main/webapp/images/banner.png | Bin 0 -> 83060 bytes
pom.xml | 1 -
tck/pom.xml | 226 -----
tck/tck-dom/.gitignore | 19 -
tck/tck-dom/log4j.properties | 40 -
tck/tck-dom/pom.xml | 137 ---
.../appended-resources/supplemental-models.xml | 8 -
.../core/tck/dom/AbstractEntityRepository.java | 74 --
.../core/tck/dom/actions/ActionsEntity.java | 76 --
.../dom/actions/ActionsEntityRepository.java | 126 ---
.../core/tck/dom/busrules/BusRulesEntity.java | 165 ----
.../tck/dom/busrules/BusRulesEntityChild.java | 55 --
.../dom/busrules/BusRulesEntityRepository.java | 68 --
.../core/tck/dom/claimapp/claims/Approver.java | 24 -
.../core/tck/dom/claimapp/claims/Claim.java | 239 -----
.../core/tck/dom/claimapp/claims/ClaimItem.java | 77 --
.../dom/claimapp/claims/ClaimRepository.java | 36 -
.../claimapp/claims/ClaimRepositoryImpl.java | 46 -
.../core/tck/dom/claimapp/claims/Claimant.java | 26 -
.../tck/dom/claimapp/employees/Employee.java | 120 ---
.../claimapp/employees/EmployeeRepository.java | 32 -
.../employees/EmployeeRepositoryImpl.java | 35 -
.../core/tck/dom/defaults/HiddenRepository.java | 31 -
.../tck/dom/defaults/WithDefaultsEntity.java | 112 ---
.../defaults/WithDefaultsEntityRepository.java | 58 --
.../apache/isis/core/tck/dom/movies/Movie.java | 68 --
.../tck/dom/movies/MovieDomainRepository.java | 50 --
.../apache/isis/core/tck/dom/movies/Person.java | 54 --
.../apache/isis/core/tck/dom/movies/Role.java | 54 --
.../apache/isis/core/tck/dom/poly/Empty.java | 23 -
.../dom/poly/EmptyEntityWithOwnProperty.java | 36 -
.../dom/poly/ReferencingPolyTypesEntity.java | 110 ---
.../tck/dom/poly/SelfReferencingEntity.java | 85 --
.../core/tck/dom/poly/StringBaseEntity.java | 50 --
.../core/tck/dom/poly/StringBaseEntitySub.java | 49 -
.../tck/dom/poly/StringBaseEntitySubThree.java | 44 -
.../tck/dom/poly/StringBaseEntitySubTwo.java | 48 -
.../isis/core/tck/dom/poly/Stringable.java | 24 -
.../StringableEntityWithOwnDerivedProperty.java | 41 -
.../poly/StringableEntityWithOwnProperties.java | 71 --
.../poly/StringableEntityWithOwnProperty.java | 51 --
.../core/tck/dom/refs/AggregatedEntity.java | 47 -
.../isis/core/tck/dom/refs/BaseEntity.java | 26 -
.../tck/dom/refs/BidirWithListChildEntity.java | 94 --
.../tck/dom/refs/BidirWithListParentEntity.java | 99 ---
.../BidirWithListParentEntityRepository.java | 45 -
.../tck/dom/refs/BidirWithSetChildEntity.java | 93 --
.../tck/dom/refs/BidirWithSetParentEntity.java | 100 ---
.../BidirWithSetParentEntityRepository.java | 45 -
.../isis/core/tck/dom/refs/ChildEntity.java | 88 --
.../isis/core/tck/dom/refs/ParentEntity.java | 128 ---
.../tck/dom/refs/ParentEntityRepository.java | 51 --
.../core/tck/dom/refs/PolyClassChildEntity.java | 96 --
.../tck/dom/refs/PolyClassParentEntity.java | 125 ---
.../refs/PolyClassParentEntityRepository.java | 52 --
.../tck/dom/refs/PolyClassSubtype1Entity.java | 52 --
.../tck/dom/refs/PolyClassSubtype2Entity.java | 52 --
.../tck/dom/refs/PolyClassSubtype3Entity.java | 53 --
.../isis/core/tck/dom/refs/PolyInterface.java | 30 -
.../dom/refs/PolyInterfaceIdentityStrategy.java | 30 -
...lyInterfaceIdentityStrategyParentEntity.java | 129 ---
...eIdentityStrategyParentEntityRepository.java | 52 --
...InterfaceIdentityStrategySubtype1Entity.java | 86 --
...InterfaceIdentityStrategySubtype2Entity.java | 86 --
...InterfaceIdentityStrategySubtype3Entity.java | 87 --
.../tck/dom/refs/PolyInterfaceParentEntity.java | 127 ---
.../PolyInterfaceParentEntityRepository.java | 52 --
.../dom/refs/PolyInterfaceSubtype1Entity.java | 86 --
.../dom/refs/PolyInterfaceSubtype2Entity.java | 86 --
.../dom/refs/PolyInterfaceSubtype3Entity.java | 87 --
.../core/tck/dom/refs/ReferencingEntity.java | 95 --
.../isis/core/tck/dom/refs/SimpleEntity.java | 104 ---
.../core/tck/dom/refs/UnidirFkChildEntity.java | 52 --
.../core/tck/dom/refs/UnidirFkParentEntity.java | 101 ---
.../refs/UnidirFkParentEntityRepository.java | 45 -
.../tck/dom/refs/UnidirJoinChildEntity.java | 52 --
.../tck/dom/refs/UnidirJoinParentEntity.java | 103 ---
.../refs/UnidirJoinParentEntityRepository.java | 45 -
.../tck/dom/refs/UnidirReferencedEntity.java | 52 --
.../refs/UnidirReferencedEntityRepository.java | 45 -
.../tck/dom/refs/UnidirReferencingEntity.java | 66 --
.../refs/UnidirReferencingEntityRepository.java | 45 -
.../tck/dom/scalars/ApplibValuedEntity.java | 267 ------
.../scalars/ApplibValuedEntityRepository.java | 45 -
.../tck/dom/scalars/AutoAssignedEntity.java | 53 --
.../scalars/AutoAssignedEntityRepository.java | 43 -
.../tck/dom/scalars/DateTimeValuedEntity.java | 171 ----
.../scalars/DateTimeValuedEntityRepository.java | 44 -
.../core/tck/dom/scalars/JdkValuedEntity.java | 201 -----
.../dom/scalars/JdkValuedEntityRepository.java | 46 -
.../core/tck/dom/scalars/JodaValuedEntity.java | 126 ---
.../dom/scalars/JodaValuedEntityRepository.java | 46 -
.../isis/core/tck/dom/scalars/MyEnum.java | 29 -
.../tck/dom/scalars/PrimitiveValuedEntity.java | 214 -----
.../PrimitiveValuedEntityRepository.java | 43 -
.../tck/dom/scalars/WrapperValuedEntity.java | 229 -----
.../scalars/WrapperValuedEntityRepository.java | 46 -
.../dom/sqlos/SqlDomainObjectRepository.java | 175 ----
.../core/tck/dom/sqlos/data/SimpleClass.java | 61 --
.../core/tck/dom/sqlos/data/SimpleClassTwo.java | 75 --
.../core/tck/dom/sqlos/data/SqlDataClass.java | 338 -------
.../tck/dom/viewmodels/SimpleViewModel.java | 61 --
.../apache/isis/core/tck/dom/xmlos/Person.java | 27 -
.../apache/isis/core/tck/dom/xmlos/Role.java | 53 --
.../apache/isis/core/tck/dom/xmlos/Team.java | 27 -
.../tck/dom/xmlos/TeamDomainRepository.java | 50 --
.../src/main/resources/images/ToDoItem.gif | Bin 1592 -> 0 bytes
tck/tck-fixture/pom.xml | 38 -
.../core/tck/fixture/LogonAsSvenFixture.java | 30 -
.../fixture/actions/ActionsEntityFixture.java | 52 --
.../fixture/busrules/BusRulesEntityFixture.java | 50 --
.../defaults/WithDefaultsEntityFixture.java | 50 --
.../tck/fixture/refs/ParentEntitiesFixture.java | 50 --
.../scalars/ApplibValuedEntityFixture.java | 47 -
.../scalars/DateTimeValuedEntityFixture.java | 47 -
.../fixture/scalars/JdkValuedEntityFixture.java | 81 --
.../scalars/JodaValuedEntityFixture.java | 55 --
.../scalars/PrimitiveValuedEntityFixture.java | 56 --
.../scalars/WrapperValuedEntityFixture.java | 57 --
tck/tck-integtests/lib/.gitignore | 24 -
tck/tck-integtests/pom.xml | 116 ---
.../IsisSystemWithFixtures.java | 674 --------------
.../IsisSystemWithFixturesTest_basicTest.java | 47 -
.../integtestsupport/legacy/AbstractTest.java | 140 ---
.../legacy/DefaultAndChoicesTest.java | 42 -
.../legacy/InteractionListenerTest.java | 54 --
.../legacy/MemberDisabledTest.java | 132 ---
.../legacy/MemberHiddenTest.java | 356 --------
.../legacy/MemberInvalidTest.java | 255 ------
.../legacy/MemberModifyTest.java | 223 -----
.../integtestsupport/legacy/MemberReadTest.java | 93 --
.../legacy/ObjectImmutableTest.java | 87 --
.../legacy/SaveObjectsTest.java | 113 ---
.../core/integtestsupport/legacy/TitleTest.java | 33 -
.../integtestsupport/legacy/ViewObjectTest.java | 91 --
.../legacy/sample/domain/Country.java | 155 ----
.../legacy/sample/domain/Customer.java | 889 -------------------
.../legacy/sample/domain/Order.java | 185 ----
.../legacy/sample/domain/Product.java | 186 ----
.../sample/fixtures/CountriesFixture.java | 65 --
.../sample/fixtures/CustomerOrdersFixture.java | 107 ---
.../sample/fixtures/CustomersFixture.java | 89 --
.../sample/fixtures/JoeBloggsFixture.java | 30 -
.../legacy/sample/fixtures/ProductsFixture.java | 73 --
.../sample/service/CountryRepository.java | 81 --
.../sample/service/CustomerRepository.java | 117 ---
.../legacy/sample/service/OrderRepository.java | 68 --
.../sample/service/ProductRepository.java | 104 ---
.../PersistorSessionHydratorTest.java | 122 ---
.../persistence/RuntimeTestPojo.java | 52 --
.../tck/ObjectStoreContractTest_persist.java | 176 ----
.../InMemoryObjectStoreTest_debug.java | 78 --
.../InMemoryObjectStoreTest_init.java | 44 -
.../InMemoryObjectStoreTest_name.java | 41 -
.../InMemoryObjectStoreTest_openAndClose.java | 119 ---
.../InMemoryObjectStoreTest_persist.java | 37 -
...MemoryObjectStoreTest_persistAggregated.java | 55 --
.../InMemoryObjectStoreTest_reset.java | 80 --
.../InMemoryObjectStoreTest_retrieve.java | 166 ----
...InMemoryObjectStoreTest_serviceRegistry.java | 113 ---
.../ObjectFixtureFilePersistorTest.java | 222 -----
.../ObjectFixtureServiceTest_loadFile.java | 88 --
...xtureServiceTest_loadFile_nothingExists.java | 73 --
.../ObjectFixtureServiceTest_save.java | 84 --
.../isis/core/runtime/memento/MementoTest.java | 221 -----
.../core/runtime/memento/MementoTest_data.java | 93 --
.../memento/MementoTest_encodedData.java | 80 --
...rsistenceMechanismInstallerTest_getName.java | 46 -
...sistenceMechanismInstallerTest_services.java | 62 --
.../isis/objectstore/jdo/datanucleus/Utils.java | 124 ---
.../spi/JdoObjectIdSerializerTest.java | 150 ----
.../adaptermanager/Persistence_lazyLoading.java | 84 --
.../adaptermanager/Persistence_loadObject.java | 102 ---
.../Persistence_persistentAdapterFor.java | 115 ---
...Persistence_persist_bidirWithListParent.java | 86 --
.../Persistence_persist_bidirWithSetParent.java | 127 ---
.../refs/Persistence_persist_polyclass.java | 94 --
.../refs/Persistence_persist_polyinter.java | 95 --
...tence_persist_polyinterIdentityStrategy.java | 94 --
.../refs/Persistence_persist_referencing.java | 133 ---
.../refs/Persistence_persist_unidir.java | 128 ---
.../refs/Persistence_persist_unidirJoin.java | 128 ---
...Persistence_update_using_domMethodCalls.java | 108 ---
.../scalar/Persistence_allInstances.java | 86 --
.../scalar/Persistence_bounceSystem.java | 44 -
.../scalar/Persistence_findInstance.java | 67 --
.../scalar/Persistence_namedQuery_all.java | 108 ---
.../Persistence_namedQuery_firstOnly.java | 112 ---
...nce_persistAndUpdate_applibValuedEntity.java | 92 --
...stence_persistAndUpdate_jdkValuedEntity.java | 117 ---
...istence_persistAndUpdate_objectAdapters.java | 112 ---
..._persistAndUpdate_primitiveValuedEntity.java | 119 ---
...ce_persistAndUpdate_wrapperValuedEntity.java | 118 ---
...nce_persist_dataStoreAssignedPrimaryKey.java | 59 --
.../README-testcases.md | 80 --
.../eclipse/launch/viewer-restful-tck.launch | 19 -
tck/tck-viewer-restfulobjects/pom.xml | 119 ---
.../isis/viewer/restfulobjects/tck/Dummy.java | 24 -
.../src/main/webapp/WEB-INF/isis.properties | 42 -
.../src/main/webapp/WEB-INF/logging.properties | 30 -
.../src/main/webapp/WEB-INF/web.xml | 141 ---
.../restfulobjects/tck/IsisWebServerRule.java | 83 --
.../restfulobjects/tck/RelTest_matches.java | 50 --
.../restfulobjects/tck/RestfulMatchers.java | 660 --------------
.../isis/viewer/restfulobjects/tck/Util.java | 152 ----
.../tck/all/stories/UserStoryTest_TOFIX.java | 86 --
.../tck/any/NotAuthorizedTest_TODO.java | 51 --
.../AnyResourceTest_serverSideException.java | 63 --
.../domainobject/oid/Delete_then_405_bad.java | 65 --
...enDisabledMembers_thenRepresentation_ok.java | 80 --
...hemeIsFormal_thenRepresentation_ok_TODO.java | 52 --
...hemeIsSimple_thenRepresentation_ok_TODO.java | 52 --
...EntityWithActions_thenRepresentation_ok.java | 94 --
...ibProperties_thenRepresentation_ok_TODO.java | 80 --
...hCollections_thenRepresentation_ok_TODO.java | 74 --
...WithJdkProperties_thenRepresentation_ok.java | 160 ----
...ithJodaProperties_thenRepresentation_ok.java | 122 ---
...imitiveProperties_thenRepresentation_ok.java | 178 ----
...WrapperProperties_thenRepresentation_ok.java | 168 ----
...thenRepresentation_ofTitleIdLinksEtc_ok.java | 98 --
...ivenHasIcon_thenRepresentation_ok_TOFIX.java | 84 --
...ivenHiddenMembers_thenRepresentation_ok.java | 78 --
...enTransient_thenRepresentation_ok_TOFIX.java | 83 --
...venViewModel_thenRepresentation_ok_TODO.java | 88 --
...Code_andContentType_andContentLength_ok.java | 88 --
...Get_thenResponseHeaders_CacheControl_ok.java | 93 --
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 -
.../oid/Get_whenDoesntExistOid_then_404.java | 86 --
.../oid/Get_whenQueryArg_xRoDomainModel_ok.java | 69 --
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 -
.../oid/Get_whenRequestHeaders_Accept_ok.java | 78 --
...enRequestHeaders_Accept_whenInvalid_406.java | 79 --
.../tck/domainobject/oid/Post_then_405_bad.java | 65 --
.../oid/Put_givenDisabled_then_203_TODO.java | 23 -
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 51 --
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 -
..._givenViewModel_thenRepresentation_TODO.java | 58 --
.../oid/Put_thenRepresentation_TODO.java | 57 --
...henResponseHeaders_CacheControl_ok_TODO.java | 52 --
...enResponseHeaders_ContentLength_ok_TODO.java | 50 --
...thenResponseHeaders_ContentType_ok_TODO.java | 52 --
.../Put_thenResponseHeaders_eTag_ok_TODO.java | 50 --
.../domainobject/oid/Put_then_200_ok_TODO.java | 50 --
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 -
...dQueryArg_XRoValidateOnly_then_4xx_TODO.java | 23 -
...dQueryArg_XRoValidateOnly_then_2xx_TODO.java | 23 -
...Put_whenArgMandatoryButMissing_bad_TODO.java | 23 -
.../oid/Put_whenArgValueIsInvalid_bad_TODO.java | 23 -
...henArgsValid_thenMultiplePropertyUpdate.java | 219 -----
.../Put_whenDoesntExistOid_then_404_TODO.java | 23 -
.../Delete_givenDisabled_then_203_TODO.java | 23 -
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 --
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 -
.../Delete_givenHidden_then_404_TODO.java | 23 -
.../Delete_thenRepresentation_ok_TODO.java | 50 --
...henResponseHeaders_CacheControl_ok_TODO.java | 52 --
...enResponseHeaders_ContentLength_ok_TODO.java | 52 --
...thenResponseHeaders_ContentType_ok_TODO.java | 52 --
...Delete_thenResponseHeaders_eTag_ok_TODO.java | 50 --
.../oid/collection/Delete_then_200_ok_TODO.java | 50 --
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 -
...yThatExistsButIsNotInCollection_ok_TODO.java | 23 -
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 -
.../Delete_whenArgIsMalformed_bad_TODO.java | 23 -
...ete_whenArgMandatoryButMissing_bad_TODO.java | 23 -
...thenEntityRemovedFromCollection_ok_TODO.java | 50 --
...id_andQueryArg_XRoValidateOnly_4xx_TODO.java | 23 -
.../Delete_whenArgValueIsInvalid_bad_TODO.java | 23 -
...id_andQueryArg_XRoValidateOnly_2xx_TODO.java | 23 -
...elete_whenDoesntExistColl_then_404_TODO.java | 23 -
...Delete_whenDoesntExistOid_then_404_TODO.java | 23 -
...lSchemeIsFormal_thenRepresentation_TODO.java | 51 --
...lSchemeIsSimple_thenRepresentation_TODO.java | 51 --
.../collection/Get_thenRepresentation_ok.java | 126 ---
...henResponseHeaders_CacheControl_ok_TODO.java | 42 -
...et_thenResponseHeaders_ContentLength_ok.java | 63 --
...thenResponseHeaders_ContentType_ok_TODO.java | 44 -
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 -
.../oid/collection/Get_then_200_ok.java | 60 --
.../Get_whenArg_then_405_bad_TODO.java | 23 -
.../Get_whenDoesntExistColl_then_404.java | 58 --
.../Get_whenDoesntExistOid_then_404.java | 67 --
.../collection/Get_whenHiddenColl_then_404.java | 58 --
.../Get_whenQueryArg_xRoDomainModel_ok.java | 69 --
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 -
.../Get_whenRequestHeaders_Accept_ok_TODO.java | 78 --
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 -
.../Post_givenDisabled_then_203_TODO.java | 23 -
...n_whenArgIsHrefAndLinksToEntity_ok_TODO.java | 50 --
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 --
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 -
.../Post_givenHidden_then_404_TODO.java | 23 -
...enHrefArg_thenResponseCode_205_bad_TODO.java | 43 -
.../Post_thenRepresentation_ok_TODO.java | 50 --
...henResponseHeaders_CacheControl_ok_TODO.java | 52 --
...enResponseHeaders_ContentLength_ok_TODO.java | 52 --
...thenResponseHeaders_ContentType_ok_TODO.java | 53 --
.../Post_thenResponseHeaders_eTag_ok_TODO.java | 50 --
.../oid/collection/Post_then_200_ok_TODO.java | 50 --
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 -
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 -
.../Post_whenArgIsMalformed_bad_TODO.java | 23 -
...ost_whenArgMandatoryButMissing_bad_TODO.java | 23 -
...lid_thenEntityAddedToCollection_ok_TODO.java | 50 --
...id_andQueryArg_XRoValidateOnly_4xx_TODO.java | 23 -
.../Post_whenArgValueIsInvalid_bad_TODO.java | 23 -
...id_andQueryArg_XRoValidateOnly_2xx_TODO.java | 23 -
...esntExistColl_thenResponseCode_404_TODO.java | 23 -
...oesntExistOid_thenResponseCode_404_TODO.java | 23 -
.../Put_givenDisabled_then_403_TODO.java | 23 -
...tion_whenArgsValid_thenNoChange_ok_TODO.java | 23 -
...d_thenEntityAddedFromCollection_ok_TODO.java | 50 --
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 --
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 -
.../Put_givenHidden_then_404_TODO.java | 23 -
...enHrefArg_thenResponseCode_205_bad_TODO.java | 23 -
.../Put_thenRepresentation_ok_TODO.java | 50 --
...henResponseHeaders_CacheControl_ok_TODO.java | 52 --
...enResponseHeaders_ContentLength_ok_TODO.java | 52 --
...thenResponseHeaders_ContentType_ok_TODO.java | 52 --
.../Put_thenResponseHeaders_eTag_ok_TODO.java | 50 --
.../oid/collection/Put_then_200_ok_TODO.java | 50 --
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 -
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 -
.../Put_whenArgIsMalformed_bad_TODO.java | 23 -
...Put_whenArgMandatoryButMissing_bad_TODO.java | 23 -
...lid_thenEntityAddedToCollection_ok_TODO.java | 50 --
...id_andQueryArg_XRoValidateOnly_4xx_TODO.java | 23 -
.../Put_whenArgValueIsInvalid_bad_TODO.java | 23 -
...id_andQueryArg_XRoValidateOnly_2xx_TODO.java | 23 -
.../Put_whenDoesntExistColl_then_404_TODO.java | 23 -
.../Put_whenDoesntExistOid_then_404_TODO.java | 23 -
.../Delete_givenDisabled_then_203_TODO.java | 23 -
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 --
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 -
...e_givenHidden_thenResponseCode_404_TODO.java | 23 -
...venViewModel_thenRepresentation_ok_TODO.java | 50 --
...Delete_thenPropertyValueCleared_ok_TODO.java | 50 --
.../Delete_thenRepresentation_ok_TODO.java | 50 --
...henResponseHeaders_CacheControl_ok_TODO.java | 52 --
...enResponseHeaders_ContentLength_ok_TODO.java | 53 --
...thenResponseHeaders_ContentType_ok_TODO.java | 52 --
...Delete_thenResponseHeaders_eTag_ok_TODO.java | 50 --
.../oid/property/Delete_then_200_ok_TODO.java | 50 --
...lete_whenArgs_thenResponseCode_4xx_TODO.java | 23 -
...Delete_whenDoesntExistOid_then_404_TODO.java | 23 -
...elete_whenDoesntExistProp_then_404_TODO.java | 23 -
...ivenDisabled_thenRepresentation_ok_TODO.java | 23 -
...hemeIsFormal_thenRepresentation_ok_TODO.java | 51 --
...hemeIsSimple_thenRepresentation_ok_TODO.java | 51 --
...venViewModel_thenRepresentation_ok_TODO.java | 65 --
.../oid/property/Get_thenRepresentation_ok.java | 124 ---
...henResponseHeaders_CacheControl_ok_TODO.java | 42 -
...et_thenResponseHeaders_ContentLength_ok.java | 65 --
...thenResponseHeaders_ContentType_ok_TODO.java | 42 -
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 -
.../oid/property/Get_then_200_ok.java | 62 --
.../property/Get_whenArg_then_405_bad_TODO.java | 23 -
.../Get_whenDoesntExistOid_then_404.java | 68 --
.../Get_whenDoesntExistProp_then_404.java | 72 --
.../property/Get_whenHiddenProp_then_404.java | 58 --
.../Get_whenQueryArg_xRoDomainModel_ok.java | 69 --
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 -
.../Get_whenRequestHeaders_Accept_ok.java | 78 --
...enRequestHeaders_Accept_whenInvalid_406.java | 79 --
...henResponseHeaders_CacheControl_ok_TODO.java | 43 -
...enResponseHeaders_ContentLength_ok_TODO.java | 42 -
...whenResponseHeaders_ContentType_ok_TODO.java | 42 -
.../oid/property/Post_then_405_bad.java | 73 --
...givenDisabled_thenResponseCode_203_TODO.java | 23 -
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 50 --
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 -
...venViewModel_thenRepresentation_ok_TODO.java | 50 --
.../Put_thenRepresentation_ok_TODO.java | 50 --
...henResponseHeaders_CacheControl_ok_TODO.java | 52 --
...enResponseHeaders_ContentLength_ok_TODO.java | 53 --
...thenResponseHeaders_ContentType_ok_TODO.java | 52 --
.../Put_thenResponseHeaders_eTag_ok_TODO.java | 50 --
.../oid/property/Put_then_200_ok.java | 103 ---
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 -
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 -
.../Put_whenArgIsMalformed_bad_TODO.java | 23 -
...Put_whenArgMandatoryButMissing_bad_TODO.java | 23 -
...sPlus_thenStringPropertyUpdated_ok_TODO.java | 103 ---
..._whenArgValid_thenJdkPropertyUpdated_ok.java | 177 ----
...lid_thenJodaTimePropertyUpdated_ok_TODO.java | 152 ----
...rgValid_thenPrimitivePropertyUpdated_ok.java | 143 ---
...oesntExistOid_thenResponseCode_404_TODO.java | 23 -
...esntExistProp_thenResponseCode_404_TODO.java | 23 -
...Delete_givenObjectResource_then_405_bad.java | 72 --
...elete_givenServiceResource_then_405_bad.java | 74 --
.../action/Get_givenDisabled_then_403_TODO.java | 23 -
...lSchemeIsFormal_thenRepresentation_TODO.java | 50 --
...lSchemeIsSimple_thenRepresentation_TODO.java | 50 --
.../id/action/Get_givenHidden_then_404.java | 58 --
...venViewModel_thenRepresentation_ok_TODO.java | 65 --
.../id/action/Get_thenRepresentation_ok.java | 107 ---
.../id/action/Get_thenResponseCode_200_ok.java | 59 --
...henResponseHeaders_CacheControl_ok_TODO.java | 43 -
...et_thenResponseHeaders_ContentLength_ok.java | 64 --
...thenResponseHeaders_ContentType_ok_TODO.java | 42 -
.../Get_thenResponseHeaders_eTag_ok_TODO.java | 23 -
.../Get_whenDoesntExistActn_then_404_TODO.java | 23 -
.../action/Get_whenDoesntExistOid_then_404.java | 60 --
.../Get_whenQueryArg_xRoDomainModel_ok.java | 71 --
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 -
...equestHeaders_Accept_isInvalid_bad_TODO.java | 23 -
.../Get_whenRequestHeaders_Accept_ok_TODO.java | 23 -
.../Post_givenObjectResource_then_405_bad.java | 72 --
.../Post_givenServiceResource_then_405_bad.java | 74 --
.../Put_givenObjectResource_then_405_bad.java | 72 --
.../Put_givenServiceResource_then_405_bad.java | 73 --
...enObjectAction_thenResponseCode_405_bad.java | 23 -
...nServiceAction_thenResponseCode_405_bad.java | 72 --
...dempotent_thenResponseCode_205_bad_TODO.java | 105 ---
...empotent_thenResponseCode_205_bad_TOFIX.java | 105 ---
.../Get_givenActionSemanticsOfSafe_ok.java | 108 ---
.../Get_givenDisabled_thenResponseCode_203.java | 112 ---
...Etag_whenIfMatchHeaderDoesMatch_ok_TODO.java | 23 -
..._whenIfMatchHeaderDoesNotMatch_bad_TODO.java | 23 -
...enMandatorySimpleArg_whenArgMissing_bad.java | 128 ---
...MandatorySimpleArg_whenArgNullValue_bad.java | 128 ---
...ArgsOfEveryType_whenArgsCorrect_ok_TODO.java | 23 -
...givenNoArgRequired_whenNoArgProvided_ok.java | 108 ---
...gs_whenQueryArg_XroValidateOnly_ok_TODO.java | 56 --
...t_givenOptionalArg_whenNoArgProvided_ok.java | 159 ----
...rgIsHrefAndLinksToNonExistentEntity_bad.java | 121 ---
.../Get_givenRefArg_whenArgProvided_ok.java | 168 ----
...HrefAndLinksToEntityOfWrongType_ok_TODO.java | 55 --
...ArgBigDecimal_whenArgMalformed_bad_TODO.java | 23 -
...arArgBigDecimal_whenArgProvided_ok_TODO.java | 23 -
...ArgBigInteger_whenArgMalformed_bad_TODO.java | 23 -
...arArgBigInteger_whenArgProvided_ok_TODO.java | 23 -
...ScalarArgBlob_whenArgMalformed_bad_TODO.java | 23 -
...enScalarArgBlob_whenArgProvided_ok_TODO.java | 23 -
...larArgBoolean_whenArgMalformed_bad_TODO.java | 23 -
...calarArgBoolean_whenArgProvided_ok_TODO.java | 23 -
...ScalarArgClob_whenArgMalformed_bad_TODO.java | 23 -
...arArgDateTime_whenArgMalformed_bad_TODO.java | 23 -
...alarArgDateTime_whenArgProvided_ok_TODO.java | 23 -
...ScalarArgDate_whenArgMalformed_bad_TODO.java | 23 -
...enScalarArgDate_whenArgProvided_ok_TODO.java | 23 -
...larArgDecimal_whenArgMalformed_bad_TODO.java | 23 -
...calarArgDecimal_whenArgProvided_ok_TODO.java | 23 -
...larArgInteger_whenArgMalformed_bad_TODO.java | 120 ---
...ivenScalarArgInteger_whenArgProvided_ok.java | 120 ---
...alarArgString_whenArgMalformed_bad_TODO.java | 23 -
...ScalarArgString_whenArgProvided_ok_TODO.java | 23 -
...ScalarArgTime_whenArgMalformed_bad_TODO.java | 23 -
...enScalarArgTime_whenArgProvided_ok_TODO.java | 23 -
...rgUtcMillisec_whenArgMalformed_bad_TODO.java | 23 -
...rArgUtcMillisec_whenArgProvided_ok_TODO.java | 23 -
...rg_whenArgMalformedMissingValueNode_bad.java | 113 ---
.../Get_givenScalarArg_whenArgSurplus_bad.java | 130 ---
...lidationRuleForAllArgs_whenArgFails_bad.java | 125 ---
...dationRuleForSingleArg_whenArgFails_bad.java | 126 ---
.../invoke/Get_givenViewModel_ok_TODO.java | 55 --
..._thenRepresentation_containsSelfLink_ok.java | 104 ---
...ype_andContentLength_andRespCode_200_ok.java | 105 ---
...henResponseHeaders_CacheControl_ok_TODO.java | 51 --
...d_thenQueryArg_XroValidateOnly_2xx_TODO.java | 55 --
...t_whenCreatedNewObject_then_201_ok_TODO.java | 49 -
...nErrorThrown_thenRepresentation_ok_TODO.java | 48 -
...dQueryArg_XroValidateOnly_then_4xx_TODO.java | 55 --
.../Get_whenList_thenRepresentation_ok.java | 92 --
...thenResponseHeaders_ContentType_ok_TODO.java | 48 -
...Null_thenRepr_andRespHeaders_and_200_ok.java | 124 ---
...whenObject_isNull_thenRepresentation_ok.java | 105 ---
...thenResponseHeaders_ContentType_ok_TODO.java | 48 -
...Get_whenQueryArg_xRoFollowLinks_ok_TODO.java | 23 -
.../Get_whenRequestHeaders_Accept_ok_TODO.java | 23 -
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 -
...t_whenScalar_thenRepresentation_ok_TODO.java | 40 -
...enResponseHeaders_ContentLength_ok_TODO.java | 48 -
...thenResponseHeaders_ContentType_ok_TODO.java | 48 -
...Get_whenVoid_thenRepresentation_ok_TODO.java | 48 -
...enResponseHeaders_ContentLength_ok_TODO.java | 41 -
...thenResponseHeaders_ContentType_ok_TODO.java | 48 -
...SemanticsOfIdempotent_then_205_bad_TODO.java | 105 ---
...ctionSemanticsOfSafe_then_205_bad_TOFIX.java | 105 ---
.../Post_givenViewModel_then_ok_TODO.java | 71 --
...epresentation_doesNotContainSelfLink_ok.java | 111 ---
...whenInvokeArgWithObjectReference_thenOK.java | 110 ---
.../Post_whenRequestHeaders_Accept_ok_TODO.java | 50 --
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 -
...anticsOfNotIdempotent_then_405_bad_TODO.java | 105 ---
...ActionSemanticsOfSafe_then_405_bad_TODO.java | 105 ---
.../invoke/Put_givenViewModel_then_ok_TODO.java | 62 --
...epresentation_doesNotContainSelfLink_ok.java | 110 ---
.../Put_whenRequestHeaders_Accept_ok_TODO.java | 50 --
...uestHeaders_Accept_whenInvalid_406_TODO.java | 23 -
...henStringArgsContainsPlusSymbol_then_ok.java | 83 --
.../invoke/Put_whenStringArgs_then_ok.java | 111 ---
.../domainservice/root/Delete_then_405_bad.java | 72 --
...lSchemeIsFormal_thenRepresentation_TODO.java | 52 --
...lSchemeIsSimple_thenRepresentation_TODO.java | 61 --
.../root/Get_thenRepresentation_ok.java | 128 ---
...Get_thenResponseHeaders_CacheControl_ok.java | 68 --
...et_thenResponseHeaders_ContentLength_ok.java | 64 --
.../Get_thenResponseHeaders_ContentType_ok.java | 73 --
.../Get_whenQueryArg_xRoDomainModel_ok.java | 68 --
.../Get_whenQueryArg_xRoFollowLinks_ok.java | 147 ---
...equestHeaders_Accept_isInvalid_bad_TODO.java | 23 -
.../root/Get_whenRequestHeaders_Accept_ok.java | 105 ---
.../domainservice/root/Post_then_405_bad.java | 72 --
.../domainservice/root/Put_then_405_bad.java | 72 --
.../serviceId/Delete_then_405_bad.java | 72 --
...lSchemeIsFormal_thenRepresentation_TODO.java | 51 --
...lSchemeIsSimple_thenRepresentation_TODO.java | 51 --
...iddenMembers_thenRepresentation_ok_TODO.java | 23 -
.../serviceId/Get_thenRepresentation_ok.java | 195 ----
...Get_thenResponseHeaders_CacheControl_ok.java | 63 --
...et_thenResponseHeaders_ContentLength_ok.java | 64 --
.../Get_thenResponseHeaders_ContentType_ok.java | 64 --
.../Get_thenResponseHeaders_eTag_ok.java | 65 --
.../serviceId/Get_then_200_ok.java | 64 --
..._whenDoesntExistId_thenResponseCode_404.java | 60 --
.../Get_whenQueryArg_xRoDomainModel_ok.java | 73 --
.../Get_whenQueryArg_xRoFollowLinks_ok.java | 161 ----
...equestHeaders_Accept_isInvalid_bad_TODO.java | 23 -
.../Get_whenRequestHeaders_Accept_ok.java | 111 ---
.../serviceId/Post_then_405_bad.java | 72 --
.../serviceId/Put_then_405_bad.java | 76 --
.../tck/homepage/root/Delete_then_405_bad.java | 73 --
...lSchemeIsFormal_thenRepresentation_TODO.java | 48 -
...lSchemeIsSimple_thenRepresentation_TODO.java | 48 -
.../tck/homepage/root/Post_then_405_bad.java | 73 --
.../tck/homepage/root/Put_then_405_bad.java | 73 --
.../objectsoftype/Delete_then_405_bad_TODO.java | 23 -
.../objectsoftype/Get_then_405_bad_TODO.java | 23 -
.../tck/objectsoftype/Post_ok_TODO.java | 45 -
...henResponseHeaders_CacheControl_ok_TODO.java | 41 -
...enResponseHeaders_ContentLength_ok_TODO.java | 41 -
...thenResponseHeaders_ContentType_ok_TODO.java | 41 -
...st_thenResponseHeaders_Location_ok_TODO.java | 23 -
.../Post_thenResponseHeaders_eTag_ok_TODO.java | 23 -
.../objectsoftype/Post_then_201_ok_TODO.java | 23 -
...refAndLinksToEntityOfWrongType_bad_TODO.java | 23 -
...refAndLinksToNonExistentEntity_bad_TODO.java | 23 -
.../Post_whenArgsMalformed_bad_TODO.java | 23 -
...st_whenArgsMandatoryButMissing_bad_TODO.java | 23 -
...henArgsValid_thenPersistsObject_ok_TODO.java | 23 -
.../objectsoftype/Put_then_405_bad_TODO.java | 23 -
.../tck/user/root/Delete_then_405_bad.java | 73 --
...lSchemeIsFormal_thenRepresentation_TODO.java | 50 --
...lSchemeIsSimple_thenRepresentation_TODO.java | 50 --
.../user/root/Get_thenRepresentation_ok.java | 106 ---
...Get_thenResponseHeaders_CacheControl_ok.java | 68 --
...et_thenResponseHeaders_ContentLength_ok.java | 64 --
.../Get_thenResponseHeaders_ContentType_ok.java | 73 --
.../Get_whenQueryArg_xRoDomainModel_ok.java | 70 --
...rg_xRoFollowLinks_thenRepresentation_ok.java | 89 --
.../root/Get_whenRequestHeaders_Accept_ok.java | 78 --
...Headers_Accept_whenInvalid_then_406_bad.java | 80 --
.../tck/user/root/Post_then_405_bad.java | 72 --
.../tck/user/root/Put_then_405_bad.java | 72 --
.../tck/version/Delete_then_405_bad.java | 78 --
...lSchemeIsFormal_thenRepresentation_TODO.java | 51 --
...lSchemeIsSimple_thenRepresentation_TODO.java | 51 --
.../tck/version/Get_thenRepresentation_ok.java | 113 ---
...Get_thenResponseHeaders_CacheControl_ok.java | 71 --
...et_thenResponseHeaders_ContentLength_ok.java | 65 --
.../Get_thenResponseHeaders_ContentType_ok.java | 76 --
.../Get_whenQueryArg_xRoDomainModel_ok.java | 71 --
...rg_xRoFollowLinks_thenRepresentation_ok.java | 88 --
.../Get_whenRequestHeaders_Accept_ok.java | 85 --
...Headers_Accept_whenInvalid_then_406_bad.java | 81 --
.../tck/version/Post_then_405_bad.java | 71 --
.../tck/version/Put_then_405_bad.java | 71 --
.../ide/eclipse/launch/viewer-wicket-tck.launch | 19 -
tck/tck-viewer-wicket/pom.xml | 105 ---
.../java/viewer/wicket/app/TckApplication.java | 41 -
.../main/java/viewer/wicket/app/application.css | 31 -
.../src/main/resources/images/Default.png | Bin 3016 -> 0 bytes
.../src/main/webapp/WEB-INF/isis.properties | 60 --
.../src/main/webapp/WEB-INF/logging.properties | 30 -
.../src/main/webapp/WEB-INF/security_file.allow | 16 -
.../main/webapp/WEB-INF/security_file.passwords | 20 -
.../src/main/webapp/WEB-INF/web.xml | 45 -
.../src/main/webapp/images/banner.pdn | Bin 176237 -> 0 bytes
.../src/main/webapp/images/banner.png | Bin 83060 -> 0 bytes
1159 files changed, 40572 insertions(+), 40573 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/pom.xml b/mothballed/tck/pom.xml
new file mode 100644
index 0000000..6f1b2cd
--- /dev/null
+++ b/mothballed/tck/pom.xml
@@ -0,0 +1,226 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ <relativePath>../core/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck</artifactId>
+
+ <name>Isis TCK App</name>
+
+ <packaging>pom</packaging>
+
+ <properties>
+ <!-- must be consistent with the versions defined by the JDO Objectstore -->
+ <jdo-api.version>3.1-rc1</jdo-api.version>
+ <datanucleus-core.version>4.0.6</datanucleus-core.version>
+ <datanucleus-api-jdo.version>4.0.5</datanucleus-api-jdo.version>
+ <datanucleus-jdo-query.version>4.0.4</datanucleus-jdo-query.version>
+ <datanucleus-rdbms.version>4.0.11</datanucleus-rdbms.version>
+
+ <datanucleus-jodatime.version>4.0.6</datanucleus-jodatime.version>
+ <datanucleus-maven-plugin.version>4.0.0-release</datanucleus-maven-plugin.version>
+
+ </properties>
+
+ <repositories>
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache Snapshots</name>
+ <url>https://repository.apache.org/content/repositories/snapshots/</url>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.1</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ <executions>
+ <execution>
+ <id>source</id>
+ <phase>compile</phase>
+ </execution>
+ <execution>
+ <id>test</id>
+ <phase>test-compile</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.16</version>
+ <configuration>
+ <excludes>
+ <exclude>**/Test*.java</exclude>
+ </excludes>
+ <useFile>true</useFile>
+ <printSummary>false</printSummary>
+ <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>2.16</version>
+ <configuration>
+ <showSuccess>false</showSuccess>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>test</phase>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>${jetty.version}</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <version>2.2</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+
+ <!-- DataNucleus -->
+ <dependency>
+ <groupId>javax.jdo</groupId>
+ <artifactId>jdo-api</artifactId>
+ <version>${jdo-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-core</artifactId>
+ <version>${datanucleus-core.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-api-jdo</artifactId>
+ <version>${datanucleus-api-jdo.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-jdo-query</artifactId>
+ <version>${datanucleus-jdo-query.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-rdbms</artifactId>
+ <version>${datanucleus-rdbms.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-jodatime</artifactId>
+ <version>${datanucleus-jodatime.version}</version>
+ </dependency>
+
+ <!-- TCK -->
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-dom</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-fixture</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-integtests</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-viewer-restfulobjects</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </dependency>
+
+ </dependencies>
+
+ </dependencyManagement>
+
+ <modules>
+ <module>tck-dom</module>
+ <module>tck-fixture</module>
+ <module>tck-integtests</module>
+ <module>tck-viewer-restfulobjects</module>
+ <module>tck-viewer-wicket</module>
+ </modules>
+
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/.gitignore
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/.gitignore b/mothballed/tck/tck-dom/.gitignore
new file mode 100644
index 0000000..0a37d92
--- /dev/null
+++ b/mothballed/tck/tck-dom/.gitignore
@@ -0,0 +1,19 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+.project
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/log4j.properties
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/log4j.properties b/mothballed/tck/tck-dom/log4j.properties
new file mode 100644
index 0000000..155ae59
--- /dev/null
+++ b/mothballed/tck/tck-dom/log4j.properties
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+
+
+# Basic logging goes to "datanucleus.log"
+log4j.appender.A1=org.apache.log4j.FileAppender
+log4j.appender.A1.File=datanucleus.log
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
+#log4j.appender.A1.Threshold=INFO
+
+# Categories
+# Each category can be set to a "level", and to direct to an appender
+
+# Default to DEBUG level for all DataNucleus categories
+log4j.logger.DataNucleus = DEBUG, A1
+
+log4j.category.com.mchange.v2.c3p0=INFO, A1
+log4j.category.com.mchange.v2.resourcepool=INFO, A1
+log4j.category.org.logicalcobwebs.proxool=INFO,A1
+
+
+# Hbase libs logging
+log4j.category.org.apache.hadoop=INFO,A1
+log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/pom.xml b/mothballed/tck/tck-dom/pom.xml
new file mode 100644
index 0000000..cd8b414
--- /dev/null
+++ b/mothballed/tck/tck-dom/pom.xml
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-tck-dom</artifactId>
+ <name>Isis TCK DOM</name>
+
+ <profiles>
+ <profile>
+ <id>isis-jdo-objectstore</id>
+ <activation>
+ <property>
+ <name>component</name>
+ <value>isis-jdo-objectstore</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-maven-plugin</artifactId>
+ <version>${datanucleus-maven-plugin.version}</version>
+ <configuration>
+ <fork>false</fork>
+ <verbose>true</verbose>
+ <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ </plugins>
+ <pluginManagement>
+ <plugins>
+ <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>
+ org.datanucleus
+ </groupId>
+ <artifactId>
+ datanucleus-maven-plugin
+ </artifactId>
+ <versionRange>
+ [4.0.0-release,)
+ </versionRange>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <ignore/>
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+ </profile>
+ </profiles>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-applib</artifactId>
+ </dependency>
+
+ <!-- DataNucleus -->
+ <dependency>
+ <groupId>javax.jdo</groupId>
+ <artifactId>jdo-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-api-jdo</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-jdo-query</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-rdbms</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.datanucleus</groupId>
+ <artifactId>datanucleus-jodatime</artifactId>
+ </dependency>
+
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/appended-resources/supplemental-models.xml b/mothballed/tck/tck-dom/src/main/appended-resources/supplemental-models.xml
new file mode 100644
index 0000000..bbf2a84
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/appended-resources/supplemental-models.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<supplementalDataModels
+ xmlns="http://maven.apache.org/supplemental-model/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0
+ http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
+
+</supplementalDataModels>
[02/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
deleted file mode 100644
index aa01426..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private RestfulRequest request;
- private RestfulResponse<UserRepresentation> restfulResponse;
- private UserRepresentation repr;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- }
-
- @Test
- public void noFollow() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "user");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getSelf().getValue(), is(nullValue()));
- assertThat(repr.getUp().getValue(), is(nullValue()));
- }
-
- @Test
- public void self() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "user")
- .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.SELF.getName() + "]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getSelf().getValue(), is(not(nullValue())));
- }
-
- @Test
- public void up() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "user")
- .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.UP.getName() + "]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getUp().getValue(), is(not(nullValue())));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java
deleted file mode 100644
index e467907..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_ok.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import javax.ws.rs.core.MediaType;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "user");
- }
-
- @Test
- public void applicationJson_noProfile_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
- final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.USER.getMediaType()));
- }
-
- @Test
- public void applicationJson_profileUser_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
- final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
- @Test
- public void missingHeader_returns200() throws Exception {
-
- final RestfulResponse<UserRepresentation> restfulResp = request.executeT();
-
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
deleted file mode 100644
index ebf1b96..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import javax.ws.rs.core.MediaType;
-import org.jboss.resteasy.client.ClientRequest;
-import org.jboss.resteasy.client.ClientResponse;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void applicationJson_profileIncorrect_returns406() throws Exception {
-
- // given
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "user");
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
-
- // when
- final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
- @Test
- public void incorrectMediaType_returns406() throws Exception {
-
- // given
- final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("user");
- clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
-
- // when
- final ClientResponse<?> resp = clientRequest.get();
- final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java
deleted file mode 100644
index 1fd9e68..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Post_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private UserResource userResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- userResource = client.getUserResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = userResource.user();
- final RestfulResponse<UserRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final UserRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the user resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java
deleted file mode 100644
index 67df477..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Put_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private UserResource userResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- userResource = client.getUserResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = userResource.user();
- final RestfulResponse<UserRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final UserRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation putLink = selfLink.withMethod(RestfulHttpMethod.PUT);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(putLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the user resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java
deleted file mode 100644
index 7114ab7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Delete_then_405_bad.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getVersionResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
-
- // given
- final Response resp = resource.version();
-
- final RestfulResponse<VersionRepresentation> jsonResp = RestfulResponse.ofT(resp);
- final VersionRepresentation repr = jsonResp.getEntity();
- final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the version resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
deleted file mode 100644
index 7c687cb..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getVersionResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
deleted file mode 100644
index a202434..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getVersionResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java
deleted file mode 100644
index e2b9276..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenRepresentation_ok.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
-import static org.hamcrest.CoreMatchers.endsWith;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getVersionResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response servicesResp = resource.version();
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(servicesResp);
- assertThat(restfulResponse.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- // then
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
-
- final VersionRepresentation repr = restfulResponse.getEntity();
- assertThat(repr, is(not(nullValue())));
- assertThat(repr, isMap());
-
- assertThat(repr.getSelf(), isLink(client)
- .rel(Rel.SELF)
- .href(endsWith(":39393/version"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.VERSION.getMediaType())
- .returning(HttpStatusCode.OK)
- );
- assertThat(repr.getUp(), isLink(client)
- .rel(Rel.UP)
- .href(endsWith(":39393/"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.HOME_PAGE.getMediaType())
- .returning(HttpStatusCode.OK)
- );
-
- assertThat(repr.getString("specVersion"), is("1.0.0"));
- assertThat(repr.getString("implVersion"), is(not(nullValue())));
- //assertThat(repr.getString("implVersion"), is(not("UNKNOWN")));
-
- final JsonRepresentation optionalCapbilitiesRepr = repr.getOptionalCapabilities();
- assertThat(optionalCapbilitiesRepr, isMap());
-
- assertThat(optionalCapbilitiesRepr.getString("blobsClobs"), is("yes"));
- assertThat(optionalCapbilitiesRepr.getString("deleteObjects"), is("yes"));
- assertThat(optionalCapbilitiesRepr.getString("domainModel"), is("formal"));
- assertThat(optionalCapbilitiesRepr.getString("validateOnly"), is("yes"));
- assertThat(optionalCapbilitiesRepr.getString("protoPersistentObjects"), is("yes"));
-
- assertThat(repr.getLinks(), isArray());
- assertThat(repr.getExtensions(), is(not(nullValue())));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java
deleted file mode 100644
index 93cf511..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_CacheControl_ok.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMaxAge;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.CacheControl;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_CacheControl_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getVersionResource();
- }
-
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.version();
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- final CacheControl cacheControl = restfulResponse.getHeader(Header.CACHE_CONTROL);
- assertThat(cacheControl, hasMaxAge(24 * 60 * 60));
- assertThat(cacheControl.getMaxAge(), is(24 * 60 * 60));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
deleted file mode 100644
index 085eb69..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentLength_ok.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentLength_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getVersionResource();
- }
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.version();
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(100)));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java
deleted file mode 100644
index 70a1fb1..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_thenResponseHeaders_ContentType_ok.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasParameter;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasSubType;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_ContentType_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- resource = client.getVersionResource();
- }
-
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.version();
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- final MediaType contentType = restfulResponse.getHeader(Header.CONTENT_TYPE);
- assertThat(contentType, hasMediaType("application"));
- assertThat(contentType, hasSubType("json"));
- assertThat(contentType, hasParameter("profile", "urn:org.restfulobjects:repr-types/version"));
- assertThat(contentType, is(RepresentationType.VERSION.getMediaType()));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index 6787203..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- request = client.createRequest(RestfulHttpMethod.GET, "version");
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
deleted file mode 100644
index bceefbf..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenQueryArg_xRoFollowLinks_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private RestfulRequest request;
- private RestfulResponse<VersionRepresentation> restfulResponse;
- private VersionRepresentation repr;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- }
-
- @Test
- public void noFollow() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "version");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getSelf().getValue(), is(nullValue()));
- assertThat(repr.getUp().getValue(), is(nullValue()));
- }
-
- @Test
- public void self() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "version")
- .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.SELF.getName() + "]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getSelf().getValue(), is(not(nullValue())));
- }
-
- @Test
- public void up() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "version")
- .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.UP.getName() + "]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getUp().getValue(), is(not(nullValue())));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java
deleted file mode 100644
index 41657e2..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_ok.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.MediaType;
-
-import org.jboss.resteasy.client.ClientRequest;
-import org.jboss.resteasy.client.ClientResponse;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenRequestHeaders_Accept_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "version");
- }
-
- @Test
- public void applicationJson_noProfile_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.VERSION.getMediaType()));
- }
-
-
- @Test
- public void applicationJson_profileVersion_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
- @Test
- public void missingHeader_returns200() throws Exception {
-
- final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
-
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
deleted file mode 100644
index 2cc8d9f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import javax.ws.rs.core.MediaType;
-import org.jboss.resteasy.client.ClientRequest;
-import org.jboss.resteasy.client.ClientResponse;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_whenInvalid_then_406_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void applicationJson_profileIncorrect_returns406() throws Exception {
-
- // given
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "version");
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
- @Test
- public void incorrectMediaType_returnsNotAcceptable() throws Exception {
-
- // given
- final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("version");
- clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
-
- // when
- final ClientResponse<?> resp = clientRequest.get();
- final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java
deleted file mode 100644
index 4e067c7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Post_then_405_bad.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getVersionResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response resp = resource.version();
-
- final RestfulResponse<VersionRepresentation> jsonResp = RestfulResponse.ofT(resp);
- final VersionRepresentation repr = jsonResp.getEntity();
- final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the version resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java
deleted file mode 100644
index 7944cd6..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/version/Put_then_405_bad.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.version;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private VersionResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getVersionResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response resp = resource.version();
-
- final RestfulResponse<VersionRepresentation> jsonResp = RestfulResponse.ofT(resp);
- final VersionRepresentation repr = jsonResp.getEntity();
- final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation putLink = selfLink.withMethod(RestfulHttpMethod.PUT);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(putLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the version resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch b/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch
deleted file mode 100644
index a50d466..0000000
--- a/tck/tck-viewer-wicket/ide/eclipse/launch/viewer-wicket-tck.launch
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="isis-viewer-wicket-tck"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/pom.xml
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/pom.xml b/tck/tck-viewer-wicket/pom.xml
deleted file mode 100644
index 0183d84..0000000
--- a/tck/tck-viewer-wicket/pom.xml
+++ /dev/null
@@ -1,105 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-tck-viewer-wicket</artifactId>
- <version>1.9.0-SNAPSHOT</version>
-
- <name>Isis TCK Wicket Viewer tests</name>
-
-
- <properties>
- <siteBaseDir>..</siteBaseDir>
- <relativeUrl>wicket-tck/</relativeUrl>
- <!-- until someone comes up with a better solution -->
- <distMgmtSiteUrl>file:///tmp/m2-sites/isis/viewer/wicket</distMgmtSiteUrl>
- </properties>
-
- <packaging>war</packaging>
-
- <build>
- <resources>
- <resource>
- <directory>src/main/resources</directory>
- </resource>
- <resource>
- <directory>src/main/java</directory>
- <includes>
- <include>**</include>
- </includes>
- <excludes>
- <exclude>**/*.java</exclude>
- </excludes>
- </resource>
- </resources>
- <plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
-
- <!-- other modules in this project -->
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-dom</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-fixture</artifactId>
- </dependency>
-
- <!-- isis viewer -->
- <dependency>
- <groupId>org.apache.isis.viewer</groupId>
- <artifactId>isis-viewer-wicket-impl</artifactId>
- </dependency>
-
- <!-- isis runtime -->
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-security</artifactId>
- </dependency>
-
- <!-- to run using WebServer -->
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-webserver</artifactId>
- <scope>runtime</scope>
- <optional>true</optional>
- </dependency>
-
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java b/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java
deleted file mode 100644
index a6f375a..0000000
--- a/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/TckApplication.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package viewer.wicket.app;
-
-import com.google.inject.AbstractModule;
-import com.google.inject.Module;
-import com.google.inject.util.Modules;
-
-import org.apache.isis.viewer.wicket.viewer.IsisWicketApplication;
-
-public class TckApplication extends IsisWicketApplication {
-
- private static final long serialVersionUID = 1L;
-
- @Override
- protected Module newIsisWicketModule() {
- return Modules.override(super.newIsisWicketModule()).with(new AbstractModule() {
- @Override
- protected void configure() {
- // bindConstant().annotatedWith(ApplicationCssUrl.class).to("myapp.css");
- }
- });
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css b/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css
deleted file mode 100644
index a82d472..0000000
--- a/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-#header {
- background: url('images/banner.png') no-repeat scroll left center transparent;
-}
-div.entitySummary > label.entityTitle {
- color: maroon;
- font-size: xx-large;
- font-weight: bolder;
-}
-.ToDoItem-description .scalarName {
- color: maroon;
- font-weight: bolder;
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/resources/images/Default.png b/tck/tck-viewer-wicket/src/main/resources/images/Default.png
deleted file mode 100644
index 8409e46..0000000
Binary files a/tck/tck-viewer-wicket/src/main/resources/images/Default.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties b/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties
deleted file mode 100644
index a6b56f5..0000000
--- a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties
+++ /dev/null
@@ -1,60 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-isis.services.prefix = org.apache.isis.tck.objstore.dflt
-isis.services =\
- scalars.ApplibValuedEntityRepositoryDefault,\
- scalars.JdkValuedEntityRepositoryDefault,\
- scalars.PrimitiveValuedEntityRepositoryDefault,\
- scalars.WrapperValuedEntityRepositoryDefault, \
- simples.SimpleEntityRepositoryDefault,\
- assocs.ParentEntityRepositoryDefault
-
-isis.fixtures.prefix= org.apache.isis.tck.fixture
-isis.fixtures=\
- LogonAsSvenFixture,\
- scalars.ApplibValuedEntityFixture,\
- scalars.JdkValuedEntityFixture,\
- scalars.PrimitiveValuedEntityFixture,\
- scalars.WrapperValuedEntityFixture,\
- simples.SimpleEntityFixture,\
- assocs.ParentAndChildEntityFixture
-
-
-
-isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.javassist.objectfactory.JavassistObjectFactory
-#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.identity.objectfactory.ObjectFactoryBasic
-
-
-isis.persistor.domain-object-container=org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault
-#isis.persistor.domain-object-container=org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerWrapperFactory
-
-
-#isis.reflector.facets.include=org.apache.isis.runtimes.dflt.runtime.authorization.standard.AuthorizationFacetFactoryImpl
-#isis.authorization.learn=true
-
-
-
-isis.persistor=in-memory
-#isis.xmlos.dir=/tmp/xml
-
-isis.authentication=bypass
-
-###############################
-# wicket-viewer specific
-###############################
-#isis.reflector.facets.include=org.apache.isis.viewer.wicket.metamodel.wizardpagedesc.WizardPageDescriptionAnnotationFacetFactory
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties b/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties
deleted file mode 100644
index f2d65e6..0000000
--- a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# apache's log4j is used to provide system logging.
-log4j.rootCategory=INFO, Console
-
-# The console appender
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.target=System.out
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n
-
-log4j.appender.File=org.apache.log4j.RollingFileAppender
-log4j.appender.File.file=isis.log
-log4j.appender.File.append=false
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow b/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow
deleted file mode 100644
index 928983a..0000000
--- a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow
+++ /dev/null
@@ -1,16 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords b/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords
deleted file mode 100644
index 7f07af5..0000000
--- a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords
+++ /dev/null
@@ -1,20 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-sven:pass
-dick:pass
-bob:pass
-joe:pass
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml b/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 27f24b4..0000000
--- a/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <display-name>claims</display-name>
-
- <filter>
- <filter-name>wicket.claims</filter-name>
- <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
- <init-param>
- <param-name>applicationClassName</param-name>
- <param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketUnsecuredApplication</param-value>
- <!--
- <param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketApplication</param-value>
- <param-value>viewer.wicket.app.ToDoApplication</param-value>
- -->
- </init-param>
- </filter>
-
- <filter-mapping>
- <filter-name>wicket.claims</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn b/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn
deleted file mode 100644
index 1836bf5..0000000
Binary files a/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn and /dev/null differ
[08/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index f053b03..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-public class Get_thenResponseHeaders_eTag_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java
deleted file mode 100644
index 236942f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistActn_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-public class Get_whenDoesntExistActn_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java
deleted file mode 100644
index 5b3f3f8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenDoesntExistOid_then_404.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenDoesntExistOid_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void notFound_usingTemplatedMethod() throws Exception {
-
- // when
- final Response resp = resource.service("nonExistentServiceId");
- final RestfulResponse<JsonRepresentation> jsonResp = RestfulResponse.of(resp);
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index 6bcce0c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- request = client.createRequest(RestfulHttpMethod.GET, "/objects/RTNE/78/actions/contains");
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<ObjectActionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<ObjectActionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
deleted file mode 100644
index e20db4d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
deleted file mode 100644
index f27a9f2..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-public class Get_whenRequestHeaders_Accept_isInvalid_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java
deleted file mode 100644
index 00a0a7c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_whenRequestHeaders_Accept_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-public class Get_whenRequestHeaders_Accept_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java
deleted file mode 100644
index 2917e30..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenObjectResource_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_givenObjectResource_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
- final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to an action prompt resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java
deleted file mode 100644
index fe6cf33..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Post_givenServiceResource_then_405_bad.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_givenServiceResource_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response actionPromptResp = serviceResource.actionPrompt("ActionsEntities", "subListWithOptionalRange");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
- final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to an action prompt resource is not allowed."));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java
deleted file mode 100644
index 83c086a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenObjectResource_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_givenObjectResource_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
- final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.PUT);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to an action prompt resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java
deleted file mode 100644
index 73c0bd6..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Put_givenServiceResource_then_405_bad.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_givenServiceResource_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response actionPromptResp = serviceResource.actionPrompt("ActionsEntities", "subListWithOptionalRange");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
- final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.PUT);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to an action prompt resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java
deleted file mode 100644
index 1dbcecc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenObjectAction_thenResponseCode_405_bad.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Delete_givenObjectAction_thenResponseCode_405_bad {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java
deleted file mode 100644
index 66bb000..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Delete_givenServiceAction_thenResponseCode_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.*;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_givenServiceAction_thenResponseCode_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final LinkRepresentation deleteLink = invokeLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
-
- // then
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting an action invocation resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java
deleted file mode 100644
index 3bd0dea..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenActionSemanticsOfIdempotent_thenResponseCode_205_bad_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Ignore("to write - copied from req_safe")
- @Test
- public void usingClientFollow() throws Exception {
-
- // given, when
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- invokeLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- // not possible to test using resourceProxy
-
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java
deleted file mode 100644
index 7ed8a17..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenActionSemanticsOfNotIdempotent_thenResponseCode_205_bad_TOFIX {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Ignore("to write - copied from req_safe")
- @Test
- public void usingClientFollow() throws Exception {
-
- // given, when
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- invokeLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- // not possible to test using resourceProxy
-
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java
deleted file mode 100644
index 3c054c5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenActionSemanticsOfSafe_ok.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenActionSemanticsOfSafe_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE.andParam("action", "list"))
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/list/invoke"))
- .arguments(JsonRepresentation.newMap())
- .build());
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
-
- // then
- then(restfulResponse);
- }
-
- private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
-
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
- final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
- assertThat(listRepr.getValue().size(), is(5));
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- then(restfulResponse);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java
deleted file mode 100644
index a9e2e20..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenDisabled_thenResponseCode_203.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenDisabled_thenResponseCode_203 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given, when
- final JsonRepresentation givenAction = Util.givenAction(client, "BusinessRulesEntities", "visibleButNotInvocableAction");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- // then
- final String disabledReason = actionRepr.getDisabledReason();
- assertThat(disabledReason, is("Always disabled"));
-
-
- final LinkRepresentation invokeLink = new LinkRepresentation()
- .withRel(Rel.INVOKE)
- .withHref("http://localhost:39393/services/BusinessRulesEntities/actions/visibleButNotInvocableAction/invoke");
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse, disabledReason);
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("id.value", 123);
-
- Response response = serviceResource.invokeActionQueryOnly("BusinessRulesEntities", "visibleButNotInvocableAction", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse, "Always disabled");
- }
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse, String disabledReason) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.FORBIDDEN));
- assertThat(restfulResponse.getHeader(Header.WARNING), is(disabledReason));
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
deleted file mode 100644
index 5d11870..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
deleted file mode 100644
index 04f61d1..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java
deleted file mode 100644
index 37e849b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgMissing_bad.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenMandatorySimpleArg_whenArgMissing_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args = JsonRepresentation.newMap();
- // nothing for 'from'
- args.mapPut("to.value", 0);
- assertThat(args.size(), is(1));
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- // nothing for 'from'
- args.mapPut("to.value", 0);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("No argument found for (mandatory) parameter 'from'"));
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
-
- RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
- JsonRepresentation repr = restfulResponseOfError.getEntity();
-
- assertThat(repr.getString("x-ro-invalidReason"), is("No argument found for (mandatory) parameter 'from'"));
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java
deleted file mode 100644
index 9e4de16..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMandatorySimpleArg_whenArgNullValue_bad.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenMandatorySimpleArg_whenArgNullValue_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args.mapPut("from.value", (Integer)null);
- args.mapPut("to.value", 0);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from.value", (Integer)null);
- args.mapPut("to.value", 0);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- thenResponseIsErrorWithInvalidReason(restfulResponse);
- }
-
- private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("Validation failed, see body for details"));
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
-
- RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
- JsonRepresentation repr = restfulResponseOfError.getEntity();
-
- assertThat(repr.getString("from.invalidReason"), is("'from' is mandatory"));
- // TODO: really ought to be null, but ObjectActionImpl.isProposedArgumentSetValidResultSet also checks that each argument is valid
- assertThat(repr.getString("x-ro-invalidReason"), is("'from' is mandatory"));
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java
deleted file mode 100644
index 68c6ccd..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenMultipleArgsOfEveryType_whenArgsCorrect_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java
deleted file mode 100644
index c9c3e99..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenNoArgRequired_whenNoArgProvided_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/list/invoke"))
- .arguments(JsonRepresentation.newMap())
- .build());
-
- // when
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
-
- // then
- then(restfulResponse);
- }
-
- private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
-
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
- final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
- assertThat(listRepr.getValue().size(), is(5));
- }
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- then(restfulResponse);
- }
-
-}
[45/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java
new file mode 100644
index 0000000..134d76a
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype3Entity.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIS3")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PIS3")
+public class PolyInterfaceSubtype3Entity extends BaseEntity implements PolyInterface {
+
+
+
+ // {{ Parent (title #1)
+ private PolyInterfaceParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public PolyInterfaceParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final PolyInterfaceParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Baz (property)
+ private java.math.BigDecimal boz;
+
+ @MemberOrder(sequence = "1")
+ public java.math.BigDecimal getBoz() {
+ return boz;
+ }
+
+ public void setBoz(final java.math.BigDecimal baz) {
+ this.boz = baz;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java
new file mode 100644
index 0000000..645e03e
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ReferencingEntity.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.annotation.NotPersisted;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("RFCG")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("RFCG")
+public class ReferencingEntity extends BaseEntity {
+
+
+ // {{ Reference
+ private SimpleEntity reference;
+
+ public SimpleEntity getReference() {
+ return reference;
+ }
+
+ public void setReference(final SimpleEntity reference) {
+ this.reference = reference;
+ }
+
+ // }}
+
+ // {{ AggregatedEntity
+ private AggregatedEntity aggregatedReference;
+
+ public AggregatedEntity getAggregatedReference() {
+ return aggregatedReference;
+ }
+
+ public void setAggregatedReference(final AggregatedEntity aggregatedReference) {
+ this.aggregatedReference = aggregatedReference;
+ }
+
+ public AggregatedEntity addAggregatedReference() {
+ final AggregatedEntity aggregatedEntity = newAggregatedInstance(AggregatedEntity.class);
+ setAggregatedReference(aggregatedEntity);
+ return aggregatedEntity;
+ }
+ // }}
+
+ // {{ AggregatedEntities
+ private List<AggregatedEntity> aggregatedEntities = Lists.newArrayList();
+
+ public List<AggregatedEntity> getAggregatedEntities() {
+ return aggregatedEntities;
+ }
+
+ public void setAggregatedEntities(List<AggregatedEntity> aggregatedEntities) {
+ this.aggregatedEntities = aggregatedEntities;
+ }
+
+ public AggregatedEntity addAggregatedEntityToCollection() {
+ final AggregatedEntity aggregatedEntity = newAggregatedInstance(AggregatedEntity.class);
+ getAggregatedEntities().add(aggregatedEntity);
+ return aggregatedEntity;
+ }
+ // }}
+
+ // {{ NotPersisted
+ @NotPersisted
+ public SimpleEntity getNotPersisted() {
+ throw new org.apache.isis.applib.NonRecoverableException("unexpected call");
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java
new file mode 100644
index 0000000..89c3fc4
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/SimpleEntity.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.Date;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.NotPersisted;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("SMPL")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("SMPL")
+public class SimpleEntity extends BaseEntity {
+
+ // {{ name: String (title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+ // {{ Date: java.util.Date
+ private Date date;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(final Date date) {
+ this.date = date;
+ }
+ // }}
+
+ // {{ Size: int
+ private int size;
+
+ @MemberOrder(sequence = "1")
+ public int getSize() {
+ return size;
+ }
+
+ public void setSize(final int size) {
+ this.size = size;
+ }
+
+ // }}
+
+ // {{ Nullable: long
+ private Long number;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Long getNullable() {
+ return number;
+ }
+
+ public void setNullable(final Long number) {
+ this.number = number;
+ }
+
+ // }}
+
+ // {{ NotPersisted: int (nb: throws exception if called)
+ @NotPersisted
+ public int getNotPersisted() {
+ throw new org.apache.isis.applib.NonRecoverableException("unexpected call");
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java
new file mode 100644
index 0000000..8015cbc
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkChildEntity.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("UDFC")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("UDFC")
+public class UnidirFkChildEntity extends AbstractDomainObject {
+
+
+ // {{ Name (title)
+ private String name;
+
+ @Title(sequence="1")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java
new file mode 100644
index 0000000..f2be389
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntity.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("UDFP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("UDFP")
+public class UnidirFkParentEntity extends BaseEntity {
+
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Children
+ private Set<UnidirFkChildEntity> children = new HashSet<UnidirFkChildEntity>();
+
+ public Set<UnidirFkChildEntity> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final Set<UnidirFkChildEntity> children) {
+ this.children = children;
+ }
+ // }}
+
+
+ // {{ newChild (action)
+ public UnidirFkChildEntity newChild(final String name) {
+ final UnidirFkChildEntity childEntity = newTransientInstance(UnidirFkChildEntity.class);
+ childEntity.setName(name);
+ addChild(childEntity);
+ return childEntity;
+ }
+ // }}
+
+
+ // {{ removeChild (action)
+ public void addChild(UnidirFkChildEntity childEntity) {
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ }
+ // }}
+
+ // {{ removeChild (action)
+ public UnidirFkParentEntity removeChild(final UnidirFkChildEntity childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ }
+ return this;
+ }
+
+ public List<UnidirFkChildEntity> choices0RemoveChild() {
+ return Arrays.asList(getChildren().toArray(new UnidirFkChildEntity[0]));
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java
new file mode 100644
index 0000000..5277df6
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirFkParentEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("UnidirFkParentEntities")
+@ObjectType("UnidirFkParentEntities")
+@DomainService
+public class UnidirFkParentEntityRepository extends AbstractEntityRepository<UnidirFkParentEntity> {
+
+ public UnidirFkParentEntityRepository() {
+ super(UnidirFkParentEntity.class, "UnidirParentEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public UnidirFkParentEntity newEntity(final String name) {
+ final UnidirFkParentEntity entity = newTransientInstance(UnidirFkParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java
new file mode 100644
index 0000000..6452ee6
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinChildEntity.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("UDJC")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("UDJC")
+public class UnidirJoinChildEntity extends AbstractDomainObject {
+
+
+ // {{ Name (title)
+ private String name;
+
+ @Title(sequence="1")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java
new file mode 100644
index 0000000..3cf7dcc
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntity.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Join;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("UDJP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("UDJP")
+public class UnidirJoinParentEntity extends BaseEntity {
+
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Children
+ @Join
+ private Set<UnidirJoinChildEntity> children = new HashSet<UnidirJoinChildEntity>();
+
+ public Set<UnidirJoinChildEntity> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final Set<UnidirJoinChildEntity> children) {
+ this.children = children;
+ }
+ // }}
+
+
+ // {{ newChild (action)
+ public UnidirJoinChildEntity newChild(final String name) {
+ final UnidirJoinChildEntity childEntity = newTransientInstance(UnidirJoinChildEntity.class);
+ childEntity.setName(name);
+ addChild(childEntity);
+ return childEntity;
+ }
+ // }}
+
+
+ // {{ removeChild (action)
+ public void addChild(UnidirJoinChildEntity childEntity) {
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ }
+ // }}
+
+ // {{ removeChild (action)
+ public UnidirJoinParentEntity removeChild(final UnidirJoinChildEntity childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ }
+ return this;
+ }
+
+ public List<UnidirFkChildEntity> choices0RemoveChild() {
+ return Arrays.asList(getChildren().toArray(new UnidirFkChildEntity[0]));
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java
new file mode 100644
index 0000000..47da2d4
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirJoinParentEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("UnidirJoinParentEntities")
+@ObjectType("UnidirJoinParentEntities")
+@DomainService
+public class UnidirJoinParentEntityRepository extends AbstractEntityRepository<UnidirJoinParentEntity> {
+
+ public UnidirJoinParentEntityRepository() {
+ super(UnidirJoinParentEntity.class, "UnidirJoinParentEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public UnidirJoinParentEntity newEntity(final String name) {
+ final UnidirJoinParentEntity entity = newTransientInstance(UnidirJoinParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java
new file mode 100644
index 0000000..9049cad
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntity.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("UDRD")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("UDRD")
+public class UnidirReferencedEntity extends AbstractDomainObject {
+
+
+ // {{ Name (title)
+ private String name;
+
+ @Title(sequence="1")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java
new file mode 100644
index 0000000..6decf98
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencedEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("UnidirReferencedEntities")
+@ObjectType("UnidirReferencedEntities")
+@DomainService
+public class UnidirReferencedEntityRepository extends AbstractEntityRepository<UnidirReferencedEntity> {
+
+ public UnidirReferencedEntityRepository() {
+ super(UnidirReferencedEntity.class, "UnidirReferencedEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public UnidirReferencedEntity newEntity(final String name) {
+ final UnidirReferencedEntity entity = newTransientInstance(UnidirReferencedEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java
new file mode 100644
index 0000000..170968f
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntity.java
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("UDRG")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("UDRG")
+public class UnidirReferencingEntity extends BaseEntity {
+
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Referenced (property)
+ public UnidirReferencedEntity referenced;
+
+ @MemberOrder(sequence = "1")
+ public UnidirReferencedEntity getReferenced() {
+ return referenced;
+ }
+
+ public void setReferenced(final UnidirReferencedEntity referenced) {
+ this.referenced = referenced;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java
new file mode 100644
index 0000000..9100601
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/UnidirReferencingEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("UnidirReferencingEntities")
+@ObjectType("UnidirReferencingEntities")
+@DomainService
+public class UnidirReferencingEntityRepository extends AbstractEntityRepository<UnidirReferencingEntity> {
+
+ public UnidirReferencingEntityRepository() {
+ super(UnidirReferencingEntity.class, "UnidirReferencingEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public UnidirReferencingEntity newEntity(final String name) {
+ final UnidirReferencingEntity entity = newTransientInstance(UnidirReferencingEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java
new file mode 100644
index 0000000..0206039
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntity.java
@@ -0,0 +1,267 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.applib.value.Color;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.DateTime;
+import org.apache.isis.applib.value.Image;
+import org.apache.isis.applib.value.Money;
+import org.apache.isis.applib.value.Password;
+import org.apache.isis.applib.value.Percentage;
+import org.apache.isis.applib.value.Time;
+import org.apache.isis.applib.value.TimeStamp;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("APLV")
+@javax.jdo.annotations.Query(
+ name="jdkv_findByStringProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.scalars.ApplibValuedEntity WHERE stringProperty == :i")
+@ObjectType("APLV")
+public class ApplibValuedEntity extends AbstractDomainObject {
+
+
+ // {{ StringProperty (also title, pk)
+ private String stringProperty;
+
+ @javax.jdo.annotations.PrimaryKey
+ @Title
+ @Optional
+ @MemberOrder(sequence = "1")
+ public String getStringProperty() {
+ return stringProperty;
+ }
+
+ public void setStringProperty(final String description) {
+ this.stringProperty = description;
+ }
+
+ public ApplibValuedEntity updateStringProperty(
+ @Optional final String description) {
+ setStringProperty(stringProperty);
+ return this;
+ }
+
+ // }}
+
+
+
+ // {{ DateProperty
+ @javax.jdo.annotations.Persistent
+ private Date dateProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Date getDateProperty() {
+ return dateProperty;
+ }
+
+ public void setDateProperty(final Date dateProperty) {
+ this.dateProperty = dateProperty;
+ }
+
+ public ApplibValuedEntity updateDateProperty(
+ @Optional final Date dateProperty) {
+ setDateProperty(dateProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ ColorProperty
+ @javax.jdo.annotations.NotPersistent
+ private Color colorProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Color getColorProperty() {
+ return colorProperty;
+ }
+
+ public void setColorProperty(final Color colorProperty) {
+ this.colorProperty = colorProperty;
+ }
+
+ public ApplibValuedEntity updateColorProperty(
+ @Optional final Color colorProperty) {
+ setColorProperty(colorProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ DateTimeProperty
+ @javax.jdo.annotations.NotPersistent
+ private DateTime dateTimeProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public DateTime getDateTimeProperty() {
+ return dateTimeProperty;
+ }
+
+ public void setDateTimeProperty(final DateTime dateTimeProperty) {
+ this.dateTimeProperty = dateTimeProperty;
+ }
+
+ public ApplibValuedEntity updateDateTimeProperty(
+ @Optional final DateTime dateTimeProperty) {
+ setDateTimeProperty(dateTimeProperty);
+ return this;
+ }
+ // }}
+
+ // {{ ImageProperty
+ @javax.jdo.annotations.NotPersistent
+ private Image imageProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Image getImageProperty() {
+ return imageProperty;
+ }
+
+ public void setImageProperty(final Image imageProperty) {
+ this.imageProperty = imageProperty;
+ }
+
+ public ApplibValuedEntity updateImageProperty(
+ @Optional final Image imageProperty) {
+ setImageProperty(imageProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ MoneyProperty
+ @javax.jdo.annotations.NotPersistent
+ private Money moneyProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Money getMoneyProperty() {
+ return moneyProperty;
+ }
+
+ public void setMoneyProperty(final Money moneyProperty) {
+ this.moneyProperty = moneyProperty;
+ }
+
+ public ApplibValuedEntity updateMoneyProperty(
+ @Optional final Money moneyProperty) {
+ this.moneyProperty = moneyProperty;
+ return this;
+ }
+
+ // }}
+
+ // {{ PasswordProperty
+ @javax.jdo.annotations.NotPersistent
+ private Password passwordProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Password getPasswordProperty() {
+ return passwordProperty;
+ }
+
+ public void setPasswordProperty(final Password passwordProperty) {
+ this.passwordProperty = passwordProperty;
+ }
+
+ public ApplibValuedEntity updatePasswordProperty(
+ @Optional final Password passwordProperty) {
+ setPasswordProperty(passwordProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ PercentageProperty
+ @javax.jdo.annotations.NotPersistent
+ private Percentage percentageProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Percentage getPercentageProperty() {
+ return percentageProperty;
+ }
+
+ public void setPercentageProperty(final Percentage percentageProperty) {
+ this.percentageProperty = percentageProperty;
+ }
+
+ public ApplibValuedEntity updatePercentageProperty(
+ @Optional final Percentage percentageProperty) {
+ setPercentageProperty(percentageProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ TimeProperty
+ @javax.jdo.annotations.NotPersistent
+ private Time timeProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Time getTimeProperty() {
+ return timeProperty;
+ }
+
+ public void setTimeProperty(final Time timeProperty) {
+ this.timeProperty = timeProperty;
+ }
+
+ public ApplibValuedEntity updateTimeProperty(
+ @Optional final Time timeProperty) {
+ setTimeProperty(timeProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ TimeStampProperty
+ @javax.jdo.annotations.NotPersistent
+ private TimeStamp timeStampProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public TimeStamp getTimeStampProperty() {
+ return timeStampProperty;
+ }
+
+ public void setTimestampProperty(final TimeStamp timestampProperty) {
+ this.timeStampProperty = timestampProperty;
+ }
+
+ public ApplibValuedEntity updateTimestampProperty(
+ @Optional final TimeStamp timestampProperty) {
+ setTimestampProperty(timestampProperty);
+ return this;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java
new file mode 100644
index 0000000..79c982d
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/ApplibValuedEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("ApplibValuedEntities")
+@ObjectType("ApplibValuedEntities")
+@DomainService
+public class ApplibValuedEntityRepository extends AbstractEntityRepository<ApplibValuedEntity> {
+
+ public ApplibValuedEntityRepository() {
+ super(ApplibValuedEntity.class, "ApplibValuedEntities");
+ }
+
+ /**
+ * Required to discover the ApplibValuedEntity type.
+ */
+ @Override
+ @MemberOrder(sequence = "2")
+ public ApplibValuedEntity newEntity() {
+ return super.newEntity();
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java
new file mode 100644
index 0000000..46be149
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntity.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("AUAS")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("AUAS")
+public class AutoAssignedEntity extends AbstractDomainObject {
+
+
+ // {{ StringProperty (used in title)
+ private String stringProperty;
+
+ @Title(sequence="2")
+ @Optional
+ @MemberOrder(sequence = "1")
+ public String getStringProperty() {
+ return stringProperty;
+ }
+
+ public void setStringProperty(final String description) {
+ this.stringProperty = description;
+ }
+
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java
new file mode 100644
index 0000000..9de9e87
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/AutoAssignedEntityRepository.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("AutoAssignedEntities")
+@ObjectType("AutoAssignedEntities")
+public class AutoAssignedEntityRepository extends AbstractEntityRepository<AutoAssignedEntity> {
+
+ public AutoAssignedEntityRepository() {
+ super(AutoAssignedEntity.class, "AutoAssignedEntities");
+ }
+
+ /**
+ * Required to discover the AutoAssignedEntity type.
+ */
+ @Override
+ @MemberOrder(sequence = "2")
+ public AutoAssignedEntity newEntity() {
+ return super.newEntity();
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java
new file mode 100644
index 0000000..1985e16
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntity.java
@@ -0,0 +1,171 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+/**
+ * TODO: delete ... OVERLAPS WITH ApplibValuedEntity, JdkValuedEntity, JodaValuedEntity
+ *
+ * @deprecated
+ */
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("APLV")
+@javax.jdo.annotations.Query(
+ name="dtmv_findByStringProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.scalars.DateTimeValuedEntity WHERE stringProperty == :i")
+@ObjectType("APLV")
+@Deprecated
+public class DateTimeValuedEntity extends AbstractDomainObject {
+
+
+ // {{ StringProperty (also title, pk)
+ private String stringProperty;
+
+ @javax.jdo.annotations.PrimaryKey
+ @Title
+ @Optional
+ @MemberOrder(sequence = "1")
+ public String getStringProperty() {
+ return stringProperty;
+ }
+
+ public void setStringProperty(final String stringProperty) {
+ this.stringProperty = stringProperty;
+ }
+ // }}
+
+
+ // {{ JavaUtilDate (property)
+ private java.util.Date javaUtilDate;
+
+ @Optional
+ @MemberOrder(name="dates", sequence = "1")
+ public java.util.Date getJavaUtilDate() {
+ return javaUtilDate;
+ }
+
+ public void setJavaUtilDate(final java.util.Date javaUtilDate) {
+ this.javaUtilDate = javaUtilDate;
+ }
+ // }}
+
+ // {{ JavaSqlDate (property)
+ private java.sql.Date javaSqlDate;
+
+ @javax.jdo.annotations.Persistent
+ @Optional
+ @MemberOrder(name="dates", sequence = "1")
+ public java.sql.Date getJavaSqlDate() {
+ return javaSqlDate;
+ }
+
+ public void setJavaSqlDate(final java.sql.Date javaSqlDate) {
+ this.javaSqlDate = javaSqlDate;
+ }
+
+ public DateTimeValuedEntity updateJavaSqlDate(
+ @Optional final java.sql.Date javaSqlDate) {
+ setJavaSqlDate(javaSqlDate);
+ return this;
+ }
+ // }}
+
+ // {{ ApplibDate (property)
+ private org.apache.isis.applib.value.Date applibDate;
+
+ @javax.jdo.annotations.Persistent
+ @Optional
+ @MemberOrder(name="dates", sequence = "1")
+ public org.apache.isis.applib.value.Date getApplibDate() {
+ return applibDate;
+ }
+
+ public void setApplibDate(final org.apache.isis.applib.value.Date applibDate) {
+ this.applibDate = applibDate;
+ }
+ // }}
+
+ // {{ ApplibDateTime (property)
+ private org.apache.isis.applib.value.DateTime applibDateTime;
+
+ @javax.jdo.annotations.Persistent
+ @Optional
+ @MemberOrder(name="dates", sequence = "1")
+ public org.apache.isis.applib.value.DateTime getApplibDateTime() {
+ return applibDateTime;
+ }
+
+ public void setApplibDateTime(final org.apache.isis.applib.value.DateTime applibDateTime) {
+ this.applibDateTime = applibDateTime;
+ }
+ // }}
+
+ // {{ JodaLocalDateTime (property)
+ private org.joda.time.LocalDateTime jodaLocalDateTime;
+
+ @javax.jdo.annotations.Persistent
+ @Optional
+ @MemberOrder(name="dates", sequence = "1")
+ public org.joda.time.LocalDateTime getJodaLocalDateTime() {
+ return jodaLocalDateTime;
+ }
+ public void setJodaLocalDateTime(final org.joda.time.LocalDateTime jodaLocalDateTime) {
+ this.jodaLocalDateTime = jodaLocalDateTime;
+ }
+ // }}
+
+ // {{ JodaLocalDate (property)
+ private org.joda.time.LocalDate jodaLocalDate;
+
+ @javax.jdo.annotations.Persistent
+ @Optional
+ @MemberOrder(name="dates", sequence = "1")
+ public org.joda.time.LocalDate getJodaLocalDate() {
+ return jodaLocalDate;
+ }
+
+ public void setJodaLocalDate(final org.joda.time.LocalDate jodaLocalDate) {
+ this.jodaLocalDate = jodaLocalDate;
+ }
+ // }}
+
+
+ // {{ JodaDateTime (property)
+ private org.joda.time.DateTime jodaDateTime;
+
+ @javax.jdo.annotations.Persistent
+ @Optional
+ @MemberOrder(name="dates", sequence = "1")
+ public org.joda.time.DateTime getJodaDateTime() {
+ return jodaDateTime;
+ }
+
+ public void setJodaDateTime(final org.joda.time.DateTime jodaDateTime) {
+ this.jodaDateTime = jodaDateTime;
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java
new file mode 100644
index 0000000..6f4c0b4
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("DateTimeValuedEntities")
+@ObjectType("DateTimeValuedEntities")
+public class DateTimeValuedEntityRepository extends AbstractEntityRepository<DateTimeValuedEntity> {
+
+ public DateTimeValuedEntityRepository() {
+ super(DateTimeValuedEntity.class, "DateTimeValuedEntities");
+ }
+
+ /**
+ * Required to discover the DateTimeValueEntity type.
+ */
+ @Override
+ @MemberOrder(sequence = "2")
+ public DateTimeValuedEntity newEntity() {
+ return super.newEntity();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java
new file mode 100644
index 0000000..43cd3fe
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java
@@ -0,0 +1,201 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+import javax.validation.constraints.Digits;
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("JDKV")
+@javax.jdo.annotations.Query(
+ name="jdkv_findByStringProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.scalars.JdkValuedEntity WHERE stringProperty == :i")
+@ObjectType("JDKV")
+public class JdkValuedEntity extends AbstractDomainObject {
+
+ // {{ StringProperty (also title, pk)
+ private String stringProperty;
+
+ @javax.jdo.annotations.PrimaryKey
+ @Title
+ @Optional
+ @MemberOrder(sequence = "1")
+ public String getStringProperty() {
+ return stringProperty;
+ }
+
+ public void setStringProperty(final String description) {
+ this.stringProperty = description;
+ }
+
+ // }}
+
+ // {{ JavaUtilDateProperty
+ private Date javaUtilDateProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Date getJavaUtilDateProperty() {
+ return javaUtilDateProperty;
+ }
+
+ public void setJavaUtilDateProperty(final Date javaUtilDateProperty) {
+ this.javaUtilDateProperty = javaUtilDateProperty;
+ }
+
+ // }}
+
+ // {{ JavaSqlDateProperty
+ private java.sql.Date javaSqlDateProperty;
+
+ @javax.jdo.annotations.Persistent() // since not persistent by default
+ @Optional
+ @MemberOrder(sequence = "1")
+ public java.sql.Date getJavaSqlDateProperty() {
+ return javaSqlDateProperty;
+ }
+
+ public void setJavaSqlDateProperty(final java.sql.Date javaSqlDateProperty) {
+ this.javaSqlDateProperty = javaSqlDateProperty;
+ }
+
+ // }}
+
+ // {{ JavaSqlTimeProperty (property)
+ @javax.jdo.annotations.Persistent() // since not persistent by default
+ private java.sql.Time javaSqlTimeProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public java.sql.Time getJavaSqlTimeProperty() {
+ return javaSqlTimeProperty;
+ }
+
+ public void setJavaSqlTimeProperty(final java.sql.Time javaSqlTimeProperty) {
+ this.javaSqlTimeProperty = javaSqlTimeProperty;
+ }
+ // }}
+
+
+
+ // {{ JavaSqlTimestampProperty
+ @javax.jdo.annotations.Persistent() // since not persistent by default
+ private java.sql.Timestamp javaSqlTimestampProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public java.sql.Timestamp getJavaSqlTimestampProperty() {
+ return javaSqlTimestampProperty;
+ }
+
+ public void setJavaSqlTimestampProperty(final java.sql.Timestamp javaSqlTimestampProperty) {
+ this.javaSqlTimestampProperty = javaSqlTimestampProperty;
+ }
+
+ // }}
+
+ // {{ BigIntegerProperty (to hold values that are larger than a long)
+ private BigInteger bigIntegerProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public BigInteger getBigIntegerProperty() {
+ return bigIntegerProperty;
+ }
+
+ public void setBigIntegerProperty(final BigInteger bigIntegerProperty) {
+ this.bigIntegerProperty = bigIntegerProperty;
+ }
+
+ // }}
+
+ // {{ BigIntegerProperty2 (to hold values that can also fit into a long)
+ private BigInteger bigIntegerProperty2;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public BigInteger getBigIntegerProperty2() {
+ return bigIntegerProperty2;
+ }
+
+ public void setBigIntegerProperty2(final BigInteger bigIntegerProperty2) {
+ this.bigIntegerProperty2 = bigIntegerProperty2;
+ }
+
+ // }}
+
+ // {{ BigDecimalProperty (to hold values that are larger than a double)
+ private BigDecimal bigDecimalProperty;
+
+ @Digits(integer=20,fraction = 10) // corresponds to big-decimal(30,10)
+ @Optional
+ @MemberOrder(sequence = "1")
+ public BigDecimal getBigDecimalProperty() {
+ return bigDecimalProperty;
+ }
+
+ public void setBigDecimalProperty(final BigDecimal bigDecimalProperty) {
+ this.bigDecimalProperty = bigDecimalProperty;
+ }
+
+ // }}
+
+
+ // {{ BigDecimalProperty (to hold values that are larger than a double)
+ private BigDecimal bigDecimalProperty2;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public BigDecimal getBigDecimalProperty2() {
+ return bigDecimalProperty2;
+ }
+
+ public void setBigDecimalProperty2(final BigDecimal bigDecimalProperty2) {
+ this.bigDecimalProperty2 = bigDecimalProperty2;
+ }
+
+ // }}
+
+
+ // {{ MyEnum (property)
+ private MyEnum myEnum;
+
+ @javax.jdo.annotations.Persistent
+ @Optional
+ @MemberOrder(sequence = "1")
+ public MyEnum getMyEnum() {
+ return myEnum;
+ }
+
+ public void setMyEnum(final MyEnum myEnum) {
+ this.myEnum = myEnum;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java
new file mode 100644
index 0000000..9a0624e
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("JdkValuedEntities")
+@ObjectType("JdkValuedEntities")
+@DomainService
+public class JdkValuedEntityRepository extends AbstractEntityRepository<JdkValuedEntity> {
+
+ public JdkValuedEntityRepository() {
+ super(JdkValuedEntity.class, "JdkValuedEntities");
+ }
+
+ /**
+ * Required to discover the JdkValueEntity type.
+ */
+ @Override
+ @MemberOrder(sequence = "2")
+ public JdkValuedEntity newEntity() {
+ return super.newEntity();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java
new file mode 100644
index 0000000..cc0e81c
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("JODA")
+@javax.jdo.annotations.Query(
+ name="joda_findByStringProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.scalars.JdkValuedEntity WHERE stringProperty == :i")
+@ObjectType("JODA")
+public class JodaValuedEntity extends AbstractDomainObject {
+
+ // {{ StringProperty (also title, pk)
+ private String stringProperty;
+
+ @javax.jdo.annotations.PrimaryKey
+ @Title
+ @Optional
+ @MemberOrder(sequence = "1")
+ public String getStringProperty() {
+ return stringProperty;
+ }
+
+ public void setStringProperty(final String stringProperty) {
+ this.stringProperty = stringProperty;
+ }
+
+ public JodaValuedEntity updateStringProperty(
+ @Optional final String stringProperty) {
+ setStringProperty(stringProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ LocalDateProperty
+ private LocalDate localDateProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public LocalDate getLocalDateProperty() {
+ return localDateProperty;
+ }
+
+ public void setLocalDateProperty(final LocalDate localDateProperty) {
+ this.localDateProperty = localDateProperty;
+ }
+
+ public JodaValuedEntity updateLocalDateProperty(
+ @Optional final LocalDate localDateProperty) {
+ setLocalDateProperty(localDateProperty);
+ return this;
+ }
+ // }}
+
+
+ // {{ LocalDateTimeProperty
+ private LocalDateTime localDateTimeProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public LocalDateTime getLocalDateTimeProperty() {
+ return localDateTimeProperty;
+ }
+
+ public void setLocalDateTimeProperty(final LocalDateTime localDateTimeProperty) {
+ this.localDateTimeProperty = localDateTimeProperty;
+ }
+
+ public JodaValuedEntity updateLocalDateTimeProperty(
+ @Optional final LocalDateTime localDateTimeProperty) {
+ setLocalDateTimeProperty(localDateTimeProperty);
+ return this;
+ }
+ // }}
+
+
+ // {{ DateTimeProperty
+ private DateTime dateTimeProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public DateTime getDateTimeProperty() {
+ return dateTimeProperty;
+ }
+
+ public void setDateTimeProperty(final DateTime dateTimeProperty) {
+ this.dateTimeProperty = dateTimeProperty;
+ }
+
+ public JodaValuedEntity updateDateTimeProperty(
+ @Optional final DateTime dateTimeProperty) {
+ setDateTimeProperty(dateTimeProperty);
+ return this;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java
new file mode 100644
index 0000000..8f46899
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("JodaValuedEntities")
+@ObjectType("JodaValuedEntities")
+@DomainService
+public class JodaValuedEntityRepository extends AbstractEntityRepository<JodaValuedEntity> {
+
+ public JodaValuedEntityRepository() {
+ super(JodaValuedEntity.class, "JodaValuedEntities");
+ }
+
+ /**
+ * Required to discover the JodaValueEntity type.
+ */
+ @Override
+ @MemberOrder(sequence = "2")
+ public JodaValuedEntity newEntity() {
+ return super.newEntity();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java
new file mode 100644
index 0000000..edcd676
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.tck.dom.scalars;
+
+public enum MyEnum {
+ RED,
+ ORANGE,
+ YELLOW,
+ GREEN,
+ BLUE,
+ INDIGO,
+ VIOLET
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java
new file mode 100644
index 0000000..fc8cefa
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java
@@ -0,0 +1,214 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("PRMV")
+@javax.jdo.annotations.Query(
+ name="prmv_findByIntProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity WHERE intProperty == :i")
+@ObjectType("PRMV")
+public class PrimitiveValuedEntity extends AbstractDomainObject {
+
+
+ // {{ Id (Integer)
+ private Integer id;
+
+ @Title(prepend="Primitive Valued Entity #")
+ @javax.jdo.annotations.PrimaryKey // must be on the getter.
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(final Integer id) {
+ this.id = id;
+ }
+ // }}
+
+
+ // {{ BooleanProperty
+ private boolean booleanProperty;
+
+ @MemberOrder(sequence = "3")
+ public boolean getBooleanProperty() {
+ return booleanProperty;
+ }
+
+ public void setBooleanProperty(final boolean booleanProperty) {
+ this.booleanProperty = booleanProperty;
+ }
+
+ public PrimitiveValuedEntity updateBooleanProperty(
+ final boolean booleanProperty) {
+ setBooleanProperty(booleanProperty);
+ return this;
+ }
+ // }}
+
+ // {{ ByteProperty
+ private byte byteProperty;
+
+ @MemberOrder(sequence = "1")
+ public byte getByteProperty() {
+ return byteProperty;
+ }
+
+ public void setByteProperty(final byte byteProperty) {
+ this.byteProperty = byteProperty;
+ }
+
+ public PrimitiveValuedEntity updateByteProperty(
+ final byte byteProperty) {
+ setByteProperty(byteProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ ShortProperty
+ private short shortProperty;
+
+ @MemberOrder(sequence = "1")
+ public short getShortProperty() {
+ return shortProperty;
+ }
+
+ public void setShortProperty(final short shortProperty) {
+ this.shortProperty = shortProperty;
+ }
+
+ public PrimitiveValuedEntity updateShortProperty(
+ final short shortProperty) {
+ setShortProperty(shortProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ IntProperty
+ private int intProperty;
+
+ @MemberOrder(sequence = "1")
+ public int getIntProperty() {
+ return intProperty;
+ }
+
+ public void setIntProperty(final int intProperty) {
+ this.intProperty = intProperty;
+ }
+
+ public PrimitiveValuedEntity updateIntProperty(
+ final int intProperty) {
+ setIntProperty(intProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ LongProperty
+ private long longProperty;
+
+ @MemberOrder(sequence = "1")
+ public long getLongProperty() {
+ return longProperty;
+ }
+
+ public void setLongProperty(final long longProperty) {
+ this.longProperty = longProperty;
+ }
+
+ public PrimitiveValuedEntity updateLongProperty(
+ final long longProperty) {
+ setLongProperty(longProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ FloatProperty
+ private float floatProperty;
+
+ @MemberOrder(sequence = "1")
+ public float getFloatProperty() {
+ return floatProperty;
+ }
+
+ public void setFloatProperty(final float floatProperty) {
+ this.floatProperty = floatProperty;
+ }
+
+ public PrimitiveValuedEntity updateFloatProperty(
+ final float floatProperty) {
+ setFloatProperty(floatProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ DoubleProperty
+ private double doubleProperty;
+
+ @MemberOrder(sequence = "1")
+ public double getDoubleProperty() {
+ return doubleProperty;
+ }
+
+ public void setDoubleProperty(final double doubleProperty) {
+ this.doubleProperty = doubleProperty;
+ }
+
+ public PrimitiveValuedEntity updateDoubleProperty(
+ final double doubleProperty) {
+ setDoubleProperty(doubleProperty);
+ return this;
+ }
+
+ // }}
+
+
+ // {{ CharProperty
+ @javax.jdo.annotations.Column(jdbcType="char") // for hsqldb
+ //@javax.jdo.annotations.Column(jdbcType="char", sqlType="char") // for mssqlserver
+ private char charProperty;
+
+ @MemberOrder(sequence = "1")
+ public char getCharProperty() {
+ return charProperty;
+ }
+
+ public void setCharProperty(final char charProperty) {
+ this.charProperty = charProperty;
+ }
+
+ public PrimitiveValuedEntity updateCharProperty(
+ final char charProperty) {
+ setCharProperty(charProperty);
+ return this;
+ }
+
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java
new file mode 100644
index 0000000..aa84d55
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.applib.query.Query;
+import org.apache.isis.applib.query.QueryDefault;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("PrimitiveValuedEntities")
+@ObjectType("PrimitiveValuedEntities")
+@DomainService
+public class PrimitiveValuedEntityRepository extends AbstractEntityRepository<PrimitiveValuedEntity> {
+
+ public PrimitiveValuedEntityRepository() {
+ super(PrimitiveValuedEntity.class, "PrimitiveValuedEntities");
+ }
+
+ @QueryOnly
+ @MemberOrder(sequence = "1")
+ public PrimitiveValuedEntity findById(int id) {
+ final Query<PrimitiveValuedEntity> query =
+ new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, PrimitiveValuedEntity.class.getName() + "#pk", "id", id);
+ return this.firstMatch(query);
+ }
+}
[34/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
new file mode 100644
index 0000000..f68e5ae
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java
new file mode 100644
index 0000000..b7cd86d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenDoesntExistColl_thenResponseCode_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java
new file mode 100644
index 0000000..30e4f2a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenDoesntExistOid_thenResponseCode_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java
new file mode 100644
index 0000000..51b51b1
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_givenDisabled_then_403_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java
new file mode 100644
index 0000000..fff78cc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java
new file mode 100644
index 0000000..1c7a858
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
new file mode 100644
index 0000000..0113bd7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
new file mode 100644
index 0000000..d6ed467
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java
new file mode 100644
index 0000000..911a131
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_givenHidden_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
new file mode 100644
index 0000000..16bffce
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..61fa66b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..b8e9a79
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..26ff03c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..0a35e97
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..6e82ce0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_thenResponseHeaders_eTag_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java
new file mode 100644
index 0000000..26b4a44
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_then_200_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
new file mode 100644
index 0000000..70f225a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
new file mode 100644
index 0000000..63a4bd7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java
new file mode 100644
index 0000000..eaffae2
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenArgIsMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java
new file mode 100644
index 0000000..7ca2491
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenArgMandatoryButMissing_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
new file mode 100644
index 0000000..b1cb4ba
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_whenArgValid_thenEntityAddedToCollection_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
new file mode 100644
index 0000000..1eab1d8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java
new file mode 100644
index 0000000..8a49792
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenArgValueIsInvalid_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
new file mode 100644
index 0000000..6d1f856
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java
new file mode 100644
index 0000000..542e42b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenDoesntExistColl_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java
new file mode 100644
index 0000000..fe75fc5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Put_whenDoesntExistOid_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java
new file mode 100644
index 0000000..587f9cc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Delete_givenDisabled_then_203_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
new file mode 100644
index 0000000..d6eda398
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
new file mode 100644
index 0000000..c51c878
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java
new file mode 100644
index 0000000..98bc3f3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Delete_givenHidden_thenResponseCode_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..c5c7262
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_givenViewModel_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java
new file mode 100644
index 0000000..91029fc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_thenPropertyValueCleared_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..b9005f4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..e018ef0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Delete_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..62e8304
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Delete_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..4dd2285
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Delete_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..ec60e2a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_thenResponseHeaders_eTag_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java
new file mode 100644
index 0000000..d9573b1
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_then_200_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java
new file mode 100644
index 0000000..1770b18
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Delete_whenArgs_thenResponseCode_4xx_TODO {
+
+}
[10/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 9fa170b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDisabled_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Get_givenDisabled_thenRepresentation_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 3f9076d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
deleted file mode 100644
index c0a479c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java
deleted file mode 100644
index ce2fe98..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_givenViewModel_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenViewModel_thenRepresentation_ok_TODO {
-
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Ignore("TODO")
- @Test
- public void representation() throws Exception {
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
deleted file mode 100644
index 60968e3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenRepresentation_ok.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenRepresentation_ok {
-
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Test
- public void representation() throws Exception {
-
- // when
- final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
- final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
- assertThat(idPropertyJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- // then
- final ObjectPropertyRepresentation propertyRepr = idPropertyJsonResp.getEntity();
-
- assertThat(propertyRepr.getString("memberType"), is("property"));
-
- // self link
- final LinkRepresentation selfLink = propertyRepr.getLinkWithRel(Rel.SELF);
- assertThat(selfLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt"))
- .returning(HttpStatusCode.OK)
- .build());
-
- // up link
- final LinkRepresentation upLink = propertyRepr.getLinkWithRel(Rel.UP);
- assertThat(upLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68"))
- .returning(HttpStatusCode.OK)
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
- .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/68/properties/anInt"))
- .build());
-
- assertThat(modifyLink.getArguments(), is(not(nullValue())));
- assertThat(modifyLink.getArguments().isArray(), is(false));
- assertThat(modifyLink.getArguments().size(), is(1));
-
- //clear link
- final LinkRepresentation clearLink = propertyRepr.getLinkWithRel(Rel.CLEAR);
- assertThat(clearLink, isLink(client)
- .httpMethod(RestfulHttpMethod.DELETE)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType())
- .href(endsWith("/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt"))
- .build());
-
- // described by link
- final LinkRepresentation describedByLink = propertyRepr.getLinkWithRel(Rel.DESCRIBEDBY);
- assertThat(describedByLink, isLink(client)
- .returning(HttpStatusCode.OK)
- .responseEntityWithSelfHref(describedByLink.getHref())
- .build());
-
- assertThat(propertyRepr.getInt("value"), is(42));
- assertThat(propertyRepr.getString("format"),is("int"));
- assertThat(propertyRepr.getString("extensions.x-isis-format"), is("int"));
- assertThat(propertyRepr.getExtensions(), isMap());
- assertThat(propertyRepr.getExtensions().getArray("changed").isArray(), is(true));
- assertThat(propertyRepr.getExtensions().getArray("disposed").isArray(), is(true));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index 00b2de8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
deleted file mode 100644
index e7c8614..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentLength_ok.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenResponseHeaders_ContentLength_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Test
- public void propertyDetails() throws Exception {
-
- // when
- final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
- //given
- final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
- //then
- assertThat(idPropertyJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 68eeefa..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index 9b77eff..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Get_thenResponseHeaders_eTag_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java
deleted file mode 100644
index 275e202..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_then_200_ok.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_then_200_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Test
- public void propertyDetails() throws Exception {
-
- // when
- final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
- final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
- assertThat(idPropertyJsonResp.getStatus(), is(HttpStatusCode.OK));
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java
deleted file mode 100644
index 2fb3e8c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenArg_then_405_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Get_whenArg_then_405_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java
deleted file mode 100644
index df55dee..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistOid_then_404.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-public class Get_whenDoesntExistOid_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private LinkRepresentation link;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- link = new LinkRepresentation();
- }
-
- @Test
- public void whenObjectDoesntExist() throws Exception {
-
- // given
- link.withHref("http://localhost:39393/objects/PRMV/nonExistent/properties/booleanProperty");
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResp = client.follow(link);
-
- // then
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java
deleted file mode 100644
index a6397f3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenDoesntExistProp_then_404.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenDoesntExistProp_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private LinkRepresentation link;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
-
- link = new LinkRepresentation();
- }
-
- @Test
- public void whenPropertyDoesntExist() throws Exception {
-
- Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
-
- // given
- final LinkRepresentation linkToExistingObject = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
- link.withHref(linkToExistingObject.getHref() + "/properties/nonExistentProperty");
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResp = client.follow(link);
-
- // then
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
-
- Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java
deleted file mode 100644
index e6b1115..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenHiddenProp_then_404.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenHiddenProp_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void returns404() throws Exception {
-
- // given
- RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/properties/invisibleProperty");
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index 8f87283..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- request = client.createRequest(RestfulHttpMethod.GET, "/objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt");
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<ObjectPropertyRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<ObjectPropertyRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
deleted file mode 100644
index ce85061..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java
deleted file mode 100644
index 7b6bd70..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_ok.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import javax.ws.rs.core.MediaType;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/68/properties/anInt");
- }
-
- @Test
- public void applicationJson_noProfile_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
-
- @Test
- public void applicationJson_profileObjectProperty_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.OBJECT_PROPERTY.getMediaType());
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
- @Test
- public void missingHeader_returns200() throws Exception {
-
- final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
-
- assertThat(restfulResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java
deleted file mode 100644
index 6dce0fa..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenRequestHeaders_Accept_whenInvalid_406.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import javax.ws.rs.core.MediaType;
-import org.jboss.resteasy.client.ClientRequest;
-import org.jboss.resteasy.client.ClientResponse;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_whenInvalid_406 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void applicationJson_profileIncorrect_returns406() throws Exception {
-
- // given
- RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/55/properties/anInt");
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
- @Test
- public void incorrectMediaType_returnsNotAcceptable() throws Exception {
-
- // given
- final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("objects/org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity/55/properties/anInt");
- clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
-
- // when
- final ClientResponse<?> resp = clientRequest.get();
- final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index 49e8c1b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 6e5e668..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index b304818..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Get_whenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java
deleted file mode 100644
index fe7dd9c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Post_then_405_bad.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response idPropertyResp = domainObjectResource.propertyDetails("org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity","68", "anInt");
- final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
- final ObjectPropertyRepresentation propertyRepr = idPropertyJsonResp.getEntity();
- final LinkRepresentation selfLink = propertyRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to a property resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java
deleted file mode 100644
index 0c29429..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenDisabled_thenResponseCode_203_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_givenDisabled_thenResponseCode_203_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
deleted file mode 100644
index 869f8b9..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
deleted file mode 100644
index ae1414e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java
deleted file mode 100644
index cc5c809..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_givenViewModel_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_givenViewModel_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 152f7b0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index 3309a2c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index b1caf6a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 33870ce..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
[15/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java
deleted file mode 100644
index fa71905..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java
+++ /dev/null
@@ -1,660 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck;
-
-import javax.ws.rs.core.CacheControl;
-import javax.ws.rs.core.MediaType;
-import com.google.common.base.Objects;
-import org.hamcrest.Description;
-import org.hamcrest.Matcher;
-import org.hamcrest.TypeSafeMatcher;
-import org.junit.Assert;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.HasLinkToSelf;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-
-public class RestfulMatchers {
-
- public static <T extends JsonRepresentation> Matcher<T> isMap() {
- return new TypeSafeMatcher<T>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("map");
- }
-
- @Override
- public boolean matchesSafely(final T item) {
- return item != null && item.isMap();
- }
- };
- }
-
- public static <T extends JsonRepresentation> Matcher<T> isArray() {
- return new TypeSafeMatcher<T>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("array");
- }
-
- @Override
- public boolean matchesSafely(final T item) {
- return item != null && item.isArray();
- }
- };
- }
-
- public static <T extends JsonRepresentation> Matcher<T> isString() {
- return new TypeSafeMatcher<T>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("string");
- }
-
- @Override
- public boolean matchesSafely(final T item) {
- return item != null && item.isValue() && item.asJsonNode().isTextual();
- }
- };
- }
-
- public static Matcher<LinkRepresentation> isLink(final RestfulHttpMethod httpMethod) {
- return new TypeSafeMatcher<LinkRepresentation>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("link with method " + httpMethod.name());
- }
-
- @Override
- public boolean matchesSafely(final LinkRepresentation item) {
- return item != null && item.getHttpMethod() == httpMethod;
- }
- };
- }
-
- public static <T extends JsonRepresentation> Matcher<T> isFollowableLinkToSelf(final RestfulClient client) {
- return new TypeSafeMatcher<T>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("links to self");
- }
-
- @Override
- public boolean matchesSafely(final T item) {
- final HasLinkToSelf initialRepr = (HasLinkToSelf) item; // no easy
- // way to do
- // this with
- // Hamcrest
- // when
- try {
- final RestfulResponse<T> followedResp = client.followT(initialRepr.getSelf());
-
- // then
- final T repr2 = followedResp.getEntity();
- final HasLinkToSelf repr2AsLinksToSelf = (HasLinkToSelf) repr2;
- return initialRepr.getSelf().equals(repr2AsLinksToSelf.getSelf());
- } catch (final Exception e) {
- throw new RuntimeException(e);
- }
- }
- };
- }
-
- public static <T extends JsonRepresentation> void assertThat(final T actual, final AbstractMatcherBuilder<T> matcherBuilder) {
- Assert.assertThat(actual, matcherBuilder.build());
- }
-
- public static LinkMatcherBuilder isLink(final RestfulClient client) {
- return new LinkMatcherBuilder(client);
- }
-
- public static LinkMatcherBuilder isLink() {
- return new LinkMatcherBuilder(null);
- }
-
- public static abstract class AbstractMatcherBuilder<T> {
- protected RestfulClient client;
-
- public AbstractMatcherBuilder() {
- this(null);
- }
-
- public AbstractMatcherBuilder(final RestfulClient client) {
- this.client = client;
- }
-
- public abstract Matcher<T> build();
- }
-
- public static class LinkMatcherBuilder extends AbstractMatcherBuilder<JsonRepresentation> {
- private HttpStatusCode statusCode;
- private RestfulHttpMethod httpMethod;
- private String rel;
- private String href;
- private Matcher<String> relNameMatcher;
- private Matcher<String> hrefMatcher;
- private Matcher<JsonRepresentation> valueMatcher;
- private Boolean novalue;
- private MediaType mediaType;
- private String typeParameterName;
- private String typeParameterValue;
- private String selfHref;
- private JsonRepresentation arguments;
- private String title;
- private Matcher<String> titleMatcher;
-
- private LinkMatcherBuilder(final RestfulClient client) {
- super(client);
- }
-
- public LinkMatcherBuilder rel(final String rel) {
- this.rel = rel;
- return this;
- }
-
- public LinkMatcherBuilder rel(final Rel rel) {
- this.rel = rel.getName();
- return this;
- }
-
- public LinkMatcherBuilder rel(final Matcher<String> relNameMatcher) {
- this.relNameMatcher = relNameMatcher;
- return this;
- }
-
- public LinkMatcherBuilder href(final String href) {
- this.href = href;
- return this;
- }
-
- public LinkMatcherBuilder href(final Matcher<String> hrefMatcher) {
- this.hrefMatcher = hrefMatcher;
- return this;
- }
-
- public LinkMatcherBuilder httpMethod(final RestfulHttpMethod httpMethod) {
- this.httpMethod = httpMethod;
- return this;
- }
-
- public LinkMatcherBuilder type(final MediaType mediaType) {
- this.mediaType = mediaType;
- return this;
- }
-
- public LinkMatcherBuilder title(String title) {
- this.title = title;
- return this;
- }
-
- public LinkMatcherBuilder title(Matcher<String> titleMatcher) {
- this.titleMatcher = titleMatcher;
- return this;
- }
-
- public LinkMatcherBuilder typeParameter(final String typeParameterName, final String typeParameterValue) {
- this.typeParameterName = typeParameterName;
- this.typeParameterValue = typeParameterValue;
- return this;
- }
-
- public LinkMatcherBuilder arguments(JsonRepresentation arguments) {
- this.arguments = arguments;
- return this;
- }
-
- public LinkMatcherBuilder novalue() {
- if (valueMatcher != null) {
- throw new IllegalStateException("cannot assert on both there being a value and there not being a value");
- }
- this.novalue = true;
- return this;
- }
-
- public LinkMatcherBuilder value(final Matcher<JsonRepresentation> valueMatcher) {
- if (this.novalue != null) {
- throw new IllegalStateException("cannot assert on both there being a value and there not being a value");
- }
- this.valueMatcher = valueMatcher;
- return this;
- }
-
- public LinkMatcherBuilder returning(final HttpStatusCode statusCode) {
- this.statusCode = statusCode;
- return this;
- }
-
- public LinkMatcherBuilder responseEntityWithSelfHref(String selfHref) {
- this.selfHref = selfHref;
- return this;
- }
-
- @Override
- public Matcher<JsonRepresentation> build() {
- return new TypeSafeMatcher<JsonRepresentation>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("a link");
- if (rel != null) {
- description.appendText(" with rel '").appendText(rel).appendText("'");
- }
- if (relNameMatcher != null) {
- description.appendText(" with rel '");
- relNameMatcher.describeTo(description);
- }
- if (href != null) {
- description.appendText(" with href '").appendText(href).appendText("'");
- }
- if (hrefMatcher != null) {
- description.appendText(" with href ");
- hrefMatcher.describeTo(description);
- }
- if (title != null) {
- description.appendText(" with title '").appendText(title).appendText("'");
- }
- if (titleMatcher != null) {
- description.appendText(" with title ");
- titleMatcher.describeTo(description);
- }
- if (httpMethod != null) {
- description.appendText(" with method '").appendValue(httpMethod).appendText("'");
- }
- if (mediaType != null) {
- description.appendText(" with type '").appendValue(mediaType).appendText("'");
- }
- if (typeParameterName != null) {
- description.appendText(" with media type parameter '").appendText(typeParameterName).appendText("=").appendText(typeParameterValue).appendText("'");
- }
-
- if (arguments != null) {
- description.appendText(" with arguments").appendText(arguments.toString());
- }
-
- if (novalue != null && novalue) {
- description.appendText(" with no value");
- }
- if (valueMatcher != null) {
- description.appendText(" with value ");
- valueMatcher.describeTo(description);
- }
-
- // trigger link being followed
- if (statusCode != null || selfHref != null) {
- if (client == null) {
- throw new IllegalStateException("require client in order to assert on statusCode");
- }
- description.appendText(" that when followed");
- if (statusCode != null) {
- description.appendText(" returns status " + statusCode);
- }
- if (statusCode != null || selfHref != null) {
- description.appendText(" and");
- }
- if (selfHref != null) {
- description.appendText(" has a response whose self.href is " + selfHref);
- }
- }
- }
-
- @Override
- public boolean matchesSafely(final JsonRepresentation linkRepr) {
- if (linkRepr == null) {
- return false;
- }
- final LinkRepresentation link = linkRepr.asLink();
- if (rel != null && !Rel.parse(rel).matches(link.getRel())) {
- return false;
- }
- if (relNameMatcher != null && !relNameMatcher.matches(link.getRel())) {
- return false;
- }
- if (href != null && !href.equals(link.getHref())) {
- return false;
- }
- if (hrefMatcher != null && !hrefMatcher.matches(link.getHref())) {
- return false;
- }
- if (title != null && !title.equals(link.getTitle())) {
- return false;
- }
- if (titleMatcher != null && !titleMatcher.matches(link.getTitle())) {
- return false;
- }
- if (httpMethod != null && !httpMethod.equals(link.getHttpMethod())) {
- return false;
- }
- if (mediaType != null && !mediaType.isCompatible(mediaType)) {
- return false;
- }
- if (typeParameterName != null) {
- final MediaType mediaType = link.getType();
- final String parameterValue = mediaType.getParameters().get(typeParameterName);
- if (!typeParameterValue.equals(parameterValue)) {
- return false;
- }
- }
- if (novalue != null && novalue && link.getValue() != null) {
- return false;
- }
- if (arguments != null && !arguments.equals(link.getArguments())) {
- return false;
- }
- if (valueMatcher != null && !valueMatcher.matches(link.getValue())) {
- return false;
- }
-
- // follow link if criteria require it
- RestfulResponse<JsonRepresentation> jsonResp = null;
- if (statusCode != null || selfHref != null) {
- if (client == null) {
- return false;
- }
- try {
- jsonResp = client.followT(link);
- } catch (final Exception e) {
- throw new RuntimeException(e);
- }
- }
-
- // assertions based on provided criteria
- try {
- if (statusCode != null) {
- if (jsonResp.getStatus() != statusCode) {
- return false;
- }
- }
- if (selfHref != null) {
- JsonRepresentation entity;
- try {
- entity = jsonResp.getEntity();
- } catch (Exception e) {
- return false;
- }
- if(entity == null) {
- return false;
- }
- LinkRepresentation selfLink = entity.getLink("links[rel=self]");
- if(selfLink == null) {
- return false;
- }
- if (!selfLink.getHref().equals(selfHref)) {
- return false;
- }
- }
- return true;
- } finally {
- // flush any pending response
- try {
- jsonResp.getEntity();
- } catch (Exception e) {
- // ignore
- }
- }
- }
- };
- }
-
-
-
-
- }
-
- public static EntryMatcherBuilder entry(final String key) {
- return new EntryMatcherBuilder(key);
- }
-
- public static class EntryMatcherBuilder extends AbstractMatcherBuilder<JsonRepresentation> {
-
- private final String key;
- private String value;
-
- private EntryMatcherBuilder(final String key) {
- this.key = key;
- }
-
- public EntryMatcherBuilder value(final String value) {
- this.value = value;
- return this;
- }
-
- @Override
- public Matcher<JsonRepresentation> build() {
- return new TypeSafeMatcher<JsonRepresentation>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("map with entry with key: " + key);
- if (value != null) {
- description.appendText(", and value: " + value);
- }
- }
-
- @Override
- public boolean matchesSafely(final JsonRepresentation item) {
- if (!item.isMap()) {
- return false;
- }
- final String val = item.getString(key);
- if (val == null) {
- return false;
- }
- if (value != null && !value.equals(val)) {
- return false;
- }
- return true;
- }
- };
- }
-
- }
-
- public static Matcher<MediaType> hasMediaType(final String type) {
- return new TypeSafeMatcher<MediaType>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("has type " + type);
- }
-
- @Override
- public boolean matchesSafely(final MediaType item) {
- final String expectedType = item.getType();
- return expectedType != null && type.contains(expectedType);
- }
- };
- }
-
- public static Matcher<MediaType> hasSubType(final String subtype) {
- return new TypeSafeMatcher<MediaType>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("has subtype " + subtype);
- }
-
- @Override
- public boolean matchesSafely(final MediaType item) {
- return Objects.equal(subtype, item.getSubtype());
- }
- };
- }
-
- public static Matcher<MediaType> hasParameter(final String parameterName, final String parameterValue) {
- return new TypeSafeMatcher<MediaType>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText(String.format("has parameter '%s' with value '%s'", parameterName, parameterValue));
- }
-
- @Override
- public boolean matchesSafely(final MediaType item) {
- final String paramValue = item.getParameters().get(parameterName);
- return Objects.equal(paramValue, parameterValue);
- }
- };
- }
-
- public static Matcher<CacheControl> hasMaxAge(final int maxAge) {
- return new TypeSafeMatcher<CacheControl>() {
-
- @Override
- public void describeTo(final Description description) {
- description.appendText("has max age of " + maxAge + " secs");
- }
-
- @Override
- public boolean matchesSafely(final CacheControl item) {
- return maxAge == item.getMaxAge();
- }
- };
- }
-
- public static Matcher<? super JsonRepresentation> mapHas(final String key) {
- return new TypeSafeMatcher<JsonRepresentation>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText("is a map with key '" + key + "'");
- }
-
- @Override
- protected boolean matchesSafely(JsonRepresentation item) {
- return item.mapHas(key);
- }
- };
- }
-
- public static Matcher<? super MediaType> hasMediaTypeProfile(final String expectedMediaTypeAndProfileStr) {
- final MediaType expectedMediaType = Header.CONTENT_TYPE.parse(expectedMediaTypeAndProfileStr);
- final String expectedProfileIfAny = expectedMediaType.getParameters().get("profile");
- return new TypeSafeMatcher<MediaType>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText("is a media type 'application/json' with a profile parameter of '" + expectedMediaTypeAndProfileStr + '"');
- }
-
- @Override
- protected boolean matchesSafely(MediaType item) {
-
- if (!item.isCompatible(expectedMediaType)) {
- return false;
- }
- String actualProfileIfAny = item.getParameters().get("profile");
- return Objects.equal(expectedProfileIfAny, actualProfileIfAny);
- }
- };
- }
-
- public static Matcher<? super MediaType> hasMediaTypeXRoDomainType(final String expectedXRoDomainType) {
- return new TypeSafeMatcher<MediaType>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText("is a media type with an 'x-ro-domain-type' parameter of '" + expectedXRoDomainType + '"');
- }
-
- @Override
- protected boolean matchesSafely(MediaType item) {
- String actualXRoDomainTypeIfany = item.getParameters().get("x-ro-domain-type");
- return actualXRoDomainTypeIfany != null && actualXRoDomainTypeIfany.contains(expectedXRoDomainType);
- }
- };
- }
-
- public static Matcher<? super MediaType> hasMediaTypeXRoElementType(final String expectedXRoElementTypeIfAny) {
- return new TypeSafeMatcher<MediaType>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText("is a media type with an 'x-ro-element-type' parameter of '" + expectedXRoElementTypeIfAny + '"');
- }
-
- @Override
- protected boolean matchesSafely(MediaType item) {
- String actualXRoElementTypeIfany = item.getParameters().get("x-ro-element-type");
- return actualXRoElementTypeIfany != null && actualXRoElementTypeIfany.contains(expectedXRoElementTypeIfAny);
- }
- };
- }
-
- public static Matcher<? super RestfulResponse<?>> hasStatus(final HttpStatusCode statusCode) {
- return new TypeSafeMatcher<RestfulResponse<?>>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText("has status code of " + statusCode);
- }
-
- @Override
- protected boolean matchesSafely(RestfulResponse<?> item) {
- return item.getStatus() == statusCode;
- }
- };
- }
-
-
- public static class CacheControlMatcherBuilder extends AbstractMatcherBuilder<CacheControl> {
-
- private Boolean noCache;
-
- @Override
- public Matcher<CacheControl> build() {
- return new TypeSafeMatcher<CacheControl>() {
-
- @Override
- public void describeTo(Description description) {
- description.appendText("is a CacheControl header ");
- if(noCache != null) {
- description.appendText("with " + (noCache?"no":"") + " cache");
- }
- }
-
- @Override
- protected boolean matchesSafely(CacheControl item) {
- if(noCache != null) {
- if(item.isNoCache() != noCache) {
- return false;
- }
- }
- return true;
- }
- };
- }
-
- public CacheControlMatcherBuilder withNoCache() {
- noCache = true;
- return this;
- }
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java
deleted file mode 100644
index 369c06d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Util {
-
- private Util() {
- }
-
- public static String givenLinkToService(RestfulClient restfulClient, String serviceId) throws IOException {
-
- final DomainServiceResource resource = restfulClient.getDomainServiceResource();
- final Response response = resource.services();
- final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();
-
- final String href = services.getRepresentation("value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"" + serviceId + "\"]").asLink().getHref();
- return href;
- }
-
- public static String givenHrefToService(RestfulClient client, final String serviceId) throws IOException {
- final DomainServiceResource resource = client.getDomainServiceResource();
- final Response response = resource.services();
- final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();
-
- return services.getRepresentation("value[rel=urn:org.restfulobjects:rels/service;serviceId=\"%s\"]", serviceId).asLink().getHref();
- }
-
- public static JsonRepresentation givenAction(RestfulClient client, final String serviceId, final String actionId) throws IOException {
- final String href = givenHrefToService(client, serviceId);
- final String detailRel = Rel.DETAILS.andParam("action", actionId);
-
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s]", actionId, detailRel);
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = restfulResponse.getEntity();
-
- final JsonRepresentation actionLinkRepr = repr.getAction(actionId);
- return actionLinkRepr.getRepresentation("links[rel=%s].value", detailRel);
- }
-
- /**
- * For clientFollow tests; returns a link to the first entity in the list returned by invoking the 'list' action of the specified repo
- */
- public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName) throws Exception {
- return serviceActionListInvokeFirstReference(client, repoName, "list");
- }
-
- /**
- * For clientFollow tests; returns a link to the first entity in the list returned by invoking the specified repo and action
- */
- public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName, String actionName) throws Exception {
- return serviceActionListInvokeFirstReference(client, repoName, actionName, 0);
- }
-
- /**
- * For clientFollow tests; returns a link to the Nth entity in the list returned by invoking the specified repo and action
- */
- public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName, String actionName, int idx) throws Exception {
-
- final DomainServiceResource serviceResource = client.getDomainServiceResource();
-
- Response response = serviceResource.invokeActionQueryOnly(repoName, actionName, null);
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
- final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
-
- assertThat(listRepr.getValue(), is(not(nullValue())));
- assertThat(listRepr.getValue().size(), is(IsisMatchers.greaterThan(idx + 1)));
-
- final LinkRepresentation domainObjectLinkRepr = listRepr.getValue().arrayGet(idx).as(LinkRepresentation.class);
-
- assertThat(domainObjectLinkRepr, is(not(nullValue())));
- assertThat(domainObjectLinkRepr, isLink().rel(Rel.ELEMENT).httpMethod(RestfulHttpMethod.GET).type(RepresentationType.DOMAIN_OBJECT.getMediaType()).arguments(JsonRepresentation.newMap()).build());
-
- return domainObjectLinkRepr;
- }
-
-
-
- /**
- * For resourceProxy tests; returns the first entity in the list returned by invoking the 'list' action on the specified repo
- */
- public static RestfulResponse<DomainObjectRepresentation> domainObjectJaxrsResponse(RestfulClient client, String repoName) throws Exception {
- return domainObjectJaxrsResponse(client, repoName, "list");
- }
-
- /**
- * For resourceProxy tests; returns the first entity in the list returned by invoking the specified repo and action
- */
- public static RestfulResponse<DomainObjectRepresentation> domainObjectJaxrsResponse(RestfulClient client, String repoName, String actionName) throws Exception {
- return domainObjectJaxrsResponse(client, repoName, actionName, 0);
- }
-
- /**
- * For resourceProxy tests; returns the Nth entity in the list returned by invoking the specified repo and action
- */
- public static RestfulResponse<DomainObjectRepresentation> domainObjectJaxrsResponse(RestfulClient client, String repoName, String actionName, int idx) throws Exception {
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, repoName, actionName, idx);
- DomainObjectRepresentation domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
-
- final Response jaxrsResponse = client.getDomainObjectResource().object(domainObjectRepr.getDomainType(), domainObjectRepr.getInstanceId());
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
- return restfulResponse;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java
deleted file mode 100644
index 4ca4583..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.all.stories;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RepresentationWalker;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class UserStoryTest_TOFIX {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore("to get working again")
- @Test
- public void walkResources() throws Exception {
-
- // given a response for an initial resource
- final HomePageResource homePageResource = client.getHomePageResource();
- final Response homePageResp = homePageResource.homePage();
-
- // and given a walker starting from this response
- final RepresentationWalker walker = client.createWalker(homePageResp);
-
- // when walk the home pages' 'services' link
- walker.walk("services");
-
- // and when locate the ApplibValues repo and walk the its 'object' link
- walker.walk("values[title=ApplibValues].links[rel=object]");
-
- // and when locate the AppLibValues repo's "newEntity" action and walk
- // to its details
- walker.walk("values[objectMemberType=action].details");
-
- // and when find the invoke body for the "newEntity" action and then
- // walk the action using the body
- final JsonRepresentation newEntityActionDetails = walker.getEntity();
- final JsonRepresentation newEntityActionInvokeBody = newEntityActionDetails.getArray("invoke.body");
- walker.walk("invoke", newEntityActionInvokeBody);
-
- // and when walk the link to the returned object
- walker.walk("link");
-
- // then the returned object is created with its OID
- final JsonRepresentation newEntityDomainObject = walker.getEntity();
- assertThat(newEntityDomainObject.getString("_self.link.href"), matches(".+/objects/OID:[\\d]+$"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java
deleted file mode 100644
index b81203e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.any;
-
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class NotAuthorizedTest_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Ignore("TODO")
- @Test
- public void whenAuthenticated() throws Exception {
-
- }
-
- @Ignore("TODO")
- @Test
- public void whenNotAuthenticated() throws Exception {
- // should return 401 (13.5)
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java
deleted file mode 100644
index 26b9614..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.any.errorhandling;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.util.Parser;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class AnyResourceTest_serverSideException {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void runtimeException_isMapped() throws Exception {
-
- // given
- final RestfulRequest restfulReq = client.createRequest(RestfulHttpMethod.GET, "version");
- final Header<Boolean> header = new Header<Boolean>("X-FAIL", Parser.forBoolean());
- restfulReq.withHeader(header, true);
-
- // when
- final RestfulResponse<JsonRepresentation> jsonResp = restfulReq.execute();
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.METHOD_FAILURE));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java
deleted file mode 100644
index 88c2131..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.errors.ErrorRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private ErrorRepresentation errorRepresentation;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void followLink() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
- final LinkRepresentation deleteLink = link.withMethod(RestfulHttpMethod.DELETE);
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting objects is not supported."));
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java
deleted file mode 100644
index fc8bb1c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenDisabledMembers_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
- @Test
- public void domainObjectWithDisabledMembers() throws Exception {
-
- // given, when
- final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("BSRL","75");
-
- // property ('visibleButNotEditableProperty')
- final JsonRepresentation properties = domainObjectRepr.getProperties();
- final JsonRepresentation nameProperty = properties.getRepresentation("visibleButNotEditableProperty");
- assertThat(nameProperty.getString("disabledReason"), is("Always disabled"));
- }
-
-
- private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
- final DomainObjectResource domainObjectResource = client.getDomainObjectResource();
-
- final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
- final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- return domainObjectJsonResp.getEntity();
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 2982489..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore("TODO")
- @Test
- public void thenMembers() throws Exception {
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 8f4a162..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore("TODO")
- @Test
- public void thenMembers() throws Exception {
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
deleted file mode 100644
index a107a4f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.*;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenEntityWithActions_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
- @Test
- public void thenMembers() throws Exception {
-
- // when
- final Response jaxrsResponse = domainObjectResource.object("RTNE","78");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
-
- // then
- domainObjectRepr = restfulResponse.getEntity();
- assertThat(domainObjectRepr, is(not(nullValue())));
-
-
- final LinkRepresentation self = domainObjectRepr.getSelf();
-
- // then actions
- final JsonRepresentation actions = domainObjectRepr.getActions();
- assertThat(actions.size(), is(3));
-
- final DomainObjectMemberRepresentation containsAction = domainObjectRepr.getAction("contains");
- assertThat(containsAction.getString("memberType"), is("action"));
- assertThat(containsAction.getString("id"), is("contains"));
-
- LinkRepresentation containsActionLink = containsAction.getLinkWithRel(Rel.DETAILS.andParam("action", "contains"));
- assertThat(containsActionLink.getRel(), is(Rel.DETAILS.andParam("action", "contains")));
- assertThat(containsActionLink.getHref(), is(self.getHref() + "/actions/contains"));
- assertThat(containsActionLink.getType(), is(RepresentationType.OBJECT_ACTION.getMediaType()));
- assertThat(containsActionLink.getHttpMethod(), is(RestfulHttpMethod.GET));
-
- // can also look up with abbreviated parameterized version of Rel
- containsActionLink = containsAction.getLinkWithRel(Rel.DETAILS);
- assertThat(containsActionLink.getRel(), is("urn:org.restfulobjects:rels/details;action=\"contains\""));
- assertThat(containsActionLink.getHref(), is(self.getHref() + "/actions/contains"));
- assertThat(containsActionLink.getType(), is(RepresentationType.OBJECT_ACTION.getMediaType()));
- assertThat(containsActionLink.getHttpMethod(), is(RestfulHttpMethod.GET));
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 3f38f85..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-public class Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore("TODO")
- @Test
- public void thenMembers() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "ApplibValuedEntities");
- domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
-
- // and then members (types)
- DomainObjectMemberRepresentation property;
- ScalarValueRepresentation scalarRepr;
-
-
- // copy from Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 0ea7f76..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenEntityWithCollections_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
-
- @Test
- public void thenCollections() throws Exception {
-
- // when
- final Response jaxrsResponse = domainObjectResource.object("PRMV","43");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
-
- // then
-
- domainObjectRepr = restfulResponse.getEntity();
- assertThat(domainObjectRepr, is(not(nullValue())));
-
- // then collections
-
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java
deleted file mode 100644
index a658574..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Date;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenEntityWithJdkProperties_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void thenMembers() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "JdkValuedEntities");
- final RestfulResponse<JsonRepresentation> restResp = client.follow(link);
- final JsonRepresentation entityRepr = restResp.getEntity();
- domainObjectRepr = entityRepr.as(DomainObjectRepresentation.class);
-
- // and then members (types)
- DomainObjectMemberRepresentation property;
- ScalarValueRepresentation scalarRepr;
-
- property = domainObjectRepr.getProperty("bigDecimalProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("big-decimal(30,10)"));
- assertThat(property.getXIsisFormat(), is("javamathbigdecimal"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- BigDecimal bigDecimal = scalarRepr.asBigDecimal(property.getFormat());
- assertThat(bigDecimal, is(new BigDecimal("12345678901234567890.1234567890")));
-
- property = domainObjectRepr.getProperty("bigDecimalProperty2");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("big-decimal(18,2)"));
- assertThat(property.getXIsisFormat(), is("javamathbigdecimal"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- BigDecimal bigDecimal2 = scalarRepr.asBigDecimal(property.getFormat());
- assertThat(bigDecimal2, is(new BigDecimal("123.45")));
-
- property = domainObjectRepr.getProperty("bigIntegerProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("big-integer"));
- assertThat(property.getXIsisFormat(), is("javamathbiginteger"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- BigInteger bigInteger = scalarRepr.asBigInteger(property.getFormat());
- assertThat(bigInteger, is(new BigInteger("123456789012345678")));
-
- property = domainObjectRepr.getProperty("bigIntegerProperty2");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("big-integer"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- BigInteger bigInteger2 = scalarRepr.asBigInteger(property.getFormat());
- assertThat(bigInteger2, is(new BigInteger("12345")));
-
- property = domainObjectRepr.getProperty("javaSqlDateProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("date"));
- assertThat(property.getXIsisFormat(), is("javasqldate"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- assertThat(scalarRepr.asString(), is("2014-04-24"));
- assertThat(scalarRepr.asDate(), is(asDate("2014-04-24")));
-
- property = domainObjectRepr.getProperty("javaSqlTimeProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("time"));
- assertThat(property.getXIsisFormat(), is("javasqltime"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- assertThat(scalarRepr.asString(), is("12:34:45"));
- assertThat(scalarRepr.asTime(), is(asDateTime("1970-01-01T12:34:45Z")));
-
- property = domainObjectRepr.getProperty("javaSqlTimestampProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("utc-millisec"));
- assertThat(property.getXIsisFormat(), is("javasqltimestamp"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isInt() || scalarRepr.isLong(), is(true));
- Long aLong = scalarRepr.asLong();
- assertThat(aLong, is(new Long("1234567890")));
-
- property = domainObjectRepr.getProperty("javaUtilDateProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("date-time"));
- assertThat(property.getXIsisFormat(), is("javautildate"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- Date utilDate = scalarRepr.asDateTime();
- assertThat(utilDate, is(asDateTime("2013-05-25T12:34:45Z")));
- assertThat(scalarRepr.asString(), is("2013-05-25T12:34:45Z"));
-
- property = domainObjectRepr.getProperty("myEnum");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("string"));
- assertThat(property.getXIsisFormat(), is("string"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- String myEnumStr = scalarRepr.asString();
- assertThat(myEnumStr, is("RED"));
- }
-
-
- private static Date asDate(final String text) {
- return new java.util.Date(JsonRepresentation.yyyyMMdd.withZoneUTC().parseDateTime(text).getMillis());
- }
-
- private static Date asDateTime(final String text) {
- return new java.util.Date(JsonRepresentation.yyyyMMddTHHmmssZ.withZoneUTC().parseDateTime(text).getMillis());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java
deleted file mode 100644
index e6b55d7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import java.util.Date;
-import org.joda.time.LocalDateTime;
-import org.joda.time.format.ISODateTimeFormat;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.*;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenEntityWithJodaProperties_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void thenMembers() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "JodaValuedEntities");
- domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
-
- // and then members (types)
- DomainObjectMemberRepresentation property;
- ScalarValueRepresentation scalarRepr;
-
- property = domainObjectRepr.getProperty("dateTimeProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("date-time"));
- assertThat(property.getXIsisFormat(), is("jodadatetime"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- assertThat(scalarRepr.asDateTime(), is(asDateTime("2010-03-31T09:50:43Z")));
- assertThat(scalarRepr.asString(), is("2010-03-31T09:50:43Z"));
-
- property = domainObjectRepr.getProperty("localDateProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("date"));
- assertThat(property.getXIsisFormat(), is("jodalocaldate"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- assertThat(scalarRepr.asDate(), is(asDate("2008-03-21")));
- assertThat(scalarRepr.asString(), is("2008-03-21"));
-
- property = domainObjectRepr.getProperty("localDateTimeProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("date-time"));
- assertThat(property.getXIsisFormat(), is("jodalocaldatetime"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
-
- final LocalDateTime expected = new LocalDateTime(2009, 4, 29, 13, 45, 22);
-
- assertThat(scalarRepr.asDateTime(), is(expected.toDate()));
- assertThat(scalarRepr.asString(), is(ISODateTimeFormat.dateTimeNoMillis().withZoneUTC().print(expected.toDateTime())));
-
- // and then member types have links to details (selected ones inspected only)
- property = domainObjectRepr.getProperty("localDateProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/JODA\\/\\d+\\/properties\\/localDateProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
-
- property = domainObjectRepr.getProperty("localDateTimeProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/JODA\\/\\d+\\/properties\\/localDateTimeProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
- }
-
- private static Date asDate(final String text) {
- return new java.util.Date(JsonRepresentation.yyyyMMdd.withZoneUTC().parseDateTime(text).getMillis());
- }
-
- private static Date asDateTime(final String text) {
- return new java.util.Date(JsonRepresentation.yyyyMMddTHHmmssZ.withZoneUTC().parseDateTime(text).getMillis());
- }
-
-}
[41/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java
new file mode 100644
index 0000000..acd9793
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.persistence;
+
+import org.jmock.Expectations;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures.Fixtures.Initialization;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault;
+import org.apache.isis.core.metamodel.spec.ObjectSpecId;
+import org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller;
+import org.apache.isis.core.runtime.system.persistence.IdentifierGenerator;
+import org.apache.isis.core.tck.dom.refs.ParentEntityRepository;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+public class PersistorSessionHydratorTest {
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ private RootOid epvTransientOid = RootOidDefault.deString("!SMPL:-999", new OidMarshaller());
+
+ private IdentifierGenerator mockIdentifierGenerator = context.mock(IdentifierGenerator.class);
+ {
+ context.checking(new Expectations() {
+ {
+ final ObjectSpecId docdSpecId = ObjectSpecId.of(DomainObjectContainerDefault.class.getName());
+ allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(docdSpecId)), with(an(DomainObjectContainerDefault.class)));
+ will(returnValue("1"));
+ allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(docdSpecId)), with(an(DomainObjectContainerDefault.class)), with(any(RootOid.class)));
+ will(returnValue("1"));
+
+ final ObjectSpecId peSpecId = ObjectSpecId.of("ParentEntities");
+ allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(peSpecId)), with(an(ParentEntityRepository.class)));
+ will(returnValue("1"));
+ allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(peSpecId)), with(an(ParentEntityRepository.class)), with(any(RootOid.class)));
+ will(returnValue("1"));
+
+ final ObjectSpecId smplSpecId = ObjectSpecId.of("SMPL");
+ allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(smplSpecId)), with(an(SimpleEntity.class)));
+ will(returnValue("-999"));
+
+ allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(smplSpecId)), with(an(SimpleEntity.class)), with(any(RootOid.class)));
+ will(returnValue("1"));
+ }
+ });
+ }
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
+ .with(Initialization.NO_INIT)
+ .with(new InMemoryPersistenceMechanismInstaller())
+ .build();
+
+
+ @Test
+ public void adaptorFor_whenTransient() {
+ // given
+ iswf.fixtures.smpl1 = iswf.container.newTransientInstance(SimpleEntity.class);
+
+ // when
+ final ObjectAdapter adapter = iswf.adapterFor(iswf.fixtures.smpl1);
+
+ // then
+ assertEquals(epvTransientOid, adapter.getOid());
+ assertEquals(iswf.fixtures.smpl1, adapter.getObject());
+ assertEquals(ResolveState.TRANSIENT, adapter.getResolveState());
+ assertEquals(null, adapter.getVersion());
+ }
+
+ @Test
+ public void recreateAdapter_whenPersistent() throws Exception {
+
+ // given persisted object
+ iswf.fixtures.smpl1 = iswf.container.newTransientInstance(SimpleEntity.class);
+ iswf.fixtures.smpl1.setName("Fred");
+ iswf.persist(iswf.fixtures.smpl1);
+ iswf.tearDownSystem();
+ iswf.setUpSystem();
+
+ // when
+ final RootOidDefault oid = RootOidDefault.deString("SMPL:1", new OidMarshaller());
+ final ObjectAdapter adapter = iswf.recreateAdapter(oid);
+
+ // then
+ assertEquals(oid, adapter.getOid());
+ assertEquals(ResolveState.GHOST, adapter.getResolveState());
+
+ final SimpleEntity epv = (SimpleEntity)adapter.getObject();
+ assertEquals("Fred", epv.getName());
+ assertNotNull(adapter.getVersion());
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java
new file mode 100644
index 0000000..9b570a0
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.integtestsupport.persistence;
+
+public class RuntimeTestPojo {
+
+ private static int nextId;
+ private final int id = nextId++;
+ private final String state = "pojo" + id;
+
+ @Override
+ public String toString() {
+ return "Pojo#" + id;
+ }
+
+ @Override
+ public boolean equals(final Object other) {
+ if (other == null) {
+ return false;
+ }
+ if (other == this) {
+ return true;
+ }
+ if (other.getClass() == getClass()) {
+ final RuntimeTestPojo otherTestPojo = (RuntimeTestPojo) other;
+ return otherTestPojo.state.equals(state);
+ }
+ return false;
+ }
+
+ @Override
+ public int hashCode() {
+ return state.hashCode();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java
new file mode 100644
index 0000000..933b6d6
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.tck;
+
+import java.util.Date;
+import java.util.List;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.RootOid;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
+import org.apache.isis.core.runtime.persistence.query.PersistenceQueryFindByTitle;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.ObjectStore;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+
+import static org.junit.Assert.*;
+
+public abstract class ObjectStoreContractTest_persist {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
+ .with(createPersistenceMechanismInstaller())
+ .with(iswfListener()).build();
+
+
+ /**
+ * Mandatory hook.
+ */
+ protected abstract PersistenceMechanismInstaller createPersistenceMechanismInstaller();
+
+ protected IsisSystemWithFixtures.Listener iswfListener() {
+ return null;
+ }
+
+ /**
+ * hook method
+ */
+ protected void resetPersistenceStore() {
+ }
+
+ protected ObjectAdapter epv2Adapter;
+ protected ObjectSpecification epvSpecification;
+
+ protected ObjectStore getStore() {
+ PersistenceSession psos = IsisContext.getPersistenceSession();
+ return psos.getObjectStore();
+ }
+
+
+ @Before
+ public void setUpFixtures() throws Exception {
+ epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
+ epvSpecification = iswf.loadSpecification(SimpleEntity.class);
+ }
+
+
+ @Test
+ public void getInstances_usingFindByTitle() throws Exception {
+
+ // given nothing in DB
+ resetPersistenceStore();
+
+ // when search for any object
+ boolean hasInstances = getStore().hasInstances(epvSpecification);
+
+ // then find none
+ assertFalse(hasInstances);
+
+ // given now persisted
+ final SimpleEntity epv2 = iswf.fixtures.smpl2;
+ epv2.setName("foo");
+ epv2.setDate(new Date());
+ epv2.setNullable(1234567890L);
+ epv2.setSize(123);
+
+ iswf.persist(epv2);
+
+ iswf.bounceSystem();
+
+ // when search for object
+ List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
+
+ // then find
+ assertEquals(1, retrievedInstance.size());
+ final ObjectAdapter retrievedAdapter = retrievedInstance.get(0);
+
+ assertNotSame(epv2Adapter, retrievedAdapter);
+ assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
+ assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
+
+ // and when search for some other title
+ retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, "some other title"));
+
+ // then don't find
+ assertEquals(0, retrievedInstance.size());
+ }
+
+
+ @Test
+ public void updateInstance() throws Exception {
+
+ // given persisted
+ resetPersistenceStore();
+ ObjectAdapter adapter = iswf.persist(iswf.fixtures.smpl2);
+ final RootOid oid = (RootOid) adapter.getOid();
+ iswf.bounceSystem();
+
+ // when change
+ adapter = iswf.reload(oid);
+
+ SimpleEntity epv = (SimpleEntity) adapter.getObject();
+ epv.setName("changed");
+
+ iswf.bounceSystem();
+
+ // then found
+ List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, adapter.titleString()));
+ assertEquals(1, retrievedInstance.size());
+
+ final ObjectAdapter retrievedAdapter = retrievedInstance.get(0);
+ assertNotSame(adapter, retrievedAdapter);
+ assertEquals(((SimpleEntity)adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
+ assertEquals(adapter.getOid(), retrievedAdapter.getOid());
+ }
+
+ @Test
+ public void removeInstance() throws Exception {
+
+ // given persisted
+ iswf.beginTran();
+ resetPersistenceStore();
+ ObjectAdapter adapter = iswf.persist(iswf.fixtures.smpl2);
+ final RootOid oid = (RootOid) adapter.getOid();
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ // when destroy
+ iswf.beginTran();
+ adapter = iswf.reload(oid);
+
+ SimpleEntity epv = (SimpleEntity) adapter.getObject();
+ iswf.destroy(epv);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ // then not found
+ iswf.beginTran();
+ assertEquals(false, getStore().hasInstances(epvSpecification));
+ iswf.commitTran();
+ }
+}
+
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java
new file mode 100644
index 0000000..0ca1be6
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.debug.DebugString;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class InMemoryObjectStoreTest_debug {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ private static InMemoryObjectStore getStore() {
+ return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
+ }
+
+ @Test
+ public void debugTitle() throws Exception {
+
+ // when
+ final String debugTitle = getStore().debugTitle();
+
+ // then
+ assertThat(debugTitle, is("In-Memory Object Store"));
+ }
+
+
+ @Test
+ public void debugXxx_whenHasObject() throws Exception {
+
+ // given
+ iswf.persist(iswf.fixtures.smpl1);
+
+ // when
+ final DebugString debug = new DebugString();
+ getStore().debugData(debug);
+
+
+ // then
+ assertThat(debug.toString(), IsisMatchers.containsStripNewLines("SMPL:3"));
+ }
+
+
+ @Test
+ public void testEmpty() throws Exception {
+
+ // when
+ final DebugString debug = new DebugString();
+ getStore().debugData(debug);
+
+ // then
+ assertThat(debug.toString(), is("\nDomain Objects\n--------------\n\n"));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java
new file mode 100644
index 0000000..d5ebf6a
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import static org.junit.Assert.assertFalse;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class InMemoryObjectStoreTest_init {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ private static InMemoryObjectStore getStore() {
+ return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
+ }
+
+ @Test
+ public void testStartsUpInUnitializedSate() throws Exception {
+ assertFalse(getStore().isFixturesInstalled());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java
new file mode 100644
index 0000000..6bf7c36
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class InMemoryObjectStoreTest_name {
+
+ private InMemoryObjectStore store;
+
+ @Before
+ public void setUp() throws Exception {
+ store = new InMemoryObjectStore();
+ }
+
+ @Test
+ public void testName() throws Exception {
+ assertEquals("In-Memory Object Store", store.name());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java
new file mode 100644
index 0000000..241a5ae
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import org.jmock.Expectations;
+import org.jmock.auto.Mock;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.objectstore.internal.ObjectStorePersistedObjects;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and
+ * <i>Growing Object-Oriented Software</i> (Freeman & Pryce).
+ */
+public class InMemoryObjectStoreTest_openAndClose {
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ @Mock
+ private InMemoryPersistenceSessionFactory mockInMemoryPersistenceSessionFactory;
+ @Mock
+ private PersistenceSession mockPersistenceSession;
+ @Mock
+ private ObjectStorePersistedObjects mockObjectStorePersistedObjects;
+
+ private boolean recreatedAdapters = false;
+
+ private InMemoryObjectStore objectStore;
+
+ @Before
+ public void setUp() throws Exception {
+ objectStore = new InMemoryObjectStore() {
+ @Override
+ protected InMemoryPersistenceSessionFactory getInMemoryPersistenceSessionFactory() {
+ return mockInMemoryPersistenceSessionFactory;
+ }
+
+ @Override
+ protected PersistenceSession getPersistenceSession() {
+ return mockPersistenceSession;
+ }
+
+ @Override
+ protected void recreateAdapters() {
+ recreatedAdapters = true;
+ }
+ };
+ }
+
+ @Test
+ public void whenOpenForFirstTimeThenCreatesPersistedObjects() throws Exception {
+ context.never(mockPersistenceSession);
+ context.checking(new Expectations() {
+ {
+ one(mockInMemoryPersistenceSessionFactory).getPersistedObjects();
+ will(returnValue(null));
+
+ one(mockInMemoryPersistenceSessionFactory).createPersistedObjects();
+ will(returnValue(mockObjectStorePersistedObjects));
+ }
+ });
+ objectStore.open();
+ }
+
+ @Test
+ public void whenOpenSubsequentlyThenObtainsPersistedObjectsFromObjectStoreFactoryAndRecreatesAdapters() throws Exception {
+ context.never(mockPersistenceSession);
+ context.checking(new Expectations() {
+ {
+ one(mockInMemoryPersistenceSessionFactory).getPersistedObjects();
+ will(returnValue(mockObjectStorePersistedObjects));
+ }
+ });
+
+ assertThat(recreatedAdapters, is(false));
+ objectStore.open();
+ assertThat(recreatedAdapters, is(true));
+ }
+
+ @Test
+ public void whenCloseThenGivesObjectsBackToObjectStoreFactory() throws Exception {
+ context.never(mockPersistenceSession);
+ whenOpenSubsequentlyThenObtainsPersistedObjectsFromObjectStoreFactoryAndRecreatesAdapters();
+
+ context.checking(new Expectations() {
+ {
+ one(mockInMemoryPersistenceSessionFactory).attach(with(mockPersistenceSession), with(mockObjectStorePersistedObjects));
+ never(mockPersistenceSession);
+ }
+ });
+ objectStore.close();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java
new file mode 100644
index 0000000..e88b477
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures.Listener;
+import org.apache.isis.core.integtestsupport.tck.ObjectStoreContractTest_persist;
+import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
+
+public class InMemoryObjectStoreTest_persist extends ObjectStoreContractTest_persist {
+
+ @Override
+ protected PersistenceMechanismInstaller createPersistenceMechanismInstaller() {
+ return new InMemoryPersistenceMechanismInstaller();
+ }
+
+ @Override
+ protected Listener iswfListener() {
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java
new file mode 100644
index 0000000..b07bbf3
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
+import org.apache.isis.core.tck.dom.refs.ReferencingEntity;
+
+public class InMemoryObjectStoreTest_persistAggregated {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
+ .with(createPersistenceMechanismInstaller())
+ .build();
+
+ protected PersistenceMechanismInstaller createPersistenceMechanismInstaller() {
+ return new InMemoryPersistenceMechanismInstaller();
+ }
+
+ @Test
+ public void persistAggregatedEntityWithinCollection() throws Exception {
+ final ReferencingEntity referencingEntity = iswf.fixtures.rfcg2;
+ referencingEntity.addAggregatedEntityToCollection().setName("Aggregated Entity #1");
+ iswf.persist(referencingEntity);
+ }
+
+
+ @Test
+ public void persistAggregatedEntityWithinProperty() throws Exception {
+ final ReferencingEntity referencingEntity = iswf.fixtures.rfcg2;
+ referencingEntity.addAggregatedReference().setName("Aggregated Entity #1");
+ iswf.persist(referencingEntity);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java
new file mode 100644
index 0000000..357a512
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+
+/**
+ * This is really just a test of the test infrastructure, not a real test per se.
+ */
+public class InMemoryObjectStoreTest_reset {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ protected ObjectAdapter epv2Adapter;
+ protected ObjectSpecification epvSpecification;
+
+ protected InMemoryObjectStore getStore() {
+ return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
+ }
+
+ @Before
+ public void setUpFixtures() throws Exception {
+ epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
+ epvSpecification = iswf.loadSpecification(SimpleEntity.class);
+ }
+
+ @Test
+ public void reset_clearsAdapterFromLoader() throws Exception {
+
+ iswf.persist(iswf.fixtures.smpl2);
+ iswf.bounceSystem();
+
+ assertNotNull(getAdapterManager().getAdapterFor(epv2Adapter.getObject()));
+
+ IsisContext.getPersistenceSession().testReset();
+
+ assertNull(getAdapterManager().getAdapterFor(epv2Adapter.getObject()));
+ }
+
+
+ private PersistenceSession getPersistenceSession() {
+ return IsisContext.getPersistenceSession();
+ }
+
+ private AdapterManager getAdapterManager() {
+ return getPersistenceSession().getAdapterManager();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java
new file mode 100644
index 0000000..2725e81
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java
@@ -0,0 +1,166 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import java.util.List;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.persistence.ObjectNotFoundException;
+import org.apache.isis.core.runtime.persistence.query.PersistenceQueryFindAllInstances;
+import org.apache.isis.core.runtime.persistence.query.PersistenceQueryFindByTitle;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+
+import static org.junit.Assert.*;
+
+public class InMemoryObjectStoreTest_retrieve {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ protected ObjectAdapter epv2Adapter;
+ protected ObjectAdapter epv3Adapter;
+ protected ObjectAdapter epv4Adapter;
+ protected ObjectSpecification epvSpecification;
+
+ protected InMemoryObjectStore getStore() {
+ return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
+ }
+
+ @Before
+ public void setUpFixtures() throws Exception {
+ epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
+ epv3Adapter = iswf.adapterFor(iswf.fixtures.smpl3);
+ epv4Adapter = iswf.adapterFor(iswf.fixtures.smpl4);
+ epvSpecification = iswf.loadSpecification(SimpleEntity.class);
+ }
+
+ @Test
+ public void getObject_whenDoesNotExist() {
+ final TypedOid oid = RootOidDefault.deString("SMPL:10", new OidMarshaller());
+ try {
+ getStore().loadInstanceAndAdapt(oid);
+ fail();
+ } catch (final ObjectNotFoundException expected) {
+ }
+ }
+
+ @Test
+ public void getObject_whenExists_returnsAdapter() throws Exception {
+
+ // given
+ iswf.persist(iswf.fixtures.smpl2);
+ iswf.bounceSystem();
+
+ final ObjectAdapter retrievedAdapter = getStore().loadInstanceAndAdapt((TypedOid) epv2Adapter.getOid());
+
+ assertNotSame(epv2Adapter, retrievedAdapter);
+ assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
+ assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
+ }
+
+ @Test
+ public void getInstances_whenDoesNotExist() throws Exception {
+ final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
+ assertEquals(0, retrievedAdapters.size());
+ }
+
+ @Test
+ public void getInstances_findByTitle() throws Exception {
+ // given
+ iswf.persist(iswf.fixtures.smpl2);
+ iswf.bounceSystem();
+
+ // when
+ final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
+
+ // then
+ assertEquals(1, retrievedAdapters.size());
+ final ObjectAdapter retrievedAdapter = retrievedAdapters.get(0);
+
+ assertNotSame(epv2Adapter, retrievedAdapter);
+ assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
+ assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
+ }
+
+ @Test
+ public void getInstances_findAll() throws Exception {
+ // given
+ iswf.persist(iswf.fixtures.smpl2);
+ iswf.bounceSystem();
+
+ // when
+ final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindAllInstances(epvSpecification));
+
+ // then
+ assertEquals(1, retrievedAdapters.size());
+ final ObjectAdapter retrievedAdapter = retrievedAdapters.get(0);
+
+ assertNotSame(epv2Adapter, retrievedAdapter);
+ assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
+ assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
+ }
+
+ @Ignore // gonna retire soon anyway...
+ @Test
+ public void getInstances_findRange() throws Exception {
+ // given
+ iswf.persist(iswf.fixtures.smpl1); // 0
+ iswf.persist(iswf.fixtures.smpl2); // 1
+ iswf.persist(iswf.fixtures.smpl3); // 2 <- this one
+ iswf.persist(iswf.fixtures.smpl4); // 3 <- this one
+ iswf.bounceSystem();
+
+ // when
+ final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindAllInstances(epvSpecification, 2, 2));
+
+ // then
+ assertEquals(2, retrievedAdapters.size());
+ final ObjectAdapter retrievedAdapter = retrievedAdapters.get(0);
+
+ assertNotSame(epv4Adapter, retrievedAdapter);
+ assertEquals(((SimpleEntity)epv4Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
+ assertEquals(epv4Adapter.getOid(), retrievedAdapter.getOid());
+ }
+
+
+ @Test
+ public void hasInstances_whenEmpty() throws Exception {
+ assertEquals(false, getStore().hasInstances(epvSpecification));
+ }
+
+ @Test
+ public void hasInstances_whenHasSome() throws Exception {
+ iswf.persist(iswf.fixtures.smpl2);
+ iswf.bounceSystem();
+
+ assertEquals(true, getStore().hasInstances(epvSpecification));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java
new file mode 100644
index 0000000..f9b3f2e
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.objectstore;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.spec.ObjectSpecId;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.tck.dom.refs.ParentEntityRepository;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+
+import static org.junit.Assert.assertEquals;
+
+public class InMemoryObjectStoreTest_serviceRegistry {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ protected ObjectAdapter epv2Adapter;
+ protected ObjectSpecification epvSpecification;
+
+ protected InMemoryObjectStore getStore() {
+ return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
+ }
+
+ @Before
+ public void setUpFixtures() throws Exception {
+ epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
+ epvSpecification = iswf.loadSpecification(SimpleEntity.class);
+ }
+
+ @Test
+ public void getOidForServices() throws Exception {
+ final Oid oidForService = getStore().getOidForService(iswf.loadSpecification(ParentEntityRepository.class));
+ assertEquals(RootOidDefault.create(ObjectSpecId.of("ParentEntities"), "2"), oidForService);
+ }
+
+
+// @Test
+// public void registerService_canBeRetrieved() throws Exception {
+// registerService14();
+//
+// final Oid oidForService = store.getOidForService(serviceSpecification);
+// assertEquals(oid14, oidForService);
+// }
+//
+// @Test
+// public void testCantRegisterServiceMoreThanOnce() throws Exception {
+// registerService14();
+// try {
+// registerService14();
+// fail();
+// } catch (final IsisException expected) {
+// }
+// }
+//
+// @Test
+// public void testCanRegisterMoreThanOneService() throws Exception {
+// registerService14();
+// registerService15();
+// }
+//
+//
+// private void resetIdentityMap() {
+// IsisContext.getPersistenceSession().testReset();
+// }
+//
+// protected void addObjectToStore(final ObjectAdapter object) {
+// final PersistenceCommand command = store.createCreateObjectCommand(object);
+// assertEquals(object, command.onObject());
+// store.execute(Collections.<PersistenceCommand> singletonList(command));
+// }
+//
+// private RootOidDefault registerService14() {
+// return oid14 = registerService(""+14);
+// }
+//
+// private RootOidDefault registerService15() {
+// return registerService(""+15);
+// }
+//
+// private RootOidDefault registerService(final String id) {
+// final RootOidDefault oid = RootOidDefault.createPersistent("SVC", id);
+// store.registerService(oid);
+// resetIdentityMap();
+// return oid;
+// }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java
new file mode 100644
index 0000000..5ec351c
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java
@@ -0,0 +1,222 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.runtime.fixturedomainservice;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assume.assumeThat;
+
+import java.io.StringReader;
+import java.io.StringWriter;
+import java.text.SimpleDateFormat;
+import java.util.HashSet;
+import java.util.Locale;
+import java.util.Set;
+import java.util.TimeZone;
+
+import junit.framework.Assert;
+
+import com.google.common.collect.Sets;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.ParentEntity;
+import org.apache.isis.core.tck.dom.refs.ReferencingEntity;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+
+public class ObjectFixtureFilePersistorTest {
+
+ private static final String DATEFORMAT_PATTERN = "dd-MMM-yyyy HH:mm z";
+
+ private static final SimpleDateFormat dateFormat = new SimpleDateFormat(DATEFORMAT_PATTERN, Locale.US);
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
+ .with(configuration()).build();
+
+ private static IsisConfiguration configuration() {
+ final IsisConfigurationDefault config = new IsisConfigurationDefault();
+ config.add("isis.value.format.datetime", DATEFORMAT_PATTERN);
+ return config;
+ }
+
+ private ObjectFixtureFilePersistor persistor;
+
+ @Before
+ public void setup() throws Exception {
+ org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
+
+ Locale.setDefault(Locale.UK);
+
+ persistor = new ObjectFixtureFilePersistor();
+
+ iswf.fixtures.smpl1.setName("Fred Smith");
+ iswf.fixtures.smpl1.setDate(dateFormat.parse("08-Mar-2010 01:00 UTC"));
+
+ iswf.fixtures.smpl2.setName("Joe Bloggs");
+ iswf.fixtures.smpl2.setDate(dateFormat.parse("09-Apr-2011 02:10 UTC"));
+
+ assumeThat(TimeZone.getDefault().getDisplayName(), is("Greenwich Mean Time"));
+ }
+
+
+ @Test
+ public void loadInstance() throws Exception {
+
+ final StringReader reader = new StringReader(SimpleEntity.class.getName() + "#1\n name: Fred Smith\n date: 08-Mar-2010 01:00 UTC");
+ final Set<Object> objects = persistor.loadData(reader);
+
+ assertEquals(1, objects.size());
+ final Object object = objects.toArray()[0];
+ assertThat(object instanceof SimpleEntity, is(true));
+ final SimpleEntity epv = (SimpleEntity) object;
+ assertEquals("Fred Smith", epv.getName());
+
+ assertEquals(dateFormat.parse("08-Mar-2010 01:00 GMT"), epv.getDate());
+ }
+
+ @Test
+ public void invalidFieldLine() throws Exception {
+ try {
+ final StringReader reader = new StringReader(SimpleEntity.class.getName() + "#1\n name Fred Smith");
+ persistor.loadData(reader);
+ Assert.fail();
+ } catch (final FixtureException e) {
+ Assert.assertEquals("failed to load data at line 2", e.getMessage());
+ Assert.assertEquals("no colon (:) in: name Fred Smith", e.getCause().getMessage());
+ }
+ }
+
+ @Test
+ public void oldFieldNameSkipped() throws Exception {
+ final StringReader reader = new StringReader(SimpleEntity.class.getName() + "#1\n xname: Fred Smith");
+ final Set<Object> objects = persistor.loadData(reader);
+ final Object object = objects.toArray()[0];
+ Assert.assertNull(((SimpleEntity) object).getName());
+
+ }
+
+ @Test
+ public void saveNoObjects() throws Exception {
+ // Person person = new Person();
+ final Set<Object> objects = new HashSet<Object>();
+ final StringWriter out = new StringWriter();
+ persistor.save(objects, out);
+ Assert.assertEquals("", out.toString());
+ }
+
+ @Test
+ public void saveOneObject() throws Exception {
+ final Set<Object> objects = Sets.newLinkedHashSet();
+ objects.add(iswf.fixtures.smpl1);
+
+ final StringWriter out = new StringWriter();
+ persistor.save(objects, out);
+ final String actual = canonicalize(out);
+
+ final String expected = SimpleEntity.class.getName() + "#2\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
+
+ assertThat(actual, IsisMatchers.startsWith(expected));
+ }
+
+ @Test
+ public void saveTwoObjects() throws Exception {
+ final Set<Object> objects = Sets.newLinkedHashSet();
+ objects.add(iswf.fixtures.smpl1);
+ objects.add(iswf.fixtures.smpl3);
+
+ final StringWriter out = new StringWriter();
+ persistor.save(objects, out);
+ final String actual = canonicalize(out);
+
+ final String expected1 = SimpleEntity.class.getName() + "#2\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
+ final String expected2 = SimpleEntity.class.getName() + "#3\n date: \n name: 3\n";
+ assertThat(actual, IsisMatchers.contains(expected1));
+ assertThat(actual, IsisMatchers.contains(expected2));
+ }
+
+
+ private String canonicalize(final String out) {
+ return out.replaceAll("\r\n", "\n");
+ }
+
+ private String canonicalize(final StringWriter out) {
+ return canonicalize(out.toString());
+ }
+
+ @Test
+ public void saveReferencedObject() throws Exception {
+
+ final Set<Object> objects = Sets.newLinkedHashSet();
+
+ iswf.fixtures.rfcg1.setReference(iswf.fixtures.smpl1);
+ objects.add(iswf.fixtures.rfcg1);
+ objects.add(iswf.fixtures.smpl1);
+
+ final StringWriter out = new StringWriter();
+ persistor.save(objects, out);
+ final String actual = canonicalize(out);
+
+ final String expected1 = ReferencingEntity.class.getName() + "#2\n aggregatedEntities: \n aggregatedReference: \n reference: " + SimpleEntity.class.getName() + "#3";
+ final String expected2 = SimpleEntity.class.getName() + "#3\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
+ assertThat(actual, IsisMatchers.contains(expected1));
+ assertThat(actual, IsisMatchers.contains(expected2));
+ }
+
+
+ @Test
+ public void saveObjectAndAssociatedCollection() throws Exception {
+
+ final Set<Object> objects = Sets.newLinkedHashSet();
+
+ iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl1);
+ iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl2);
+ objects.add(iswf.fixtures.prnt1);
+
+ objects.add(iswf.fixtures.smpl1);
+ objects.add(iswf.fixtures.smpl2);
+
+ final StringWriter out = new StringWriter();
+ persistor.save(objects, out);
+ final String actual = canonicalize(out);
+
+ final String expected1a = ParentEntity.class.getName() + "#2\n";
+ final String expected1b = "heterogeneousCollection: \n homogeneousCollection: " + SimpleEntity.class.getName() + "#3 " + SimpleEntity.class.getName() + "#4 " + "\n";
+ final String expected2 = SimpleEntity.class.getName() + "#3\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
+ final String expected3 = SimpleEntity.class.getName() + "#4\n date: 09-Apr-2011 02:10 UTC\n name: Joe Bloggs\n";
+ assertThat(actual.replaceAll("\n", "###"), IsisMatchers.contains(expected1a.replaceAll("\n", "###")));
+ assertThat(actual.replaceAll("\n", "###"), IsisMatchers.contains(expected1b.replaceAll("\n", "###")));
+ assertThat(actual, IsisMatchers.contains(expected2));
+ assertThat(actual, IsisMatchers.contains(expected3));
+ }
+
+}
+
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java
new file mode 100644
index 0000000..b0fe6db
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.runtime.fixturedomainservice;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.Date;
+import java.util.Locale;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.commons.config.ConfigurationConstants;
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+public class ObjectFixtureServiceTest_loadFile {
+
+ private static IsisConfiguration configuration() {
+ IsisConfigurationDefault configuration = new IsisConfigurationDefault();
+ configuration.add(ConfigurationConstants.ROOT + "exploration-objects.file", "test.data");
+ return configuration;
+ }
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().with(configuration()).build();
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ private ObjectFixtureService service;
+
+
+ @Before
+ public void setup() {
+ org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
+ Locale.setDefault(Locale.UK);
+
+ service = new ObjectFixtureService();
+ }
+
+
+ @Test
+ public void loadFile() throws Exception {
+
+ // when
+ service.loadFile();
+
+ // then
+ final Set<Object> objects = service.allSavedObjects();
+ Assert.assertEquals(1, objects.size());
+ final Object object = objects.toArray()[0];
+ assertThat(object instanceof SimpleEntity, is(true));
+ Assert.assertEquals("Fred Smith", ((SimpleEntity) object).getName());
+ Assert.assertEquals(new Date(110, 2, 8, 13, 32), ((SimpleEntity) object).getDate());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java
new file mode 100644
index 0000000..1087b67
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.runtime.fixturedomainservice;
+
+import java.io.File;
+import java.util.Locale;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+public class ObjectFixtureServiceTest_loadFile_nothingExists {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ private ObjectFixtureService service;
+
+
+ @Before
+ public void setup() {
+ org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
+ Locale.setDefault(Locale.UK);
+
+ service = new ObjectFixtureService();
+ deleteFixtureData();
+ }
+
+
+ private static void deleteFixtureData() {
+ new File("fixture-data").delete();
+ }
+
+ @Test
+ public void loadNothingIfNoFileExists() throws Exception {
+ service.loadFile();
+
+ final Set<Object> objects = service.allSavedObjects();
+ Assert.assertEquals(0, objects.size());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java
new file mode 100644
index 0000000..fbb3b69
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.runtime.fixturedomainservice;
+
+import java.io.File;
+import java.util.Date;
+import java.util.Locale;
+import java.util.Set;
+
+import junit.framework.Assert;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.ParentEntity;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+public class ObjectFixtureServiceTest_save {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ private ObjectFixtureService service;
+
+
+ @Before
+ public void setup() {
+ org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
+ Locale.setDefault(Locale.UK);
+
+ service = new ObjectFixtureService();
+ deleteFixtureData();
+ }
+
+
+ private static void deleteFixtureData() {
+ new File("fixture-data").delete();
+ }
+
+
+ @Test
+ public void saveObjectAddedToList() throws Exception {
+
+ final SimpleEntity epv = iswf.fixtures.smpl1;
+ epv.setName("Fred Smith");
+ epv.setDate(new Date(110, 2, 8, 13, 32));
+
+ final ParentEntity epc = iswf.fixtures.prnt1;
+ epc.getHomogeneousCollection().add(iswf.fixtures.smpl1);
+ epc.getHomogeneousCollection().add(iswf.fixtures.smpl2);
+ service.save(epc);
+
+ final Set<Object> savedObjects = service.allSavedObjects();
+ Assert.assertEquals(3, savedObjects.size());
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
new file mode 100644
index 0000000..6787e43
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
@@ -0,0 +1,221 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.runtime.memento;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertSame;
+import static org.junit.Assert.assertThat;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.util.List;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.commons.encoding.DataInputStreamExtended;
+import org.apache.isis.core.commons.encoding.DataOutputStreamExtended;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.tck.dom.refs.BaseEntity;
+import org.apache.isis.core.tck.dom.refs.ParentEntity;
+import org.apache.isis.core.tck.dom.refs.ReferencingEntity;
+import org.apache.isis.core.tck.dom.refs.SimpleEntity;
+
+public class MementoTest {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ private ObjectAdapter originalAdapterForEpv1;
+ private ObjectAdapter originalAdapterForEpr1;
+ private ObjectAdapter originalAdapterForEpc1;
+
+ private ObjectAdapter recreatedAdapter;
+
+ private Memento mementoForEpv1;
+ private Memento mementoForEpr1;
+ private Memento mementoForEpc1;
+
+ private byte[] bytesForEpv1;
+ private byte[] bytesForEpr1;
+ private byte[] bytesForEpc1;
+
+ private ByteArrayInputStream bais;
+
+
+ @Before
+ public void setUpSystem() throws Exception {
+
+// final Logger logger = LoggerFactory.getLogger(FieldType.class);
+// logger.setLevel(Level.DEBUG);
+// logger.addAppender(new ConsoleAppender());
+// BasicConfigurator.configure();
+
+ iswf.fixtures.smpl1.setName("Fred");
+ iswf.fixtures.smpl2.setName("Harry");
+
+ iswf.fixtures.rfcg1_a1.setName("Tom");
+
+ iswf.fixtures.rfcg1.setReference(iswf.fixtures.smpl1);
+ iswf.fixtures.rfcg1.setAggregatedReference(iswf.fixtures.rfcg1_a1);
+
+ iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl1);
+ iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl2);
+
+ iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.smpl1);
+ iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.rfcg1);
+
+ originalAdapterForEpv1 = iswf.adapterFor(iswf.fixtures.smpl1);
+ originalAdapterForEpr1 = iswf.adapterFor(iswf.fixtures.rfcg1);
+ originalAdapterForEpc1 = iswf.adapterFor(iswf.fixtures.prnt1);
+
+ mementoForEpv1 = new Memento(originalAdapterForEpv1);
+ mementoForEpr1 = new Memento(originalAdapterForEpr1);
+ mementoForEpc1 = new Memento(originalAdapterForEpc1);
+
+ bytesForEpv1 = toBytes(mementoForEpv1);
+ bytesForEpr1 = toBytes(mementoForEpr1);
+ bytesForEpc1 = toBytes(mementoForEpc1);
+
+ iswf.tearDownSystem();
+
+// logger.debug("*************************************");
+
+ iswf.setUpSystem();
+
+ mementoForEpv1 = fromBytes(bytesForEpv1);
+ mementoForEpr1 = fromBytes(bytesForEpr1);
+ mementoForEpc1 = fromBytes(bytesForEpc1);
+
+ IsisContext.getTransactionManager().startTransaction();
+ }
+
+
+ @After
+ public void tearDown() throws Exception {
+ IsisContext.getTransactionManager().endTransaction();
+ }
+
+ private Memento fromBytes(final byte[] bytes) throws IOException {
+ bais = new ByteArrayInputStream(bytes);
+ DataInputStreamExtended input = new DataInputStreamExtended(bais);
+ final Memento recreate = Memento.recreateFrom(input);
+ return recreate;
+ }
+
+
+ private static byte[] toBytes(final Memento memento) throws IOException {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ DataOutputStreamExtended output = new DataOutputStreamExtended(baos);
+ memento.encodedData(output);
+ return baos.toByteArray();
+ }
+
+
+ @Test
+ public void recreateObject_adaptersAreNotSame() throws Exception {
+
+ recreatedAdapter = mementoForEpv1.recreateObject();
+
+ assertNotSame(originalAdapterForEpv1, recreatedAdapter);
+ }
+
+ @Test
+ public void recreateObject_getOid_areEquals() throws Exception {
+ recreatedAdapter = mementoForEpv1.recreateObject();
+
+ assertEquals(originalAdapterForEpv1.getOid(), recreatedAdapter.getOid());
+ }
+
+ @Test
+ public void recreateObject_getSpecification_isSame() throws Exception {
+ recreatedAdapter = mementoForEpv1.recreateObject();
+
+ final ObjectSpecification specification = originalAdapterForEpv1.getSpecification();
+ final ObjectSpecification recreatedSpecification = recreatedAdapter.getSpecification();
+ assertSame(specification, recreatedSpecification);
+ }
+
+ @Test
+ public void recreateObject_valuePreserved() throws Exception {
+ recreatedAdapter = mementoForEpv1.recreateObject();
+ final SimpleEntity recreatedObject = (SimpleEntity)recreatedAdapter.getObject();
+ assertEquals("Fred", recreatedObject.getName());
+ }
+
+ @Test
+ public void recreateObject_referencePreserved() throws Exception {
+ recreatedAdapter = mementoForEpr1.recreateObject();
+ final ReferencingEntity recreatedObject = (ReferencingEntity)recreatedAdapter.getObject();
+ final SimpleEntity reference1 = recreatedObject.getReference();
+ assertNotNull(reference1);
+
+ assertThat("Fred", equalTo(reference1.getName()));
+ }
+
+ @Test
+ public void recreateObject_homogeneousCollectionPreserved() throws Exception {
+ recreatedAdapter = mementoForEpc1.recreateObject();
+ final ParentEntity recreatedObject = (ParentEntity)recreatedAdapter.getObject();
+ final List<SimpleEntity> homogenousCollection = recreatedObject.getHomogeneousCollection();
+ assertNotNull(homogenousCollection);
+
+ assertThat(homogenousCollection.size(), is(2));
+ assertThat(homogenousCollection.get(0).getName(), is("Fred"));
+ assertThat(homogenousCollection.get(1).getName(), is("Harry"));
+ }
+
+ @Test
+ public void recreateObject_heterogeneousCollectionPreserved() throws Exception {
+ recreatedAdapter = mementoForEpc1.recreateObject();
+ final ParentEntity recreatedObject = (ParentEntity)recreatedAdapter.getObject();
+ final List<BaseEntity> hetrogenousCollection = recreatedObject.getHeterogeneousCollection();
+ assertNotNull(hetrogenousCollection);
+
+ assertThat(hetrogenousCollection.size(), is(2));
+ final SimpleEntity firstObj = (SimpleEntity)hetrogenousCollection.get(0);
+ assertThat(firstObj.getName(), is("Fred"));
+
+ final ReferencingEntity secondObj = (ReferencingEntity)hetrogenousCollection.get(1);
+ final SimpleEntity reference1 = secondObj.getReference();
+ assertThat(reference1.getName(), is("Fred"));
+
+ assertSame(firstObj, reference1);
+ }
+
+ @Test
+ public void recreateObject_whenNull() throws Exception {
+ final Memento memento = new Memento(null);
+ ObjectAdapter returnedAdapter = memento.recreateObject();
+ assertNull(returnedAdapter);
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java
new file mode 100644
index 0000000..3ecc2d1
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.runtime.memento;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
+
+public class MementoTest_data {
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ private ObjectAdapter originalAdapter1, originalAdapter2;
+ private Oid oid1, oid2;
+
+ private Memento memento1, memento2;
+ private Data data1, data2;
+
+ @Before
+ public void setUpSystem() throws Exception {
+ iswf.fixtures.wve1.setStringProperty("Fred");
+
+ originalAdapter1 = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(iswf.fixtures.wve1);
+ oid1 = originalAdapter1.getOid();
+ memento1 = new Memento(originalAdapter1);
+ data1 = memento1.getData();
+
+ iswf.fixtures.wve2.setStringProperty("Harry");
+ iswf.container.persist(iswf.fixtures.wve2);
+
+ originalAdapter2 = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(iswf.fixtures.wve2);
+ oid2 = originalAdapter2.getOid();
+ memento2 = new Memento(originalAdapter2);
+ data2 = memento2.getData();
+ }
+
+
+ @Test
+ public void data_whenNull() throws Exception {
+ final Memento memento = new Memento(null);
+ Data data = memento.getData();
+
+ assertEquals(null, data);
+ }
+
+
+ @Test
+ public void data_getOid_equal() throws Exception {
+ assertEquals(oid1, data1.getOid());
+ }
+
+
+
+ @Test
+ public void data_getClassName() throws Exception {
+ assertEquals(WrapperValuedEntity.class.getName(), data1.getClassName());
+ }
+
+
+ @Test
+ public void data_getEntry_forStringField() throws Exception {
+ assertEquals(ObjectData.class, data1.getClass());
+ final ObjectData objectData = (ObjectData) data1;
+ assertEquals("Fred", objectData.getEntry("stringProperty"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java
new file mode 100644
index 0000000..f86d96d
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.runtime.memento;
+
+import org.jmock.Expectations;
+import org.jmock.auto.Mock;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.commons.encoding.DataOutputStreamExtended;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
+import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
+
+public class MementoTest_encodedData {
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
+
+ private ObjectAdapter rootAdapter;
+
+ private Memento memento;
+
+ @Mock
+ private DataOutputStreamExtended mockOutputImpl;
+
+ @Before
+ public void setUpSystem() throws Exception {
+ iswf.fixtures.smpl1.setName("Fred");
+ iswf.fixtures.smpl2.setName("Harry");
+
+ iswf.fixtures.rfcg1.setReference(iswf.fixtures.smpl1);
+
+ iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl1);
+ iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl2);
+
+ iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.smpl1);
+ iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.rfcg1);
+
+
+ rootAdapter = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(iswf.fixtures.smpl1);
+
+ memento = new Memento(rootAdapter);
+ }
+
+
+ @Test
+ public void encodedData() throws Exception {
+ context.checking(new Expectations() {
+ {
+ one(mockOutputImpl).writeEncodable(memento.getData());
+ }
+ });
+ memento.encodedData(mockOutputImpl);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java
new file mode 100644
index 0000000..ebba602
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class DataNucleusPersistenceMechanismInstallerTest_getName {
+
+ private DataNucleusPersistenceMechanismInstaller installer;
+
+ @Before
+ public void setUp() throws Exception {
+ installer = new DataNucleusPersistenceMechanismInstaller();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void isSet() {
+ assertThat(installer.getName(), is("datanucleus"));
+ }
+
+}
[37/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java
new file mode 100644
index 0000000..ed5977e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java
@@ -0,0 +1,178 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void thenMembers() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+ domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
+
+ // then members (types)
+ DomainObjectMemberRepresentation property;
+ ScalarValueRepresentation scalarRepr;
+
+ property = domainObjectRepr.getProperty("booleanProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is(nullValue()));
+ assertThat(property.getXIsisFormat(), is("boolean"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isBoolean(), is(true));
+ Boolean booleanValue = scalarRepr.asBoolean();
+ assertThat(booleanValue, is(equalTo(Boolean.TRUE)));
+
+ property = domainObjectRepr.getProperty("byteProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("byte"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isIntegralNumber(), is(true));
+ Byte byteValue = scalarRepr.asByte();
+ assertThat(byteValue, is((byte)123));
+
+ property = domainObjectRepr.getProperty("shortProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("short"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isIntegralNumber(), is(true));
+ Short shortValue = scalarRepr.asShort();
+ assertThat(shortValue, is((short)32123));
+
+ property = domainObjectRepr.getProperty("intProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("int"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isInt(), is(true));
+ Integer intValue = scalarRepr.asInt();
+ assertThat(intValue, is(987654321));
+
+ property = domainObjectRepr.getProperty("longProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("long"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isLong(), is(true));
+ Long longValue = scalarRepr.asLong();
+ assertThat(longValue, is(2345678901234567890L));
+
+ property = domainObjectRepr.getProperty("charProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is(nullValue()));
+ assertThat(property.getXIsisFormat(), is("char"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ Character charValue = scalarRepr.asChar();
+ assertThat(charValue, is('a'));
+
+ property = domainObjectRepr.getProperty("floatProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("decimal"));
+ assertThat(property.getXIsisFormat(), is("float"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isNumber(), is(true));
+ assertThat(scalarRepr.isIntegralNumber(), is(false));
+ Float floatValue = scalarRepr.asFloat();
+ assertThat(floatValue, is(12345678901234567890.1234567890F));
+
+ property = domainObjectRepr.getProperty("doubleProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("decimal"));
+ assertThat(property.getXIsisFormat(), is("double"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isDouble(), is(true));
+ Double doubleValue = scalarRepr.asDouble();
+ assertThat(doubleValue, is(12345678901234567890.1234567890));
+
+
+
+ // and then member types have links to details (selected ones inspected only)
+ property = domainObjectRepr.getProperty("booleanProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/booleanProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+
+ property = domainObjectRepr.getProperty("byteProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/byteProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+
+ property = domainObjectRepr.getProperty("shortProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/shortProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+
+ // can navigate using fully qualified form of Rel
+ property = domainObjectRepr.getProperty("booleanProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS.andParam("property", "booleanProperty")),
+ isLink()
+ .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/booleanProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java
new file mode 100644
index 0000000..b7cb2be
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenEntityWithWrapperProperties_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void thenMembers() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "WrapperValuedEntities");
+ domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
+
+
+ // and then members (types)
+ DomainObjectMemberRepresentation property;
+ ScalarValueRepresentation scalarRepr;
+
+ property = domainObjectRepr.getProperty("booleanProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is(nullValue()));
+ assertThat(property.getXIsisFormat(), is("boolean"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isBoolean(), is(true));
+ Boolean booleanValue = scalarRepr.asBoolean();
+ assertThat(booleanValue, is(true));
+
+ property = domainObjectRepr.getProperty("byteProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("byte"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isIntegralNumber(), is(true));
+ Byte byteValue = scalarRepr.asByte();
+ assertThat(byteValue, is((byte)123));
+
+ property = domainObjectRepr.getProperty("shortProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("short"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isIntegralNumber(), is(true));
+ Short shortValue = scalarRepr.asShort();
+ assertThat(shortValue, is((short)32123));
+
+ property = domainObjectRepr.getProperty("integerProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("int"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isInt(), is(true));
+ Integer intValue = scalarRepr.asInt();
+ assertThat(intValue, is(987654321));
+
+ property = domainObjectRepr.getProperty("longProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("int"));
+ assertThat(property.getXIsisFormat(), is("long"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isLong(), is(true));
+ Long longValue = scalarRepr.asLong();
+ assertThat(longValue, is(2345678901234567890L));
+
+ property = domainObjectRepr.getProperty("characterProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is(nullValue()));
+ assertThat(property.getXIsisFormat(), is("char"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ Character charValue = scalarRepr.asChar();
+ assertThat(charValue, is('a'));
+
+ property = domainObjectRepr.getProperty("floatProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("decimal"));
+ assertThat(property.getXIsisFormat(), is("float"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isNumber(), is(true));
+ assertThat(scalarRepr.isIntegralNumber(), is(false));
+ Float floatValue = scalarRepr.asFloat();
+ assertThat(floatValue, is(12345678901234567890.1234567890F));
+
+ property = domainObjectRepr.getProperty("doubleProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("decimal"));
+ assertThat(property.getXIsisFormat(), is("double"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isDouble(), is(true));
+ Double doubleValue = scalarRepr.asDouble();
+ assertThat(doubleValue, is(12345678901234567890.1234567890));
+
+
+ // and then member types have links to details (selected ones inspected only)
+ property = domainObjectRepr.getProperty("booleanProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/WRPV\\/\\d+\\/properties\\/booleanProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+
+ property = domainObjectRepr.getProperty("byteProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/WRPV\\/\\d+\\/properties\\/byteProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+
+ property = domainObjectRepr.getProperty("shortProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/WRPV\\/\\d+\\/properties\\/shortProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java
new file mode 100644
index 0000000..2a7529a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void thenTitle_andExtensions_andLinks() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+ domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
+
+ // then has domain type, instanceId, title
+ assertThat(domainObjectRepr, is(not(nullValue())));
+
+ assertThat(domainObjectRepr.getTitle(), is("Primitive Valued Entity #0")); // running in-memory
+ assertThat(domainObjectRepr.getDomainType(), is("PRMV"));
+ assertThat(domainObjectRepr.getInstanceId(), is(not(nullValue())));
+
+ // and then extensions
+ assertThat(domainObjectRepr.getExtensions().getString("oid"), IsisMatchers.startsWith("PRMV:" + domainObjectRepr.getInstanceId()));
+ assertThat(domainObjectRepr.getExtensions().getBoolean("isService"), is(false));
+ assertThat(domainObjectRepr.getExtensions().getBoolean("isPersistent"), is(true));
+
+ // and then has links
+ final LinkRepresentation self = domainObjectRepr.getSelf();
+ assertThat(self, isLink()
+ .rel(Rel.SELF)
+ .href(matches(".+\\/objects\\/PRMV\\/\\d+"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType()));
+ assertThat(domainObjectRepr.getLinkWithRel(Rel.DESCRIBEDBY),
+ isLink()
+ .href(matches(".+\\/domain-types\\/PRMV"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.DOMAIN_TYPE.getMediaType()));
+ assertThat(domainObjectRepr.getLinkWithRel(Rel.UPDATE),
+ isLink()
+ .href(matches(".+\\/objects\\/PRMV\\/\\d+"))
+ .httpMethod(RestfulHttpMethod.PUT)
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType()));
+ assertThat(domainObjectRepr.getLinkWithRel(Rel.ICON),
+ is(nullValue()));
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java
new file mode 100644
index 0000000..a3faec4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenHasIcon_thenRepresentation_ok_TOFIX {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Ignore("TODO")
+ @Test
+ public void domainObjectWithIcon() throws Exception {
+
+ // given, when
+ final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("OID","xxx");
+
+ // icon
+ final LinkRepresentation selfIcon = domainObjectRepr.getLinkWithRel(Rel.ICON);
+ assertThat(selfIcon, isLink().href(matches(".+" + "/images/" + "null\\.png")).httpMethod(RestfulHttpMethod.GET));
+
+ }
+
+
+ private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
+
+ final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
+ final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
+ return domainObjectRepr;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java
new file mode 100644
index 0000000..ff0358e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenHiddenMembers_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+ @Test
+ public void domainObjectWithHiddenMembers() throws Exception {
+
+ // given, when
+ final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("BSRL","74");
+
+ // property ('invisibleProperty')
+ final JsonRepresentation properties = domainObjectRepr.getProperties();
+ final JsonRepresentation nameProperty = properties.getRepresentation("invisibleProperty");
+ assertThat(nameProperty, is(nullValue()));
+ }
+
+
+ private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
+ final DomainObjectResource domainObjectResource = client.getDomainObjectResource();
+
+ final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
+ final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Response.Status.Family.SUCCESSFUL));
+
+ return domainObjectJsonResp.getEntity();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java
new file mode 100644
index 0000000..78ea63c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenTransient_thenRepresentation_ok_TOFIX {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @SuppressWarnings("unused")
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+
+ @Ignore("to fix")
+ @Test
+ public void domainObjectRepresentationForTransient_hasNoSelf_andHasNoOid() throws Exception {
+
+ // given, when
+ final RestfulRequest request = this.client.createRequest(RestfulHttpMethod.POST, "services/simples/actions/newTransientEntity/invoke");
+ final RestfulResponse<ActionResultRepresentation> response = request.executeT();
+ final ActionResultRepresentation actionResultRepr = response.getEntity();
+ assertThat(actionResultRepr.getResultType(), is(ResultType.DOMAIN_OBJECT));
+ assertThat(actionResultRepr.getResult(), is(not(nullValue())));
+
+ final DomainObjectRepresentation domainObjectRepr = actionResultRepr.getResult().as(DomainObjectRepresentation.class);
+
+ // then
+ final LinkRepresentation self = domainObjectRepr.getSelf();
+ assertThat(self, is(nullValue()));
+
+ assertThat(domainObjectRepr.getOid(), is(nullValue()));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..46bc674
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenViewModel_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+
+ @Ignore("TODO")
+ @Test
+ public void xxx() throws Exception {
+
+ // given, when
+ final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("OID","xxx");
+
+ // property ('name')
+ final JsonRepresentation properties = domainObjectRepr.getProperties();
+ final JsonRepresentation nameProperty = properties.getRepresentation("name");
+ assertThat(nameProperty.getString("disabledReason"), is(not(nullValue())));
+ }
+
+
+
+
+ private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
+ final DomainObjectResource domainObjectResource = client.getDomainObjectResource();
+
+ final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
+ final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
+ return domainObjectRepr;
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java
new file mode 100644
index 0000000..7984a64
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeXRoDomainType;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+public class Get_thenResponseCode_andContentType_andContentLength_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+ final DomainObjectRepresentation objRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
+ final String domainType = objRepr.getDomainType();
+ final String instanceId = objRepr.getInstanceId();
+
+ final Response jaxrsResponse = domainObjectResource.object(domainType,instanceId);
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+
+ assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(greaterThan(6000)));
+
+ final MediaType actualHeader = restfulResponse.getHeader(Header.CONTENT_TYPE);
+ assertThat(actualHeader, hasMediaType(MediaType.APPLICATION_JSON));
+ assertThat(actualHeader, hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_OBJECT));
+ assertThat(actualHeader, hasMediaTypeXRoDomainType("domain-types/PRMV"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java
new file mode 100644
index 0000000..5d39aa9
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.CacheControlMatcherBuilder;
+
+public class Get_thenResponseHeaders_CacheControl_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Test
+ public void givenNotCached_whenUsingResourceProxy() throws Exception {
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = Util.domainObjectJaxrsResponse(client, "PrimitiveValuedEntities");
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+
+ final CacheControl expected = new CacheControl();
+ expected.setNoCache(true);
+ assertThat(restfulResponse.getHeader(Header.CACHE_CONTROL), isCacheControl().withNoCache().build());
+ }
+
+
+ @Ignore("Isis does not define any short-term cached semantics (use @Immutable, or (re)introduce @Cached?)")
+ @Test
+ public void givenShortTermCached_whenUsingResourceProxy() throws Exception {
+
+ }
+
+
+ @Ignore("TODO - Isis does not define any long-term cached semantics (use @Immutable, or (re)introduce @Cached?)")
+ @Test
+ public void givenLongTermCached_whenUsingResourceProxy() throws Exception {
+ }
+
+
+ private CacheControlMatcherBuilder isCacheControl() {
+ return new RestfulMatchers.CacheControlMatcherBuilder();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..fbb88a6
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Get_thenResponseHeaders_eTag_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java
new file mode 100644
index 0000000..1df66bb
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+public class Get_whenDoesntExistOid_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+ link.withHref("http://localhost:39393/objects/PRMV/nonExistent");
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResp = client.follow(link);
+
+ // then
+ then(restfulResp);
+
+ }
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // when
+ final DomainObjectResource objectResource = client.getDomainObjectResource();
+
+ final Response response = objectResource.object("PRMV", "nonExistent");
+ RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(response);
+
+ then(restfulResp);
+
+ }
+
+ private void then(final RestfulResponse<JsonRepresentation> restfulResp) {
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..fa68219
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ request = client.createRequest(RestfulHttpMethod.GET, "/objects/BSRL/74");
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
new file mode 100644
index 0000000..6fcd2cd
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java
new file mode 100644
index 0000000..d950b10
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import javax.ws.rs.core.MediaType;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/74");
+ }
+
+ @Test
+ public void applicationJson_noProfile_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+
+ @Test
+ public void applicationJson_profileVersion_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.DOMAIN_OBJECT.getMediaType());
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+ @Test
+ public void missingHeader_returns200() throws Exception {
+
+ final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
+
+ assertThat(restfulResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java
new file mode 100644
index 0000000..22eb8c5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import javax.ws.rs.core.MediaType;
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_whenInvalid_406 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void applicationJson_profileIncorrect_returns406() throws Exception {
+
+ // given
+ RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64");
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+ @Test
+ public void incorrectMediaType_returnsNotAcceptable() throws Exception {
+
+ // given
+ final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("objects/BSRL/64");
+ clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
+
+ // when
+ final ClientResponse<?> resp = clientRequest.get();
+ final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java
new file mode 100644
index 0000000..2fa7c42
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.errors.ErrorRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private ErrorRepresentation errorRepresentation;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+ final LinkRepresentation deleteLink = link.withMethod(RestfulHttpMethod.POST);
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to object resource is not allowed."));
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java
new file mode 100644
index 0000000..6ce4b38
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_givenDisabled_then_203_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
new file mode 100644
index 0000000..9bdb8b8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
new file mode 100644
index 0000000..9755e95
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java
new file mode 100644
index 0000000..34a9e89
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_givenViewModel_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+ @Ignore
+ @Test
+ public void usingClientFollow() throws Exception {
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java
new file mode 100644
index 0000000..c812638
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Ignore
+ @Test
+ public void usingClientFollow() throws Exception {
+ }
+
+}
[19/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java
deleted file mode 100644
index 96fd0ff..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberModifyTest.java
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import org.junit.Test;
-
-import org.apache.isis.applib.services.wrapper.InvalidException;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Order;
-
-public class MemberModifyTest extends AbstractTest {
-
- @Test
- public void valueModifiedToNonNull() {
- custJsWO.setFirstName("Dick");
-
- assertThat(custJsWO.getFirstName(), equalTo("Dick"));
- }
-
- @Test
- public void valueModifiedToNull() {
- custJsWO.setFirstName(null);
-
- assertThat(custJsWO.getFirstName(), nullValue());
- }
-
- @Test
- public void whenValueModifyCalledRatherThanSetForNonNull() {
- custJsWO.setFirstName("Dick");
- assertThat(custJsDO.modifyFirstNameCalled, is(true));
- }
-
- @Test
- public void whenValueClearCalledRatherThanSetForNull() {
- custJsWO.setFirstName(null);
- assertThat(custJsDO.clearFirstNameCalled, is(true));
- }
-
- @Test
- public void whenAssociationModifyCalledRatherThanSetForNonNull() {
- custJsWO.setCountryOfBirth(countryUsaDO);
- assertThat(custJsDO.modifyCountryOfBirthCalled, is(true));
- }
-
- @Test
- public void whenAssociationClearCalledRatherThanSetForNull() {
- custJsWO.setCountryOfBirth(null);
- assertThat(custJsDO.clearCountryOfBirthCalled, is(true));
- }
-
- @Test
- public void cannotUseAddDirectlyOnCollections() {
- final List<Country> visitedCountries = custJsWO.getVisitedCountries();
- try {
- visitedCountries.add(countryGbrDO);
- fail("UnsupportedOperationException should have been thrown.");
- } catch (final UnsupportedOperationException ex) {
- // expected
- }
- }
-
- @Test
- public void cannotUseRemoveDirectlyOnCollections() {
- final List<Country> visitedCountries = custJsWO.getVisitedCountries();
- try {
- visitedCountries.remove(countryGbrDO);
- fail("UnsupportedOperationException should have been thrown.");
- } catch (final UnsupportedOperationException ex) {
- // expected
- }
- }
-
- @Test
- public void cannotUseClearDirectlyOnCollections() {
- final List<Country> visitedCountries = custJsWO.getVisitedCountries();
- try {
- visitedCountries.clear();
- fail("UnsupportedOperationException should have been thrown.");
- } catch (final UnsupportedOperationException ex) {
- // expected
- }
- }
-
- @Test
- public void sttemptingToAddNullObjectIntoCollectionThrowsException() {
- try {
- custJsWO.addToVisitedCountries(null);
- fail("Exception should have been raised.");
- } catch (final IllegalArgumentException ex) {
- // expected
- }
- }
-
- @Test
- public void removingNonExistentRemoveObjectFromCollectionDoesNothing() {
- assertThat(custJsDO.getVisitedCountries().contains(countryGbrDO), is(false));
-
- custJsWO.removeFromVisitedCountries(countryGbrDO);
- // no exception raised.
- }
-
- @Test
- public void canInvokeAction() {
- final int sizeBefore = custJsWO.getOrders().size();
- final Order orderBefore = custJsWO.getLastOrder();
- custJsWO.placeOrder(product355DO, 3);
- final Order orderAfter = custJsWO.getLastOrder();
-
- final int sizeAfter = custJsWO.getOrders().size();
- assertThat(sizeAfter, is(sizeBefore + 1));
- assertThat(orderAfter, is(not(orderBefore)));
- }
-
- @Test
- public void canInvokeActionIfOptionalValueParameterAndNullArgumentProvided() {
- custJsWO.actionWithOptionalValueParameter(null);
- assertThat(custJsDO.actionWithOptionalValueParameterArgument, nullValue());
- }
-
- @Test
- public void cannotInvokeActionIfMandatoryValueParameterAndNullArgumentProvided() {
- try {
- custJsWO.actionWithMandatoryValueParameter(null);
- fail("InvalidMandatoryException should have been thrown");
- } catch (final InvalidException ex) {
- assertThat(custJsDO.actionWithMandatoryValueParameterArgument, equalTo(Long.MAX_VALUE)); // ie
- }
- }
-
- @Test
- public void canInvokeActionIfOptionalReferenceParameterAndNullArgumentProvided() {
- custJsWO.actionWithOptionalReferenceParameter(null);
- assertThat(custJsDO.actionWithOptionalReferenceParameterArgument, nullValue());
- }
-
- @Test
- public void cannotInvokeActionIfMandatoryReferenceParameterAndNullArgumentProvided() {
- try {
- custJsWO.actionWithMandatoryReferenceParameter(null);
- fail("InvalidMandatoryException should have been thrown");
- } catch (final InvalidException ex) {
- assertThat(custJsDO.actionWithMandatoryReferenceParameterArgument, not(nullValue()));
- }
- }
-
- @Test
- public void canInvokeActionIfOptionalStringParameterAndEmptyStringProvidedAsArgument() {
- custJsWO.actionWithOptionalStringParameter("");
- assertThat(custJsDO.actionWithOptionalStringParameterArgument, equalTo(""));
- }
-
- @Test
- public void cannotInvokeActionIfMandatoryStringParameterAndEmptyStringProvidedAsArgument() {
- try {
- custJsWO.actionWithMandatoryStringParameter("");
- fail("InvalidMandatoryException should have been thrown");
- } catch (final InvalidException ex) {
- assertThat(custJsDO.actionWithMandatoryStringParameterArgument, equalTo("original value")); // ie
- }
- }
-
- @Test
- public void canInvokeActionIfParameterMatchRegularExpression() {
- custJsWO.actionWithRegExStringParameter("6789");
- assertThat(custJsDO.actionWithRegExStringParameterArgument, equalTo("6789"));
- }
-
- @Test
- public void cannotInvokeActionIfParameterDoesNotMatchRegularExpression() {
- try {
- custJsWO.actionWithRegExStringParameter("abcd"); // doesn't match
- // [0-9]{4}
- fail("InvalidRegExException should have been thrown");
- } catch (final InvalidException ex) {
- assertThat(custJsDO.actionWithRegExStringParameterArgument, equalTo("1234")); // ie
- // unchanged
- }
- }
-
- @Test
- public void canInvokeActionIfParameterNoLongerMaximumLength() {
- custJsWO.actionWithMaxLengthStringParameter("abcd");
- assertThat(custJsDO.actionWithMaxLengthStringParameterArgument, equalTo("abcd"));
- }
-
- @Test
- public void cannotInvokeActionIfParameterExceedsMaximumLength() {
- try {
- custJsWO.actionWithMaxLengthStringParameter("abcde");
- fail("InvalidMaxLengthException should have been thrown");
- } catch (final InvalidException ex) {
- assertThat(custJsDO.actionWithMaxLengthStringParameterArgument, equalTo("1234")); // ie
- // unchanged
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java
deleted file mode 100644
index 17a39b0..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/MemberReadTest.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-
-public class MemberReadTest extends AbstractTest {
-
- @Test
- public void value() {
- assertThat(custJsWO.getFirstName(), equalTo("Richard"));
- }
-
- @Test
- public void valueWhenNull() {
- custJsDO.setFirstName(null);
- assertThat(custJsWO.getFirstName(), nullValue());
- }
-
- @Test
- public void association() {
- assertThat(custJsWO.getCountryOfBirth(), equalTo(countryGbrDO));
- }
-
- @Test
- public void associationWhenNull() {
- custJsDO.setCountryOfBirth(null);
- assertThat(custJsWO.getCountryOfBirth(), nullValue());
- }
-
- @Test
- public void collectionContainsWhenDoesAndDoesNot() {
- custJsDO.addToVisitedCountries(countryGbrDO);
- custJsDO.addToVisitedCountries(countryUsaDO);
- final List<Country> visitedCountries = custJsWO.getVisitedCountries();
- assertThat(visitedCountries.contains(countryGbrDO), is(true));
- assertThat(visitedCountries.contains(countryUsaDO), is(true));
- assertThat(visitedCountries.contains(countryAusDO), is(false));
- }
-
- @Test
- public void collectionSizeWhenEmpty() {
- assertThat(custJsWO.getVisitedCountries().size(), is(0));
- }
-
- @Test
- public void collectionSizeWhenNotEmpty() {
- custJsDO.addToVisitedCountries(countryGbrDO);
- custJsDO.addToVisitedCountries(countryUsaDO);
-
- assertThat(custJsWO.getVisitedCountries().size(), is(2));
- }
-
- @Test
- public void isEmptySizeWhenEmpty() {
- assertThat(custJsWO.getVisitedCountries().isEmpty(), is(true));
- }
-
- @Test
- public void isEmptySizeWhenNotEmpty() {
- custJsDO.addToVisitedCountries(countryGbrDO);
- custJsDO.addToVisitedCountries(countryUsaDO);
-
- assertThat(custJsWO.getVisitedCountries().isEmpty(), is(false));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java
deleted file mode 100644
index 36662fa..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import org.junit.Test;
-
-import org.apache.isis.applib.services.wrapper.DisabledException;
-import org.apache.isis.core.metamodel.facets.collections.disabled.fromimmutable.DisabledFacetOnCollectionDerivedFromImmutable;
-import org.apache.isis.core.metamodel.facets.properties.disabled.fromimmutable.DisabledFacetOnPropertyDerivedFromImmutable;
-
-public class ObjectImmutableTest extends AbstractTest {
-
- @Test
- public void settingValueOnImmutableObjectThrowsException() {
- try {
- product355WO.setDescription("Changed");
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnPropertyDerivedFromImmutable.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Description"));
- }
- }
-
- @Test
- public void settingAssociationOnImmutableObjectThrowsException() {
- try {
- product355WO.setPlaceOfManufacture(countryUsaDO);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnPropertyDerivedFromImmutable.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Of Manufacture"));
- }
- }
-
- @Test
- public void addingToCollectionOnImmutableObjectThrowsException() {
- try {
- product355WO.addToSimilarProducts(product850DO);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnCollectionDerivedFromImmutable.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Similar Products"));
- }
- }
-
- @Test
- public void removingFromCollectionOnImmutableObjectThrowsException() {
- product355DO.addToSimilarProducts(product850DO); // TODO: can't setup,
- // throws
- // ObjectPersistenceException
- try {
- product355WO.removeFromSimilarProducts(product850DO);
- fail("Should have thrown exception");
- } catch (final DisabledException ex) {
- assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnCollectionDerivedFromImmutable.class));
- assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Similar Products"));
- }
- }
-
- @Test
- public void canInvokingOnImmutableObject() {
- product355WO.foobar();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java
deleted file mode 100644
index bd1d7db..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
-
-import org.hamcrest.Matchers;
-import org.junit.Test;
-
-import org.apache.isis.applib.services.wrapper.InvalidException;
-import org.apache.isis.applib.services.wrapper.WrapperObject;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-import org.apache.isis.core.metamodel.facets.object.validating.validateobject.method.ValidateObjectFacetMethod;
-
-public class SaveObjectsTest extends AbstractTest {
-
- private WrapperObject asWrapperObject(final Customer proxiedNewCustomer) {
- return (WrapperObject) proxiedNewCustomer;
- }
-
- @Test
- public void invokingSaveThroughProxyMakesTransientObjectPersistent() {
- final Customer newCustomer = getDomainObjectContainer().newTransientInstance(Customer.class);
- assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false));
- final Customer newCustomerVO = getWrapperFactory().wrap(newCustomer);
- newCustomerVO.setCustomerNumber(123);
- newCustomerVO.setFirstNameMandatory("Joe");
- newCustomerVO.setLastName("Smith");
- newCustomerVO.setMandatoryAssociation(countryGbrDO);
- newCustomerVO.setCountryOfBirthMandatory(countryGbrDO);
- newCustomerVO.setMandatoryValue("foo");
- newCustomerVO.setMaxLengthField("abc");
- newCustomerVO.setRegExCaseInsensitiveField("ABCd");
- newCustomerVO.setRegExCaseSensitiveField("abcd");
- final WrapperObject proxyNewCustomer = asWrapperObject(newCustomerVO);
- proxyNewCustomer.save();
- assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(true));
- }
-
- @Test
- public void invokingSaveOnThroughProxyOnAlreadyPersistedObjectJustUpdatesIt() {
- // just to get into valid state
- custJsDO.setCustomerNumber(123);
- custJsDO.setFirstNameMandatory("Joe");
- custJsDO.setLastName("Smith");
- custJsDO.setMandatoryAssociation(countryGbrDO);
- custJsDO.setCountryOfBirthMandatory(countryGbrDO);
- custJsDO.setMandatoryValue("foo");
- custJsDO.setMaxLengthField("abc");
- custJsDO.setRegExCaseInsensitiveField("ABCd");
- custJsDO.setRegExCaseSensitiveField("abcd");
-
- assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
-
- final WrapperObject newCustomerWO = asWrapperObject(custJsWO);
- newCustomerWO.save();
-
- assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
- }
-
- @Test
- public void whenValidateMethodThenCanVetoSave() {
- final Customer newCustomer = getDomainObjectContainer().newTransientInstance(Customer.class);
-
- // just to get into valid state
- newCustomer.setCustomerNumber(123);
- newCustomer.setFirstNameMandatory("Joe");
- newCustomer.setLastName("Smith");
- newCustomer.setCountryOfBirthMandatory(countryGbrDO);
- newCustomer.setMandatoryAssociation(countryGbrDO);
- newCustomer.setMandatoryValue("foo");
- newCustomer.setMaxLengthField("abc");
- newCustomer.setRegExCaseInsensitiveField("ABCd");
- newCustomer.setRegExCaseSensitiveField("abcd");
-
- final Customer newCustomerWO = getWrapperFactory().wrap(newCustomer);
- newCustomer.validate = "No shakes";
-
- final WrapperObject newCustomerWrapper = asWrapperObject(newCustomerWO);
- try {
- assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false));
- newCustomerWrapper.save();
- fail("An InvalidImperativelyException should have been thrown");
- } catch (final InvalidException ex) {
-
- assertThat(ex.getAdvisorClass(), classEqualTo(ValidateObjectFacetMethod.class));
- assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false)); // not
- // saved
- assertThat(ex.getMessage(), Matchers.containsString("No shakes"));
- }
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java
deleted file mode 100644
index 4586751..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Test;
-
-public class TitleTest extends AbstractTest {
-
- @Test
- public void shouldAppendToDocumentor() {
- assertThat(custJsWO.title(), equalTo("Richard Pawson"));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java
deleted file mode 100644
index 492522f..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.instanceOf;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Test;
-
-import org.apache.isis.applib.services.wrapper.WrapperObject;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-
-public class ViewObjectTest extends AbstractTest {
-
- private WrapperObject asWrapperObject() {
- return (WrapperObject) custJsWO;
- }
-
- @Test
- public void canCastViewsToViewObject() {
- @SuppressWarnings("unused")
- final WrapperObject custRpVOAsViewObject = asWrapperObject();
- }
-
- @Test
- public void shouldBeAbleToCreateAView() {
- final Customer custRpVO = getWrapperFactory().wrap(custJsDO);
- assertThat(custRpVO, instanceOf(Customer.class));
- custRpVO.setFirstName("Dick");
-
- assertThat("Dick", equalTo(custRpVO.getFirstName()));
- }
-
- @Test
- public void viewShouldPassesThroughSetterToUnderlyingDomainObject() {
- final Customer custRpVO = getWrapperFactory().wrap(custJsDO);
- custRpVO.setFirstName("Dick");
-
- assertThat("Dick", equalTo(custRpVO.getFirstName()));
- }
-
- @Test
- public void objectIsViewShouldReturnTrueWhenDealingWithView() {
- final Customer custRpVO = getWrapperFactory().wrap(custJsDO);
- assertThat(getWrapperFactory().isWrapper(custRpVO), is(true));
- }
-
- @Test
- public void objectIsViewShouldReturnFalseWhenDealingWithUnderlying() {
- assertThat(getWrapperFactory().isWrapper(custJsDO), is(false));
- }
-
- @Test
- public void collectionInstanceOfViewObjectShouldReturnTrueWhenDealingWithView() {
- custJsDO.addToVisitedCountries(countryGbrDO);
- custJsDO.addToVisitedCountries(countryUsaDO);
- final List<Country> visitedCountries = custJsWO.getVisitedCountries();
- assertThat(visitedCountries instanceof WrapperObject, is(true));
- }
-
- @Test
- public void containsOnViewedCollectionShouldIntercept() {
- custJsDO.addToVisitedCountries(countryGbrDO);
- custJsDO.addToVisitedCountries(countryUsaDO);
- final List<Country> visitedCountries = custJsWO.getVisitedCountries();
- assertThat(visitedCountries.contains(countryGbrDO), is(true));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java
deleted file mode 100644
index 629f986..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.domain;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.Bounded;
-import org.apache.isis.applib.annotation.MaxLength;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.TypicalLength;
-import org.apache.isis.applib.util.TitleBuffer;
-
-@Bounded
-public class Country extends AbstractDomainObject {
-
- // {{ Logger
- @SuppressWarnings("unused")
- private final static Logger LOGGER = LoggerFactory.getLogger(Country.class);
-
- // }}
-
- // {{ Identification Methods
- /**
- * Defines the title that will be displayed on the user interface in order
- * to identity this object.
- */
- public String title() {
- final TitleBuffer t = new TitleBuffer();
- t.append(getName());
- return t.toString();
- }
-
- // }}
-
- // {{ Code
- private String code;
-
- @TypicalLength(3)
- @MaxLength(3)
- public String getCode() {
- return this.code;
- }
-
- public void setCode(final String code) {
- this.code = code;
- }
-
- // }}
-
- // {{ Name
- private String name;
-
- @TypicalLength(50)
- @MaxLength(255)
- public String getName() {
- return this.name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
- // {{ FavouriteHolidayDestination
- private Country favouriteHolidayDestination;
-
- @Optional
- public Country getFavouriteHolidayDestination() {
- return favouriteHolidayDestination;
- }
-
- public void setFavouriteHolidayDestination(final Country favouriteHolidayDestination) {
- this.favouriteHolidayDestination = favouriteHolidayDestination;
- }
-
- // }}
-
- // {{ Colonies
- private List<Country> colonies = new ArrayList<Country>();
-
- public List<Country> getColonies() {
- return this.colonies;
- }
-
- @SuppressWarnings("unused")
- private void setColonies(final List<Country> colonies) {
- this.colonies = colonies;
- }
-
- public void addToColonies(final Country country) {
- getColonies().add(country);
- }
-
- public void removeFromColonies(final Country country) {
- getColonies().remove(country);
- }
-
- public String validateAddToColonies;
-
- public String validateAddToColonies(final Country country) {
- return validateAddToColonies;
- }
-
- public String validateRemoveFromColonies;
-
- public String validateRemoveFromColonies(final Country country) {
- return validateRemoveFromColonies;
- }
-
- public String disableColonies;
-
- public String disableColonies() {
- return this.disableColonies;
- }
-
- public boolean hideColonies;
-
- public boolean hideColonies() {
- return this.hideColonies;
- }
-
- // }}
-
- // {{
- /**
- * An action to invoke
- */
- public void foobar() {
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java
deleted file mode 100644
index fbdf27a..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java
+++ /dev/null
@@ -1,889 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.domain;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.DescribedAs;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.MaxLength;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.RegEx;
-import org.apache.isis.applib.annotation.TypicalLength;
-import org.apache.isis.applib.annotation.When;
-import org.apache.isis.applib.clock.Clock;
-import org.apache.isis.applib.security.UserMemento;
-import org.apache.isis.applib.util.TitleBuffer;
-
-public class Customer extends AbstractDomainObject {
-
- // {{ Identification Methods
- /**
- * Defines the title that will be displayed on the user interface in order
- * to identity this object.
- */
- public String title() {
- final TitleBuffer t = new TitleBuffer();
- t.append(getFirstName()).append(getLastName());
- return t.toString();
- }
- // }}
-
-
- // {{ FirstName
- private String firstName;
-
- @DescribedAs("Given or christian name")
- @TypicalLength(20)
- @MaxLength(100)
- @Optional
- public String getFirstName() {
- return this.firstName;
- }
-
- public void setFirstName(final String firstName) {
- this.firstName = firstName;
- }
-
- public boolean modifyFirstNameCalled = false;
-
- public void modifyFirstName(final String firstName) {
- setFirstName(firstName);
- this.modifyFirstNameCalled = true;
- }
-
- public boolean clearFirstNameCalled = false;
-
- public void clearFirstName() {
- setFirstName(null);
- this.clearFirstNameCalled = true;
- }
-
- public String validateFirstName;
- public String validateFirstNameExpectedArg;
-
- public String validateFirstName(final String firstName) {
- if (validateFirstNameExpectedArg != null && !validateFirstNameExpectedArg.equals(firstName)) {
- return "argument provided by XAT framework was incorrect";
- }
- return validateFirstName;
- }
-
- public String disableFirstName;
-
- public String disableFirstName() {
- return this.disableFirstName;
- }
-
- public boolean hideFirstName;
-
- public boolean hideFirstName() {
- return this.hideFirstName;
- }
-
- // }}
-
-
-
- // {{ FirstNameMandatory
- private String firstNameMandatory;
-
- @DescribedAs("Given or christian name")
- @TypicalLength(20)
- @MaxLength(100)
- public String getFirstNameMandatory() {
- return this.firstNameMandatory;
- }
-
- public void setFirstNameMandatory(final String firstNameMandatory) {
- this.firstNameMandatory = firstNameMandatory;
- }
-
- public boolean modifyFirstNameMandatoryCalled = false;
-
- public void modifyFirstNameMandatory(final String firstNameMandatory) {
- setFirstNameMandatory(firstNameMandatory);
- this.modifyFirstNameMandatoryCalled = true;
- }
-
- public boolean clearFirstNameMandatoryCalled = false;
-
- public void clearFirstNameMandatory() {
- setFirstNameMandatory(null);
- this.clearFirstNameMandatoryCalled = true;
- }
-
- public String validateFirstNameMandatory;
- public String validateFirstNameMandatoryExpectedArg;
-
- public String validateFirstNameMandatory(final String firstNameMandatory) {
- if (validateFirstNameMandatoryExpectedArg != null && !validateFirstNameMandatoryExpectedArg.equals(firstNameMandatory)) {
- return "argument provided by XAT framework was incorrect";
- }
- return validateFirstNameMandatory;
- }
-
- public String disableFirstNameMandatory;
-
- public String disableFirstNameMandatory() {
- return this.disableFirstNameMandatory;
- }
-
- public boolean hideFirstNameMandatory;
-
- public boolean hideFirstNameMandatory() {
- return this.hideFirstNameMandatory;
- }
-
- // }}
-
-
-
-
-
-
- // {{ CountryOfBirth
- private Country countryOfBirth;
-
- @Optional
- public Country getCountryOfBirth() {
- return countryOfBirth;
- }
-
- public void setCountryOfBirth(final Country countryOfBirth) {
- this.countryOfBirth = countryOfBirth;
- }
-
- public boolean modifyCountryOfBirthCalled = false;
-
- public void modifyCountryOfBirth(final Country countryOfBirth) {
- setCountryOfBirth(countryOfBirth);
- this.modifyCountryOfBirthCalled = true;
- }
-
- public boolean clearCountryOfBirthCalled = false;
-
- public void clearCountryOfBirth() {
- setCountryOfBirth(null);
- this.clearCountryOfBirthCalled = true;
- }
-
- public String validateCountryOfBirth;
-
- public String validateCountryOfBirth(final Country countryOfBirth) {
- return validateCountryOfBirth;
- }
-
- public String disableCountryOfBirth;
-
- public String disableCountryOfBirth() {
- return this.disableCountryOfBirth;
- }
-
- public boolean hideCountryOfBirth;
-
- public boolean hideCountryOfBirth() {
- return this.hideCountryOfBirth;
- }
-
- // }}
-
-
-
-
- // {{ CountryOfBirthMandatory
- private Country countryOfBirthMandatory;
-
- public Country getCountryOfBirthMandatory() {
- return countryOfBirthMandatory;
- }
-
- public void setCountryOfBirthMandatory(final Country countryOfBirthMandatory) {
- this.countryOfBirthMandatory = countryOfBirthMandatory;
- }
-
- public boolean modifyCountryOfBirthMandatoryCalled = false;
-
- public void modifyCountryOfBirthMandatory(final Country countryOfBirthMandatory) {
- setCountryOfBirthMandatory(countryOfBirthMandatory);
- this.modifyCountryOfBirthMandatoryCalled = true;
- }
-
- public boolean clearCountryOfBirthMandatoryCalled = false;
-
- public void clearCountryOfBirthMandatory() {
- setCountryOfBirthMandatory(null);
- this.clearCountryOfBirthMandatoryCalled = true;
- }
-
- public String validateCountryOfBirthMandatory;
-
- public String validateCountryOfBirthMandatory(final Country countryOfBirthMandatory) {
- return validateCountryOfBirthMandatory;
- }
-
- public String disableCountryOfBirthMandatory;
-
- public String disableCountryOfBirthMandatory() {
- return this.disableCountryOfBirthMandatory;
- }
-
- public boolean hideCountryOfBirthMandatory;
-
- public boolean hideCountryOfBirthMandatory() {
- return this.hideCountryOfBirthMandatory;
- }
-
- // }}
-
-
-
-
-
-
- // {{ VisitedCountries
- private List<Country> visitedCountries = new ArrayList<Country>();
-
- public List<Country> getVisitedCountries() {
- return this.visitedCountries;
- }
-
- @SuppressWarnings("unused")
- private void setVisitedCountries(final List<Country> visitedCountries) {
- this.visitedCountries = visitedCountries;
- }
-
- public void addToVisitedCountries(final Country country) {
- getVisitedCountries().add(country);
- }
-
- public void removeFromVisitedCountries(final Country country) {
- getVisitedCountries().remove(country);
- }
-
- public String validateAddToVisitedCountries;
-
- public String validateAddToVisitedCountries(final Country country) {
- return validateAddToVisitedCountries;
- }
-
- public String validateRemoveFromVisitedCountries;
-
- public String validateRemoveFromVisitedCountries(final Country country) {
- return validateRemoveFromVisitedCountries;
- }
-
- public String disableVisitedCountries;
-
- public String disableVisitedCountries() {
- return this.disableVisitedCountries;
- }
-
- public boolean hideVisitedCountries;
-
- public boolean hideVisitedCountries() {
- return this.hideVisitedCountries;
- }
-
- // }}
-
- // {{ AlwaysDisabledValue
- private String alwaysDisabledValue;
-
- @Disabled(when = When.ALWAYS)
- public String getAlwaysDisabledValue() {
- return this.alwaysDisabledValue;
- }
-
- public void setAlwaysDisabledValue(final String alwaysDisabled) {
- this.alwaysDisabledValue = alwaysDisabled;
- }
-
- // }}
-
- // {{ AlwaysDisabledAssociation
- private Country alwaysDisabledAssociation;
-
- @Disabled(when = When.ALWAYS)
- public Country getAlwaysDisabledAssociation() {
- return this.alwaysDisabledAssociation;
- }
-
- public void setAlwaysDisabledAssociation(final Country alwaysDisabled) {
- this.alwaysDisabledAssociation = alwaysDisabled;
- }
-
- // }}
-
- // {{ AlwaysDisabledCollection
- private List<Country> alwaysDisabledCollection = new ArrayList<Country>();
-
- @Disabled(when = When.ALWAYS)
- public List<Country> getAlwaysDisabledCollection() {
- return this.alwaysDisabledCollection;
- }
-
- @SuppressWarnings("unused")
- private void setAlwaysDisabledCollection(final List<Country> alwaysDisabledCollection) {
- this.alwaysDisabledCollection = alwaysDisabledCollection;
- }
-
- public void addToAlwaysDisabledCollection(final Country country) {
- getAlwaysDisabledCollection().add(country);
- }
-
- public void removeFromAlwaysDisabledCollection(final Country country) {
- getAlwaysDisabledCollection().remove(country);
- }
-
- // }}
-
- // {{ AlwaysDisabledAction
- @Disabled(when = When.ALWAYS)
- public void alwaysDisabledAction() {
- }
-
- // }}
-
- // {{ SessionDisabledValue
- private String sessionDisabledValue;
-
- public String getSessionDisabledValue() {
- return this.sessionDisabledValue;
- }
-
- public void setSessionDisabledValue(final String sessionDisabled) {
- this.sessionDisabledValue = sessionDisabled;
- }
-
- public static String disableSessionDisabledValue(final UserMemento user) {
- return "disabled for this user";
- }
-
- // }}
-
- // {{ SessionDisabledAssociation
- private Country sessionDisabledAssociation;
-
- public Country getSessionDisabledAssociation() {
- return this.sessionDisabledAssociation;
- }
-
- public void setSessionDisabledAssociation(final Country sessionDisabled) {
- this.sessionDisabledAssociation = sessionDisabled;
- }
-
- public static String disableSessionDisabledAssociation(final UserMemento user) {
- return "disabled for this user";
- }
-
- // }}
-
- // {{ SessionDisabledCollection
- private List<Country> sessionDisabledCollection = new ArrayList<Country>();
-
- public List<Country> getSessionDisabledCollection() {
- return this.sessionDisabledCollection;
- }
-
- @SuppressWarnings("unused")
- private void setSessionDisabledCollection(final List<Country> sessionDisabledCollection) {
- this.sessionDisabledCollection = sessionDisabledCollection;
- }
-
- public void addToSessionDisabledCollection(final Country country) {
- getSessionDisabledCollection().add(country);
- }
-
- public void removeFromSessionDisabledCollection(final Country country) {
- getSessionDisabledCollection().remove(country);
- }
-
- public static String disableSessionDisabledCollection(final UserMemento user) {
- return "disabled for this user";
- }
-
- // }}
-
- // {{ SessionDisabledAction
- public void sessionDisabledAction() {
- }
-
- public static String disableSessionDisabledAction(final UserMemento user) {
- return "disabled for this user";
- }
-
- // }}
-
- // {{ AlwaysHiddenValue
- private String alwaysHiddenValue;
-
- @Hidden(when=When.ALWAYS)
- public String getAlwaysHiddenValue() {
- return this.alwaysHiddenValue;
- }
-
- public void setAlwaysHiddenValue(final String alwaysHidden) {
- this.alwaysHiddenValue = alwaysHidden;
- }
-
- // }}
-
- // {{ AlwaysHiddenAssociation
- private Country alwaysHiddenAssociation;
-
- @Hidden(when=When.ALWAYS)
- public Country getAlwaysHiddenAssociation() {
- return this.alwaysHiddenAssociation;
- }
-
- public void setAlwaysHiddenAssociation(final Country alwaysHidden) {
- this.alwaysHiddenAssociation = alwaysHidden;
- }
-
- // }}
-
- // {{ AlwaysHiddenCollection
- private List<Country> alwaysHiddenCollection = new ArrayList<Country>();
-
- @Hidden(when=When.ALWAYS)
- public List<Country> getAlwaysHiddenCollection() {
- return this.alwaysHiddenCollection;
- }
-
- @SuppressWarnings("unused")
- private void setAlwaysHiddenCollection(final List<Country> alwaysHiddenCollection) {
- this.alwaysHiddenCollection = alwaysHiddenCollection;
- }
-
- public void addToAlwaysHiddenCollection(final Country country) {
- getAlwaysHiddenCollection().add(country);
- }
-
- public void removeFromAlwaysHiddenCollection(final Country country) {
- getAlwaysHiddenCollection().remove(country);
- }
-
- // }}
-
- // {{ SessionDisabledAction
- @Hidden(when=When.ALWAYS)
- public void alwaysHiddenAction() {
- }
-
- // }}
-
- // {{ SessionHiddenValue
- private String sessionHiddenValue;
-
- public String getSessionHiddenValue() {
- return this.sessionHiddenValue;
- }
-
- public void setSessionHiddenValue(final String sessionHidden) {
- this.sessionHiddenValue = sessionHidden;
- }
-
- public static boolean hideSessionHiddenValue(final UserMemento user) {
- return true;
- }
-
- // }}
-
- // {{ SessionHiddenAssociation
- private Country sessionHiddenAssociation;
-
- public Country getSessionHiddenAssociation() {
- return this.sessionHiddenAssociation;
- }
-
- public void setSessionHiddenAssociation(final Country sessionHidden) {
- this.sessionHiddenAssociation = sessionHidden;
- }
-
- public static boolean hideSessionHiddenAssociation(final UserMemento user) {
- return true;
- }
-
- // }}
-
- // {{ SessionHiddenCollection
- private List<Country> sessionHiddenCollection = new ArrayList<Country>();
-
- public List<Country> getSessionHiddenCollection() {
- return this.sessionHiddenCollection;
- }
-
- @SuppressWarnings("unused")
- private void setSessionHiddenCollection(final List<Country> sessionHiddenCollection) {
- this.sessionHiddenCollection = sessionHiddenCollection;
- }
-
- public void addToSessionHiddenCollection(final Country country) {
- getSessionHiddenCollection().add(country);
- }
-
- public void removeFromSessionHiddenCollection(final Country country) {
- getSessionHiddenCollection().remove(country);
- }
-
- public static boolean hideSessionHiddenCollection(final UserMemento user) {
- return true;
- }
-
- // }}
-
- // {{ SessionHiddenAction
- public void sessionHiddenAction() {
- }
-
- public static boolean hideSessionHiddenAction(final UserMemento user) {
- return true;
- }
-
- // }}
-
- // {{ Mandatory
- private String mandatoryValue;
-
- public String getMandatoryValue() {
- return this.mandatoryValue;
- }
-
- public void setMandatoryValue(final String mandatory) {
- this.mandatoryValue = mandatory;
- }
-
- // }}
-
- // {{ Mandatory
- private Country mandatoryAssociation;
-
- public Country getMandatoryAssociation() {
- return this.mandatoryAssociation;
- }
-
- public void setMandatoryAssociation(final Country mandatory) {
- this.mandatoryAssociation = mandatory;
- }
-
- // }}
-
- // {{ Optional
- private String optionalValue;
-
- @Optional
- public String getOptionalValue() {
- return this.optionalValue;
- }
-
- public void setOptionalValue(final String optional) {
- this.optionalValue = optional;
- }
-
- // }}
-
- // {{ OptionalAssociation
- private Country optionalAssociation;
-
- @Optional
- public Country getOptionalAssociation() {
- return this.optionalAssociation;
- }
-
- public void setOptionalAssociation(final Country optional) {
- this.optionalAssociation = optional;
- }
-
- // }}
-
- // {{ OptionalCollection
- private List<Country> optionalCollection = new ArrayList<Country>();
-
- @Optional
- public List<Country> getOptionalCollection() {
- return this.optionalCollection;
- }
-
- @SuppressWarnings("unused")
- private void setOptionalCollection(final List<Country> optionalCollection) {
- this.optionalCollection = optionalCollection;
- }
-
- public void addToOptionalCollection(final Country country) {
- getOptionalCollection().add(country);
- }
-
- public void removeFromOptionalCollection(final Country country) {
- getOptionalCollection().remove(country);
- }
-
- // }}
-
- // {{ MaxLength
- private String maxLengthField;
-
- @MaxLength(10)
- public String getMaxLengthField() {
- return this.maxLengthField;
- }
-
- public void setMaxLengthField(final String maxLength) {
- this.maxLengthField = maxLength;
- }
-
- // }}
-
- // {{ RegExCaseSensitive
- private String regExCaseSensitiveField;
-
- @RegEx(validation = "abc.+", caseSensitive = true)
- public String getRegExCaseSensitiveField() {
- return this.regExCaseSensitiveField;
- }
-
- public void setRegExCaseSensitiveField(final String regEx) {
- this.regExCaseSensitiveField = regEx;
- }
-
- // }}
-
- // {{ RegExCaseInsensitive
- private String regExCaseInsensitiveField;
-
- @RegEx(validation = "abc.+", caseSensitive = false)
- public String getRegExCaseInsensitiveField() {
- return this.regExCaseInsensitiveField;
- }
-
- public void setRegExCaseInsensitiveField(final String regExCaseInsensitive) {
- this.regExCaseInsensitiveField = regExCaseInsensitive;
- }
-
- // }}
-
- // {{ LastName
- private String lastName;
-
- @DescribedAs("Family name or surname")
- @MaxLength(100)
- @TypicalLength(30)
- @Named("Surname")
- public String getLastName() {
- return this.lastName;
- }
-
- public void setLastName(final String lastName) {
- this.lastName = lastName;
- }
-
- public void modifyLastName(final String lastName) {
- this.lastName = lastName;
- }
-
- // }}
-
- // {{ CustomerNumber
- private Integer customerNumber;
-
- @Disabled(when = When.ONCE_PERSISTED)
- public Integer getCustomerNumber() {
- return this.customerNumber;
- }
-
- public void setCustomerNumber(final Integer customerNumber) {
- this.customerNumber = customerNumber;
- }
-
- public String validateCustomerNumber(final Integer customerNumber) {
- return null;
- }
-
- // }}
-
- // {{ Orders
- private List<Order> orders = new ArrayList<Order>();
-
- public List<Order> getOrders() {
- return this.orders;
- }
-
- @SuppressWarnings("unused")
- private void setOrders(final List<Order> orders) {
- this.orders = orders;
- }
-
- public void addToOrders(final Order order) {
- getOrders().add(order);
- }
-
- public void removeFromOrders(final Order order) {
- getOrders().remove(order);
- }
-
- // }}
-
- // {{ LastOrder
- private Order lastOrder;
-
- @Disabled
- public Order getLastOrder() {
- return this.lastOrder;
- }
-
- public void setLastOrder(final Order lastOrder) {
- this.lastOrder = lastOrder;
- }
-
- public void modifyLastOrder(final Order lastOrder) {
- setLastOrder(lastOrder);
- }
-
- public void clearLastOrder() {
- setLastOrder(null);
- }
-
- // }}
-
- // {{ PlaceOrder
- public void placeOrder(final Product p, @Named("Quantity") final Integer quantity) {
- final Order order = getContainer().newTransientInstance(Order.class);
- order.modifyCustomer(this);
- order.modifyProduct(p);
- order.setOrderDate(new Date(Clock.getTime()));
- order.setQuantity(quantity);
- addToOrders(order);
- modifyLastOrder(order);
- order.makePersistent();
- }
-
- public String validatePlaceOrder;
-
- public String validatePlaceOrder(final Product p, final Integer quantity) {
- return validatePlaceOrder;
- }
-
- public String disablePlaceOrder;
-
- public String disablePlaceOrder(final Product p, final Integer quantity) {
- return disablePlaceOrder;
- }
-
- public boolean hidePlaceOrder;
-
- public boolean hidePlaceOrder() {
- return hidePlaceOrder;
- }
-
- public Object[] defaultPlaceOrder() {
- Product lastProductOrdered = null;
- if (getLastOrder() != null) {
- lastProductOrdered = getLastOrder().getProduct();
- }
- return new Object[] { lastProductOrdered, new Integer(1) };
- }
-
- // }}
-
- // {{ MoreOrders
- private List<Order> moreOrders = new ArrayList<Order>();
-
- @Disabled
- public List<Order> getMoreOrders() {
- return this.moreOrders;
- }
-
- @SuppressWarnings("unused")
- private void setMoreOrders(final List<Order> moreOrders) {
- this.moreOrders = moreOrders;
- }
-
- public void addToMoreOrders(final Order order) {
- getMoreOrders().add(order);
- }
-
- public void removeFromMoreOrders(final Order order) {
- getMoreOrders().remove(order);
- }
-
- // }}
-
- public String validate;
- public boolean validateCalled = false;
-
- public String validate() {
- validateCalled = true;
- return validate;
- }
-
- public Long actionWithOptionalValueParameterArgument = Long.MAX_VALUE;
-
- public void actionWithOptionalValueParameter(@Optional @Named("Amount") final Long val) {
- actionWithOptionalValueParameterArgument = val;
- }
-
- public Long actionWithMandatoryValueParameterArgument = Long.MAX_VALUE;
-
- public void actionWithMandatoryValueParameter(@Named("Amount") final Long val) {
- actionWithMandatoryValueParameterArgument = val;
- }
-
- public Product actionWithMandatoryReferenceParameterArgument = new Product();
-
- public void actionWithMandatoryReferenceParameter(final Product product) {
- actionWithMandatoryReferenceParameterArgument = product;
- }
-
- public Product actionWithOptionalReferenceParameterArgument = new Product();
-
- public void actionWithOptionalReferenceParameter(@Optional final Product product) {
- actionWithOptionalReferenceParameterArgument = product;
- }
-
- public String actionWithOptionalStringParameterArgument = "original value";
-
- public void actionWithOptionalStringParameter(@Optional @Named("Amount") final String val) {
- actionWithOptionalStringParameterArgument = val;
- }
-
- public String actionWithMandatoryStringParameterArgument = "original value";
-
- public void actionWithMandatoryStringParameter(@Named("Amount") final String val) {
- actionWithMandatoryStringParameterArgument = val;
- }
-
- public String actionWithMaxLengthStringParameterArgument = "1234";
-
- public void actionWithMaxLengthStringParameter(@Named("Amount") @MaxLength(4) final String val) {
- actionWithMaxLengthStringParameterArgument = val;
- }
-
- public String actionWithRegExStringParameterArgument = "1234";
-
- public void actionWithRegExStringParameter(@Named("Amount") @RegEx(validation = "[0-9]{4}") final String val) {
- actionWithRegExStringParameterArgument = val;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java
deleted file mode 100644
index 2408a43..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.domain;
-
-import java.util.Date;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.util.TitleBuffer;
-
-public class Order extends AbstractDomainObject {
-
- // use ctrl+space to bring up the NO templates.
- // if you do not wish to subclass AbstractDomainObject,
- // then use the "injc - Inject Container" template.
-
- // also, use CoffeeBytes code folding with
- // user-defined regions of {{ and }}
-
- // {{ Logger
- @SuppressWarnings("unused")
- private final static Logger LOGGER = LoggerFactory.getLogger(Order.class);
-
- // }}
-
- // {{ Identification Methods
- /**
- * Defines the title that will be displayed on the user interface in order
- * to identity this object.
- */
- public String title() {
- final TitleBuffer t = new TitleBuffer();
- // null guard because NOF may call title while still setting
- // up the object
- final Product product = getProduct();
- if (product != null) {
- t.append(product.getCode());
- } else {
- t.append("???");
- }
- t.append("x", getQuantity());
- return t.toString();
- }
-
- // }}
-
- // {{ OrderDate
- private Date orderDate;
-
- @Disabled
- public Date getOrderDate() {
- return this.orderDate;
- }
-
- public void setOrderDate(final Date orderDate) {
- this.orderDate = orderDate;
- }
-
- // }}
-
- // {{ Quantity
- private Integer quantity;
-
- public Integer getQuantity() {
- return this.quantity;
- }
-
- public void setQuantity(final Integer quantity) {
- this.quantity = quantity;
- }
-
- public String validateQuantity(final Integer quantity) {
- return quantity.intValue() <= 0 ? "Quantity must be a positive value" : null;
- }
-
- public String disableQuantity() {
- return isPersistent() ? "Already saved" : null;
- }
-
- public Integer defaultQuantity() {
- return new Integer(1);
- }
-
- // }}
-
- // {{ Customer
- private Customer customer;
-
- @Disabled
- public Customer getCustomer() {
- return this.customer;
- }
-
- public void setCustomer(final Customer customer) {
- this.customer = customer;
- }
-
- public void modifyCustomer(final Customer customer) {
- setCustomer(customer);
- }
-
- public void clearCustomer() {
- setCustomer(null);
- }
-
- // }}
-
- // {{ Product
- private Product product;
-
- @Disabled
- public Product getProduct() {
- return this.product;
- }
-
- public void setProduct(final Product product) {
- this.product = product;
- }
-
- /**
- * Capture price from product at time the order is taken.
- *
- * @param product
- */
- public void modifyProduct(final Product product) {
- setProduct(product);
- setPrice(product.getPrice());
- }
-
- /**
- * Never called.
- *
- * @param product
- */
- public void clearProduct() {
- setProduct(null);
- }
-
- // }}
-
- // {{ Price
- private Double price;
-
- @Disabled
- public Double getPrice() {
- return this.price;
- }
-
- public void setPrice(final Double price) {
- this.price = price;
- }
-
- // }}
-
- // {{ makePersistent
- /**
- * Raise visibility so can be invoked by other classes.
- */
- @Override
- public void makePersistent() {
- persist(this);
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java
deleted file mode 100644
index 39a0fe7..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java
+++ /dev/null
@@ -1,186 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.domain;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.Immutable;
-import org.apache.isis.applib.annotation.MaxLength;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.TypicalLength;
-import org.apache.isis.applib.annotation.When;
-import org.apache.isis.applib.util.TitleBuffer;
-
-@Immutable
-public class Product extends AbstractDomainObject {
-
- // use ctrl+space to bring up the NO templates.
- // if you do not wish to subclass AbstractDomainObject,
- // then use the "injc - Inject Container" template.
-
- // also, use CoffeeBytes code folding with
- // user-defined regions of {{ and }}
-
- // {{ Logger
- @SuppressWarnings("unused")
- private final static Logger LOGGER = LoggerFactory.getLogger(Product.class);
-
- // }}
-
- // {{ Identification Methods
- /**
- * Defines the title that will be displayed on the user interface in order
- * to identity this object.
- */
- public String title() {
- final TitleBuffer t = new TitleBuffer();
- t.append(getCode());
- t.append(":", getDescription());
- return t.toString();
- }
-
- // }}
-
- // {{ Code
- private String code;
-
- @TypicalLength(9)
- @MaxLength(9)
- @Disabled(when = When.ONCE_PERSISTED)
- public String getCode() {
- return this.code;
- }
-
- public void setCode(final String code) {
- this.code = code;
- }
-
- // }}
-
- // {{ Description
- private String description;
-
- @TypicalLength(50)
- @MaxLength(255)
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(final String description) {
- this.description = description;
- }
-
- // }}
-
- // {{ PlaceOfManufacture
- private Country placeOfManufacture;
-
- @Optional
- public Country getPlaceOfManufacture() {
- return placeOfManufacture;
- }
-
- public void setPlaceOfManufacture(final Country placeOfManufacture) {
- this.placeOfManufacture = placeOfManufacture;
- }
-
- // }}
-
- // {{ Price
- private Double price;
-
- public Double getPrice() {
- return this.price;
- }
-
- public void setPrice(final Double price) {
- this.price = price;
- }
-
- public String validatePrice(final Double price) {
- if (price.doubleValue() <= 0) {
- return "Price must be positive";
- }
- return null;
- }
-
- // }}
-
- // {{ SimilarProducts
- private List<Product> similarProducts = new ArrayList<Product>();
-
- public List<Product> getSimilarProducts() {
- return this.similarProducts;
- }
-
- @SuppressWarnings("unused")
- private void setSimilarProducts(final List<Product> similarProducts) {
- this.similarProducts = similarProducts;
- }
-
- public void addToSimilarProducts(final Product country) {
- getSimilarProducts().add(country);
- }
-
- public void removeFromSimilarProducts(final Product country) {
- getSimilarProducts().remove(country);
- }
-
- public String validateAddToSimilarProducts;
-
- public String validateAddToSimilarProducts(final Product country) {
- return validateAddToSimilarProducts;
- }
-
- public String validateRemoveFromSimilarProducts;
-
- public String validateRemoveFromSimilarProducts(final Product country) {
- return validateRemoveFromSimilarProducts;
- }
-
- public String disableSimilarProducts;
-
- public String disableSimilarProducts() {
- return this.disableSimilarProducts;
- }
-
- public boolean hideSimilarProducts;
-
- public boolean hideSimilarProducts() {
- return this.hideSimilarProducts;
- }
-
- // }}
-
- // {{
- /**
- * An action to invoke
- */
- public void foobar() {
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java
deleted file mode 100644
index b681bdc..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.CountryRepository;
-
-public class CountriesFixture extends AbstractFixture {
-
- // {{ Logger
- private final static Logger LOGGER = LoggerFactory.getLogger(CountriesFixture.class);
-
- public Logger getLOGGER() {
- return LOGGER;
- }
-
- // }}
-
- @Override
- public void install() {
- getLOGGER().debug("installing");
- getCountryRepository().newCountry("AUS", "Australia");
- getCountryRepository().newCountry("GBR", "United Kingdom of Great Britain & N. Ireland");
- getCountryRepository().newCountry("USA", "United States of America");
- }
-
- // {{ Injected: CountryRepository
- private CountryRepository countryRepository;
-
- /**
- * This field is not persisted, nor displayed to the user.
- */
- protected CountryRepository getCountryRepository() {
- return this.countryRepository;
- }
-
- /**
- * Injected by the application container.
- */
- public void setCountryRepository(final CountryRepository countryRepository) {
- this.countryRepository = countryRepository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java
deleted file mode 100644
index caf2f1e..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Product;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.CustomerRepository;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.ProductRepository;
-
-public class CustomerOrdersFixture extends AbstractFixture {
-
- // use ctrl+space to bring up the NO templates.
-
- // also, use CoffeeBytes code folding with
- // user-defined regions of {{ and }}
-
- // {{ Logger
- private final static Logger LOGGER = LoggerFactory.getLogger(CustomerOrdersFixture.class);
-
- public Logger getLOGGER() {
- return LOGGER;
- }
-
- // }}
-
- @Override
- public void install() {
- getLOGGER().debug("installing");
- final Customer richard = getCustomerRepository().findByName("Pawson");
- final Product foldingTable = getProductRepository().findByCode("820-72721");
- final Product foldingChair = getProductRepository().findByCode("820-72725");
- final Product waspCatcher = getProductRepository().findByCode("850-18003");
- final Product coolbox = getProductRepository().findByCode("845-01020");
-
- setDate(2007, 4, 11);
- setTime(10, 15);
- richard.placeOrder(foldingTable, 1);
- setDate(2007, 4, 12);
- setTime(9, 35);
- richard.placeOrder(foldingChair, 6);
- setDate(2007, 4, 13);
- setTime(14, 20);
- richard.placeOrder(waspCatcher, 1);
- setDate(2007, 4, 14);
- setTime(11, 10);
- richard.placeOrder(coolbox, 1);
- }
-
- // {{ Injected: CustomerRepository
- private CustomerRepository customerRepository;
-
- /**
- * This field is not persisted, nor displayed to the user.
- */
- protected CustomerRepository getCustomerRepository() {
- return this.customerRepository;
- }
-
- /**
- * Injected by the application container.
- */
- public void setCustomerRepository(final CustomerRepository customerRepository) {
- this.customerRepository = customerRepository;
- }
-
- // }}
-
- // {{ Injected: ProductRepository
- private ProductRepository productRepository;
-
- /**
- * This field is not persisted, nor displayed to the user.
- */
- protected ProductRepository getProductRepository() {
- return this.productRepository;
- }
-
- /**
- * Injected by the application container.
- */
- public void setProductRepository(final ProductRepository productRepository) {
- this.productRepository = productRepository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java
deleted file mode 100644
index b3af720..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.CountryRepository;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.CustomerRepository;
-
-public class CustomersFixture extends AbstractFixture {
-
- // {{ Logger
- private final static Logger LOGGER = LoggerFactory.getLogger(CustomersFixture.class);
-
- public Logger getLOGGER() {
- return LOGGER;
- }
-
- // }}
-
- @Override
- public void install() {
- getLOGGER().debug("installing");
- final Country countryGBR = getCountryRepository().findByCode("GBR");
- getCustomerRepository().newCustomer("Richard", "Pawson", 1, countryGBR);
- getCustomerRepository().newCustomer("Robert", "Matthews", 2, countryGBR);
- getCustomerRepository().newCustomer("Dan", "Haywood", 3, countryGBR);
- getCustomerRepository().newCustomer("Stef", "Cascarini", 4, countryGBR);
- getCustomerRepository().newCustomer("Dave", "Slaughter", 5, countryGBR);
- }
-
- // {{ Injected: CustomerRepository
- private CustomerRepository customerRepository;
-
- /**
- * This field is not persisted, nor displayed to the user.
- */
- protected CustomerRepository getCustomerRepository() {
- return this.customerRepository;
- }
-
- /**
- * Injected by the application container.
- */
- public void setCustomerRepository(final CustomerRepository customerRepository) {
- this.customerRepository = customerRepository;
- }
-
- // }}
-
- // {{ Injected: CountryRepository
- private CountryRepository countryRepository;
-
- /**
- * This field is not persisted, nor displayed to the user.
- */
- protected CountryRepository getCountryRepository() {
- return this.countryRepository;
- }
-
- /**
- * Injected by the application container.
- */
- public void setCountryRepository(final CountryRepository countryRepository) {
- this.countryRepository = countryRepository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java
deleted file mode 100644
index 76bf757..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
-
-import org.apache.isis.applib.fixtures.LogonFixture;
-
-public class JoeBloggsFixture extends LogonFixture {
-
- public JoeBloggsFixture() {
- super("jbloggs");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java
deleted file mode 100644
index 06b846d..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.integtestsupport.legacy.sample.service.ProductRepository;
-
-public class ProductsFixture extends AbstractFixture {
-
- // use ctrl+space to bring up the NO templates.
-
- // also, use CoffeeBytes code folding with
- // user-defined regions of {{ and }}
-
- // {{ Logger
- private final static Logger LOGGER = LoggerFactory.getLogger(ProductsFixture.class);
-
- public Logger getLOGGER() {
- return LOGGER;
- }
-
- // }}
-
- @Override
- public void install() {
- getLOGGER().debug("installing");
- getProductRepository().newProduct("355-40311", "Weekend camping pack", 5000);
- getProductRepository().newProduct("850-18003", "Stripy Wasp Catcher", 695);
- getProductRepository().newProduct("845-06203", "Combi Backpack Hamper", 5900);
- getProductRepository().newProduct("820-72721", "Folding Table", 4000);
- getProductRepository().newProduct("820-72725", "Folding Chair", 2500);
- getProductRepository().newProduct("845-01020", "Isotherm Cool Box", 2500);
- }
-
- // {{ Injected: ProductRepository
- private ProductRepository productRepository;
-
- /**
- * This field is not persisted, nor displayed to the user.
- */
- protected ProductRepository getProductRepository() {
- return this.productRepository;
- }
-
- /**
- * Injected by the application container.
- */
- public void setProductRepository(final ProductRepository productRepository) {
- this.productRepository = productRepository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java
deleted file mode 100644
index e0e88e5..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.service;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-
-@Named("Countries")
-public class CountryRepository extends AbstractFactoryAndRepository {
-
- // {{ Logger
- @SuppressWarnings("unused")
- private final static Logger LOGGER = LoggerFactory.getLogger(CountryRepository.class);
-
- // }}
-
- /**
- * Lists all countries in the repository.
- */
- public List<Country> showAll() {
- return allInstances(Country.class);
- }
-
- // {{ findByCode
- /**
- * Returns the Country with given code
- */
- public Country findByCode(@Named("Code") final String code) {
- return firstMatch(Country.class, new Filter<Country>() {
- @Override
- public boolean accept(final Country country) {
- return code.equals(country.getCode());
- }
- });
- }
-
- // }}
-
- /**
- * Creates a new countryGBR.
- *
- * <p>
- * For use by fixtures only.
- *
- * @return
- */
- @Hidden
- public Country newCountry(final String code, final String name) {
- final Country country = newTransientInstance(Country.class);
- country.setCode(code);
- country.setName(name);
- persist(country);
- return country;
- }
-
-}
[17/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java
deleted file mode 100644
index 3ecc2d1..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_data.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.runtime.memento;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
-
-public class MementoTest_data {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- private ObjectAdapter originalAdapter1, originalAdapter2;
- private Oid oid1, oid2;
-
- private Memento memento1, memento2;
- private Data data1, data2;
-
- @Before
- public void setUpSystem() throws Exception {
- iswf.fixtures.wve1.setStringProperty("Fred");
-
- originalAdapter1 = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(iswf.fixtures.wve1);
- oid1 = originalAdapter1.getOid();
- memento1 = new Memento(originalAdapter1);
- data1 = memento1.getData();
-
- iswf.fixtures.wve2.setStringProperty("Harry");
- iswf.container.persist(iswf.fixtures.wve2);
-
- originalAdapter2 = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(iswf.fixtures.wve2);
- oid2 = originalAdapter2.getOid();
- memento2 = new Memento(originalAdapter2);
- data2 = memento2.getData();
- }
-
-
- @Test
- public void data_whenNull() throws Exception {
- final Memento memento = new Memento(null);
- Data data = memento.getData();
-
- assertEquals(null, data);
- }
-
-
- @Test
- public void data_getOid_equal() throws Exception {
- assertEquals(oid1, data1.getOid());
- }
-
-
-
- @Test
- public void data_getClassName() throws Exception {
- assertEquals(WrapperValuedEntity.class.getName(), data1.getClassName());
- }
-
-
- @Test
- public void data_getEntry_forStringField() throws Exception {
- assertEquals(ObjectData.class, data1.getClass());
- final ObjectData objectData = (ObjectData) data1;
- assertEquals("Fred", objectData.getEntry("stringProperty"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java
deleted file mode 100644
index f86d96d..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest_encodedData.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.runtime.memento;
-
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.encoding.DataOutputStreamExtended;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-
-public class MementoTest_encodedData {
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- private ObjectAdapter rootAdapter;
-
- private Memento memento;
-
- @Mock
- private DataOutputStreamExtended mockOutputImpl;
-
- @Before
- public void setUpSystem() throws Exception {
- iswf.fixtures.smpl1.setName("Fred");
- iswf.fixtures.smpl2.setName("Harry");
-
- iswf.fixtures.rfcg1.setReference(iswf.fixtures.smpl1);
-
- iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl1);
- iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl2);
-
- iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.smpl1);
- iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.rfcg1);
-
-
- rootAdapter = IsisContext.getPersistenceSession().getAdapterManager().adapterFor(iswf.fixtures.smpl1);
-
- memento = new Memento(rootAdapter);
- }
-
-
- @Test
- public void encodedData() throws Exception {
- context.checking(new Expectations() {
- {
- one(mockOutputImpl).writeEncodable(memento.getData());
- }
- });
- memento.encodedData(mockOutputImpl);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java
deleted file mode 100644
index ebba602..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_getName.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-
-public class DataNucleusPersistenceMechanismInstallerTest_getName {
-
- private DataNucleusPersistenceMechanismInstaller installer;
-
- @Before
- public void setUp() throws Exception {
- installer = new DataNucleusPersistenceMechanismInstaller();
- }
-
- @After
- public void tearDown() throws Exception {
- }
-
- @Test
- public void isSet() {
- assertThat(installer.getName(), is("datanucleus"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java
deleted file mode 100644
index 44a5b46..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.spec.ObjectSpecId;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-
-public class DataNucleusPersistenceMechanismInstallerTest_services {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .withServices(repo)
- .build();
-
- @Test
- public void servicesBootstrapped() {
- final List<Object> services = IsisContext.getServices();
- assertThat(services.size(), is(1));
- assertThat(services.get(0), is((Object)repo));
-
- final ObjectAdapter serviceAdapter = IsisContext.getPersistenceSession().getAdapterManager().getAdapterFor(repo);
- assertThat(serviceAdapter, is(not(nullValue())));
-
- assertThat(serviceAdapter.getOid(), is(equalTo((Oid)RootOidDefault.create(ObjectSpecId.of("PrimitiveValuedEntities"), "1"))));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java
deleted file mode 100644
index 5b0bb73..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus;
-
-import java.sql.Connection;
-import java.sql.Statement;
-import java.util.Properties;
-
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.config.IsisConfigurationDefault;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class Utils {
-
- private Utils(){}
-
- public static IsisSystemWithFixtures.Builder systemBuilder() {
- return IsisSystemWithFixtures.builder()
- .with(configurationForDataNucleusDb())
- .with(new DataNucleusPersistenceMechanismInstaller());
- }
-
- public static IsisSystemWithFixtures.Listener listenerToDeleteFrom(final String... tables) {
- return new IsisSystemWithFixtures.ListenerAdapter(){
-
- @Override
- public void postSetupSystem(boolean firstTime) throws Exception {
- Connection connection = getConnection();
- try {
- final Statement statement = connection.createStatement();
- for(String table: tables) {
- statement.executeUpdate("DELETE FROM " + table);
- }
- } catch(Exception ex) {
- connection.rollback();
- throw ex;
- } finally {
- connection.commit();
- }
- }
-
- private Connection getConnection() {
- final DataNucleusObjectStore objectStore = (DataNucleusObjectStore) IsisContext.getPersistenceSession().getObjectStore();
- return objectStore.getJavaSqlConnection();
- }
- };
- }
-
- public static IsisConfiguration configurationForDataNucleusDb() {
- final IsisConfigurationDefault configuration = new IsisConfigurationDefault();
- Properties props = new Properties();
-
- props.put("isis.persistor.datanucleus.impl.javax.jdo.PersistenceManagerFactoryClass", "org.datanucleus.api.jdo.JDOPersistenceManagerFactory");
-
- // last one wins!
- configureHsqlDbFileBased(props);
- configureForMsSqlServer(props);
- configureHsqlDbInMemory(props);
-
- props.put("isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema", "true");
- props.put("isis.persistor.datanucleus.impl.datanucleus.validateTables", "true");
- props.put("isis.persistor.datanucleus.impl.datanucleus.validateConstraints", "true");
-
- props.put("isis.persistor.datanucleus.impl.datanucleus.cache.level2.type", "none");
-
- configuration.add(props);
- return configuration;
- }
-
-
- private static void configureHsqlDbInMemory(Properties props) {
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName", "org.hsqldb.jdbcDriver");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:mem:test");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName", "sa");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword", "");
- }
-
- private static void configureHsqlDbFileBased(Properties props) {
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName", "org.hsqldb.jdbcDriver");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:file:hsql-db/test;hsqldb.write_delay=false;shutdown=true");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName", "sa");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword", "");
- }
-
- private static void configureForMsSqlServer(Properties props) {
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName", "com.microsoft.sqlserver.jdbc.SQLServerDriver");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:sqlserver://127.0.0.1:1433;instance=SQLEXPRESS;databaseName=jdo;");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName", "jdo");
- props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword", "jdopass");
- }
-
-
-
- public static long toMillis(int year, int monthOfYear, int dayOfMonth) {
- LocalDate d = new LocalDate(year, monthOfYear, dayOfMonth);
- return d.toDateMidnight().getMillis();
- }
-
- public static long toMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) {
- LocalDateTime d = new LocalDateTime(year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour, secondOfMinute);
- return d.toDateTime().getMillis();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java
deleted file mode 100644
index f4c5364..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.persistence.spi;
-
-import java.math.BigInteger;
-import java.util.Date;
-import org.datanucleus.identity.ObjectId;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.spec.ObjectSpecId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class JdoObjectIdSerializerTest {
-
- @ObjectType("CUS")
- public static class Customer {}
- public static class CustomerRepository {
- public void foo(Customer x) {}
- }
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
- .withServices(new CustomerRepository())
- .build();
-
-
-
- @Test
- public void whenJavaxJdoIntIdentity() throws Exception {
- Object jdoObjectId = new javax.jdo.identity.IntIdentity(Customer.class, 123);
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoObjectId);
- assertThat(id, is("i_123"));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoObjectIdRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoObjectIdRecreated, is(jdoObjectId));
- }
-
-
- @Test
- public void whenJavaxJdoStringIdentity() throws Exception {
- Object jdoObjectId = new javax.jdo.identity.StringIdentity(Customer.class, "123");
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoObjectId);
- assertThat(id, is("s_123"));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoObjectIdRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoObjectIdRecreated, is(jdoObjectId));
- }
-
-
- @Test
- public void whenJavaxJdoLongIdentity() throws Exception {
- Object jdoObjectId = new javax.jdo.identity.LongIdentity(Customer.class, 123L);
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoObjectId);
- assertThat(id, is("l_123"));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoObjectIdRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoObjectIdRecreated, is(jdoObjectId));
- }
-
-
- @Test
- public void whenLong() throws Exception {
- Object jdoOid = new ObjectId(Customer.class, 123L);
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
- assertThat(id, is("L_123"));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoOidRecreated, is((Object)("123"+ "[OID]" + Customer.class.getName())));
- }
-
- @Test
- public void whenDataNucleusOidAndLong() throws Exception {
- Object jdoOid = new ObjectId(Customer.class, 123L);
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
- assertThat(id, is("L_123"));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoOidRecreated, is((Object)("123"+ "[OID]" + Customer.class.getName())));
- }
-
- @Test
- public void whenDataNucleusOidAndBigInteger() throws Exception {
- Object jdoOid = new ObjectId(Customer.class, new BigInteger("123"));
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
- assertThat(id, is("B_123"));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoOidRecreated, is(((Object)("123"+ "[OID]" + Customer.class.getName()))));
- }
-
- @Test
- public void whenDataNucleusOidAndString() throws Exception {
- Object jdoOid = new ObjectId(Customer.class, "456");
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
- assertThat(id, is("S_456"));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoOidRecreated, is((Object)("456" + "[OID]" + Customer.class.getName())));
- }
-
- @Test
- public void whenDataNucleusOidAndOtherKeyValue() throws Exception {
- Date key = new Date();
- Object jdoOid = new ObjectId(Customer.class, key);
- String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
- assertThat(id, IsisMatchers.startsWith(ObjectId.class.getName() + "_" + key.toString()));
-
- RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
- Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
-
- assertThat(jdoOidRecreated, is((Object)(key.toString() + "[OID]" + Customer.class.getName())));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java
deleted file mode 100644
index 94087d7..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.adaptermanager;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ResolveState;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_lazyLoading {
-
- private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
- private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
- .withServices(referencingRepo, referencedRepo)
- .build();
-
- @Test
- public void lazyLoading_and_adapters() throws Exception {
- iswf.beginTran();
- referencedRepo.newEntity().setName("Referenced 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- UnidirReferencedEntity referencedEntity1 = referencedRepo.list().get(0);
-
- UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
- referencingEntity1.setName("Referencing 1");
- referencingEntity1.setReferenced(referencedEntity1);
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<UnidirReferencingEntity> list = referencingRepo.list();
- referencingEntity1 = list.get(0);
-
- assertThat(referencingEntity1.referenced, is(nullValue())); // lazy loading
- UnidirReferencedEntity referenced = referencingEntity1.getReferenced();
- ObjectAdapter referencedAdapter = iswf.adapterFor(referenced);
- assertThat(referencedAdapter.getResolveState(), is(ResolveState.RESOLVED));
- assertThat(referenced, is(not(nullValue())));
-
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java
deleted file mode 100644
index 32487be..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.adaptermanager;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_loadObject {
-
- private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
- private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
- .withServices(referencingRepo, referencedRepo)
- .build();
-
-
- @Test
- public void persist_then_update_using_persistentAdapterFor() throws Exception {
-
- iswf.beginTran();
- UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
- referencedEntity1.setName("Referenced 1");
- UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
- referencedEntity2.setName("Referenced 2");
-
- UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
- referencingEntity1.setName("Referencing 1");
- referencingEntity1.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
- referencingEntity2.setName("Referencing 2");
- referencingEntity2.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
- referencingEntity3.setName("Referencing 3");
- referencingEntity3.setReferenced(referencedEntity2);
-
- iswf.commitTran();
-
- TypedOid referencingOid2 = (TypedOid) iswf.adapterFor(referencingEntity2).getOid();
-
- TypedOid referencedOid1 = (TypedOid) iswf.adapterFor(referencedEntity1).getOid();
- TypedOid referencedOid2 = (TypedOid) iswf.adapterFor(referencedEntity2).getOid();
-
-
- // when ...
- iswf.bounceSystem();
-
- iswf.beginTran();
-
- ObjectAdapter referencingAdapter2 = iswf.getPersistor().loadObject(referencingOid2);
- referencingEntity2 = (UnidirReferencingEntity) referencingAdapter2.getObject();
-
- UnidirReferencedEntity referenced = referencingEntity2.getReferenced();
-
- ObjectAdapter referencedAdapter1 = iswf.getAdapterManager().adapterFor(referencedOid1);
- assertThat(referenced, is(referencedAdapter1.getObject()));
-
- // ...switch to refer to other
-
- ObjectAdapter referencedAdapter2 = iswf.getAdapterManager().adapterFor(referencedOid2);
- referencedEntity2 = (UnidirReferencedEntity) referencedAdapter2.getObject();
-
- referencingEntity2.setReferenced(referencedEntity2);
- iswf.commitTran();
-
- }
-
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java
deleted file mode 100644
index 39d9833..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.adaptermanager;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persistentAdapterFor {
-
- private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
- private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
- .withServices(referencingRepo, referencedRepo)
- .build();
-
-
- @Test
- public void persist_then_update_using_persistentAdapterFor() throws Exception {
-
- iswf.beginTran();
- UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
- referencedEntity1.setName("Referenced 1");
- UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
- referencedEntity2.setName("Referenced 2");
-
- UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
- referencingEntity1.setName("Referencing 1");
- referencingEntity1.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
- referencingEntity2.setName("Referencing 2");
- referencingEntity2.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
- referencingEntity3.setName("Referencing 3");
- referencingEntity3.setReferenced(referencedEntity2);
-
- iswf.commitTran();
-
- TypedOid referencingOid2 = (TypedOid) iswf.adapterFor(referencingEntity2).getOid();
-
- TypedOid referencedOid1 = (TypedOid) iswf.adapterFor(referencedEntity1).getOid();
- TypedOid referencedOid2 = (TypedOid) iswf.adapterFor(referencedEntity2).getOid();
-
-
- // when ...
- iswf.bounceSystem();
-
- iswf.beginTran();
-
- ObjectAdapter referencingAdapter2 = iswf.getAdapterManager().adapterFor(referencingOid2);
- referencingEntity2 = (UnidirReferencingEntity) referencingAdapter2.getObject();
-
- UnidirReferencedEntity referenced = referencingEntity2.getReferenced();
-
- ObjectAdapter referencedAdapter1 = iswf.getAdapterManager().adapterFor(referencedOid1);
- assertThat(referenced, is(referencedAdapter1.getObject()));
-
- // ...switch to refer to other
-
- ObjectAdapter referencedAdapter2 = iswf.getAdapterManager().adapterFor(referencedOid2);
- referencedEntity2 = (UnidirReferencedEntity) referencedAdapter2.getObject();
-
- referencingEntity2.setReferenced(referencedEntity2);
- iswf.commitTran();
-
- // then...
- iswf.bounceSystem();
-
- iswf.beginTran();
-
- referencingAdapter2 = iswf.getAdapterManager().adapterFor(referencingOid2);
- referencingEntity2 = (UnidirReferencingEntity) referencingAdapter2.getObject();
-
- referenced = referencingEntity2.getReferenced();
-
- referencedAdapter2 = iswf.getAdapterManager().adapterFor(referencedOid2);
-
- // ...is switched
- assertThat(referenced, is(referencedAdapter2.getObject()));
-
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java
deleted file mode 100644
index b618efd..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.BidirWithListChildEntity;
-import org.apache.isis.core.tck.dom.refs.BidirWithListParentEntity;
-import org.apache.isis.core.tck.dom.refs.BidirWithListParentEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_bidirWithListParent {
-
- private BidirWithListParentEntityRepository repo = new BidirWithListParentEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("BIDIRWITHLISTCHILDeNTITY"))
- .with(Utils.listenerToDeleteFrom("BIDIRWITHLISTPARENTENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwoParents() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<BidirWithListParentEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persistTwoChildrenOfParent() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- BidirWithListParentEntity retrievedEntity = repo.list().get(0);
- retrievedEntity.newChild("Child 1 of Parent 1");
- retrievedEntity.newChild("Child 2 of Parent 1");
- retrievedEntity.newChild("Child 3 of Parent 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- retrievedEntity = repo.list().get(0);
- List<BidirWithListChildEntity> children = retrievedEntity.getChildren();
- assertThat(children.size(), is(3));
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java
deleted file mode 100644
index 21447b7..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.BidirWithSetChildEntity;
-import org.apache.isis.core.tck.dom.refs.BidirWithSetParentEntity;
-import org.apache.isis.core.tck.dom.refs.BidirWithSetParentEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_bidirWithSetParent {
-
- private BidirWithSetParentEntityRepository repo = new BidirWithSetParentEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("BIDIRWITHSETCHILDENTITY"))
- .with(Utils.listenerToDeleteFrom("BIDIRWITHSETPARENTENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwoParents() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<BidirWithSetParentEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persistTwoChildrenOfParent() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- BidirWithSetParentEntity retrievedEntity = repo.list().get(0);
- retrievedEntity.newChild("Child 1 of Parent 1");
- retrievedEntity.newChild("Child 2 of Parent 1");
- retrievedEntity.newChild("Child 3 of Parent 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- retrievedEntity = repo.list().get(0);
- Set<BidirWithSetChildEntity> children = retrievedEntity.getChildren();
- assertThat(children.size(), is(3));
- iswf.commitTran();
- }
-
- @Ignore("Not currently working, is an update")
- @Test
- public void updateBidirectional() throws Exception {
- iswf.beginTran();
- BidirWithSetParentEntity parent1 = repo.newEntity();
- parent1.setName("Parent 1");
- BidirWithSetParentEntity parent2 = repo.newEntity();
- parent2.setName("Parent 2");
-
- parent1.newChild("Child 1 of Parent 1");
- parent1.newChild("Child 2 of Parent 1");
- parent1.newChild("Child 3 of Parent 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- parent1 = repo.list().get(0);
- parent2 = repo.list().get(0);
- Set<BidirWithSetChildEntity> children = parent1.getChildren();
- assertThat(children.size(), is(3));
- BidirWithSetChildEntity child1 = parent1.getChildren().iterator().next();
- child1.moveTo(parent2);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- parent1 = repo.list().get(0);
- parent2 = repo.list().get(0);
- children = parent1.getChildren();
- assertThat(children.size(), is(2));
-
- children = parent2.getChildren();
- assertThat(children.size(), is(1));
- iswf.commitTran();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java
deleted file mode 100644
index bb1b8c6..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.PolyClassChildEntity;
-import org.apache.isis.core.tck.dom.refs.PolyClassParentEntity;
-import org.apache.isis.core.tck.dom.refs.PolyClassParentEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_polyclass {
-
- private PolyClassParentEntityRepository repo = new PolyClassParentEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("POLYCLASSSUBTYPE1ENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYCLASSCHILDENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYCLASSPARENTENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwoParents() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<PolyClassParentEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persistSixDifferentChildrenOfParent() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- PolyClassParentEntity retrievedEntity = repo.list().get(0);
- retrievedEntity.newSubtype1("Child 1 of Parent 1", 123);
- retrievedEntity.newSubtype1("Child 2 of Parent 1", 456);
- retrievedEntity.newSubtype2("Child 3 of Parent 1", "abc");
- retrievedEntity.newSubtype2("Child 4 of Parent 1", "def");
- retrievedEntity.newSubtype3("Child 5 of Parent 1", BigDecimal.ONE);
- retrievedEntity.newSubtype3("Child 6 of Parent 1", BigDecimal.TEN);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- retrievedEntity = repo.list().get(0);
- Set<PolyClassChildEntity> children = retrievedEntity.getChildren();
- assertThat(children.size(), is(6));
- iswf.commitTran();
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java
deleted file mode 100644
index 60a8ee7..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.PolyInterface;
-import org.apache.isis.core.tck.dom.refs.PolyInterfaceParentEntity;
-import org.apache.isis.core.tck.dom.refs.PolyInterfaceParentEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_polyinter {
-
- private PolyInterfaceParentEntityRepository repo = new PolyInterfaceParentEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("POLYINTERFACEPARENTENTITY_CHILDREN"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACESUBTYPE1ENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACESUBTYPE2ENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACESUBTYPE3ENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACEPARENTENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwoParents() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<PolyInterfaceParentEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persistSixDifferentChildrenOfParent() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- PolyInterfaceParentEntity retrievedEntity = repo.list().get(0);
- retrievedEntity.newSubtype1("Child 1 of Parent 1", 123);
- retrievedEntity.newSubtype1("Child 2 of Parent 1", 456);
- retrievedEntity.newSubtype2("Child 3 of Parent 1", "abc");
- retrievedEntity.newSubtype2("Child 4 of Parent 1", "def");
- retrievedEntity.newSubtype3("Child 5 of Parent 1", BigDecimal.ONE);
- retrievedEntity.newSubtype3("Child 6 of Parent 1", BigDecimal.TEN);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- retrievedEntity = repo.list().get(0);
- Set<PolyInterface> children = retrievedEntity.getChildren();
- assertThat(children.size(), is(6));
- iswf.commitTran();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java
deleted file mode 100644
index 9484c1d..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.math.BigDecimal;
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.PolyInterfaceIdentityStrategy;
-import org.apache.isis.core.tck.dom.refs.PolyInterfaceIdentityStrategyParentEntity;
-import org.apache.isis.core.tck.dom.refs.PolyInterfaceIdentityStrategyParentEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_polyinterIdentityStrategy {
-
- private PolyInterfaceIdentityStrategyParentEntityRepository repo = new PolyInterfaceIdentityStrategyParentEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYPARENTENTITY_CHILDREN"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYSUBTYPE1ENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYSUBTYPE2ENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYSUBTYPE3ENTITY"))
- .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYPARENTENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwoParents() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<PolyInterfaceIdentityStrategyParentEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persistSixDifferentChildrenOfParent() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- PolyInterfaceIdentityStrategyParentEntity retrievedEntity = repo.list().get(0);
- retrievedEntity.newSubtype1("Child 1 of Parent 1", 123);
- retrievedEntity.newSubtype1("Child 2 of Parent 1", 456);
- retrievedEntity.newSubtype2("Child 3 of Parent 1", "abc");
- retrievedEntity.newSubtype2("Child 4 of Parent 1", "def");
- retrievedEntity.newSubtype3("Child 5 of Parent 1", BigDecimal.ONE);
- retrievedEntity.newSubtype3("Child 6 of Parent 1", BigDecimal.TEN);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- retrievedEntity = repo.list().get(0);
- Set<PolyInterfaceIdentityStrategy> children = retrievedEntity.getChildren();
- assertThat(children.size(), is(6));
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java
deleted file mode 100644
index d29c674..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_referencing {
-
- private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
- private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
- .withServices(referencingRepo, referencedRepo)
- .build();
-
- @Test
- public void persist() throws Exception {
-
- iswf.beginTran();
- referencedRepo.newEntity().setName("Referenced 1");
- referencedRepo.newEntity().setName("Referenced 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- UnidirReferencedEntity referencedEntity1 = referencedRepo.list().get(0);
- UnidirReferencedEntity referencedEntity2 = referencedRepo.list().get(1);
-
- UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
- referencingEntity1.setName("Referencing 1");
- referencingEntity1.setReferenced(referencedEntity1);
-
- UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
- referencingEntity2.setName("Referencing 2");
- referencingEntity2.setReferenced(referencedEntity1);
-
- UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
- referencingEntity3.setName("Referencing 3");
- referencingEntity3.setReferenced(referencedEntity2);
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<UnidirReferencingEntity> list = referencingRepo.list();
- referencingEntity1 = list.get(0);
- referencingEntity2 = list.get(1);
- referencingEntity3 = list.get(2);
-
- assertThat(referencingEntity1.getReferenced(), is(not(nullValue())));
- assertThat(referencingEntity2.getReferenced(), is(not(nullValue())));
- assertThat(referencingEntity3.getReferenced(), is(not(nullValue())));
-
- assertThat(referencingEntity1.getReferenced(), is(referencingEntity1.getReferenced()));
- assertThat(referencingEntity1.getReferenced(), is(not(referencingEntity3.getReferenced())));
- iswf.commitTran();
- }
-
- @Test
- public void persistAGraphOfObjects() throws Exception {
-
- iswf.beginTran();
- UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
- referencedEntity1.setName("Referenced 1");
- UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
- referencedEntity2.setName("Referenced 2");
-
- UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
- referencingEntity1.setName("Referencing 1");
- referencingEntity1.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
- referencingEntity2.setName("Referencing 2");
- referencingEntity2.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
- referencingEntity3.setName("Referencing 3");
- referencingEntity3.setReferenced(referencedEntity2);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<UnidirReferencingEntity> list = referencingRepo.list();
- referencingEntity1 = list.get(0);
- referencingEntity2 = list.get(1);
- referencingEntity3 = list.get(2);
-
- assertThat(referencingEntity1.getReferenced(), is(not(nullValue())));
- assertThat(referencingEntity2.getReferenced(), is(not(nullValue())));
- assertThat(referencingEntity3.getReferenced(), is(not(nullValue())));
-
- assertThat(referencingEntity1.getReferenced(), is(referencingEntity1.getReferenced()));
- assertThat(referencingEntity1.getReferenced(), is(not(referencingEntity3.getReferenced())));
- iswf.commitTran();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java
deleted file mode 100644
index 387f561..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.UnidirFkChildEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirFkParentEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirFkParentEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_unidir {
-
- private UnidirFkParentEntityRepository repo = new UnidirFkParentEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("UNIDIRFKCHILDENTITY"))
- .with(Utils.listenerToDeleteFrom("UNIDIRFKPARENTENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwoParents() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<UnidirFkParentEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persistTwoChildrenOfParent() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- UnidirFkParentEntity retrievedEntity = repo.list().get(0);
- retrievedEntity.newChild("Child 1 of Parent 1");
- retrievedEntity.newChild("Child 2 of Parent 1");
- retrievedEntity.newChild("Child 3 of Parent 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- retrievedEntity = repo.list().get(0);
- Set<UnidirFkChildEntity> children = retrievedEntity.getChildren();
- assertThat(children.size(), is(3));
- iswf.commitTran();
- }
-
- @Ignore("Not currently working, is an update")
- @Test
- public void updateBidirectional() throws Exception {
- iswf.beginTran();
- UnidirFkParentEntity parent1 = repo.newEntity();
- parent1.setName("Parent 1");
- UnidirFkParentEntity parent2 = repo.newEntity();
- parent2.setName("Parent 2");
-
- parent1.newChild("Child 1 of Parent 1");
- parent1.newChild("Child 2 of Parent 1");
- parent1.newChild("Child 3 of Parent 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- parent1 = repo.list().get(0);
- parent2 = repo.list().get(0);
- Set<UnidirFkChildEntity> children = parent1.getChildren();
- assertThat(children.size(), is(3));
- UnidirFkChildEntity child1 = parent1.getChildren().iterator().next();
- parent1.removeChild(child1);
- parent2.addChild(child1);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- parent1 = repo.list().get(0);
- parent2 = repo.list().get(0);
- children = parent1.getChildren();
- assertThat(children.size(), is(2));
-
- children = parent2.getChildren();
- assertThat(children.size(), is(1));
- iswf.commitTran();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java
deleted file mode 100644
index 3f56f4e..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-import java.util.Set;
-
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.UnidirJoinChildEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirJoinParentEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirJoinParentEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_unidirJoin {
-
- private UnidirJoinParentEntityRepository repo = new UnidirJoinParentEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("UNIDIRJOINCHILDENTITY"))
- .with(Utils.listenerToDeleteFrom("UNIDIRJOINPARENTENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwoParents() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<UnidirJoinParentEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persistTwoChildrenOfParent() throws Exception {
- iswf.beginTran();
- repo.newEntity().setName("Parent 1");
- repo.newEntity().setName("Parent 2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- UnidirJoinParentEntity retrievedEntity = repo.list().get(0);
- retrievedEntity.newChild("Child 1 of Parent 1");
- retrievedEntity.newChild("Child 2 of Parent 1");
- retrievedEntity.newChild("Child 3 of Parent 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- retrievedEntity = repo.list().get(0);
- Set<UnidirJoinChildEntity> children = retrievedEntity.getChildren();
- assertThat(children.size(), is(3));
- iswf.commitTran();
- }
-
- @Ignore("Not currently working, is an update")
- @Test
- public void updateBidirectional() throws Exception {
- iswf.beginTran();
- UnidirJoinParentEntity parent1 = repo.newEntity();
- parent1.setName("Parent 1");
- UnidirJoinParentEntity parent2 = repo.newEntity();
- parent2.setName("Parent 2");
-
- parent1.newChild("Child 1 of Parent 1");
- parent1.newChild("Child 2 of Parent 1");
- parent1.newChild("Child 3 of Parent 1");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- parent1 = repo.list().get(0);
- parent2 = repo.list().get(0);
- Set<UnidirJoinChildEntity> children = parent1.getChildren();
- assertThat(children.size(), is(3));
- UnidirJoinChildEntity child1 = parent1.getChildren().iterator().next();
- parent1.removeChild(child1);
- parent2.addChild(child1);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- parent1 = repo.list().get(0);
- parent2 = repo.list().get(0);
- children = parent1.getChildren();
- assertThat(children.size(), is(2));
-
- children = parent2.getChildren();
- assertThat(children.size(), is(1));
- iswf.commitTran();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java
deleted file mode 100644
index b7d8026..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
-import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_update_using_domMethodCalls {
-
- private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
- private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
- .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
- .withServices(referencingRepo, referencedRepo)
- .build();
-
-
- @Test
- public void persist_then_update() throws Exception {
-
- iswf.beginTran();
- UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
- referencedEntity1.setName("Referenced 1");
- UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
- referencedEntity2.setName("Referenced 2");
-
- UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
- referencingEntity1.setName("Referencing 1");
- referencingEntity1.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
- referencingEntity2.setName("Referencing 2");
- referencingEntity2.setReferenced(referencedEntity1);
- UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
- referencingEntity3.setName("Referencing 3");
- referencingEntity3.setReferenced(referencedEntity2);
-
- iswf.commitTran();
-
- // when ...
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<UnidirReferencingEntity> referencingList = referencingRepo.list();
- referencingEntity1 = referencingList.get(0);
- referencingEntity2 = referencingList.get(1);
- referencingEntity3 = referencingList.get(2);
-
- List<UnidirReferencedEntity> referencedList = referencedRepo.list();
- referencedEntity1 = referencedList.get(0);
- referencedEntity2 = referencedList.get(1);
-
- assertThat(referencingEntity2.getReferenced(), is(referencedEntity1));
-
- // ...switch to refer to other
- referencingEntity2.setReferenced(referencedEntity2);
- iswf.commitTran();
-
- // then...
- iswf.bounceSystem();
-
- iswf.beginTran();
- referencingList = referencingRepo.list();
- referencingEntity1 = referencingList.get(0);
- referencingEntity2 = referencingList.get(1);
- referencingEntity3 = referencingList.get(2);
-
- referencedList = referencedRepo.list();
- referencedEntity1 = referencedList.get(0);
- referencedEntity2 = referencedList.get(1);
-
- // ...is switched
- assertThat(referencingEntity2.getReferenced(), is(referencedEntity2));
- iswf.commitTran();
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java
deleted file mode 100644
index 7a2fad1..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_allInstances {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void whenNoInstances() {
- iswf.beginTran();
- final List<PrimitiveValuedEntity> list = repo.list();
- assertThat(list.size(), is(0));
- iswf.commitTran();
- }
-
- @Test
- public void persist_dontBounce_listAll() throws Exception {
-
- iswf.beginTran();
- PrimitiveValuedEntity entity = repo.newEntity();
- entity.setId(1);
- entity = repo.newEntity();
- entity.setId(2);
- iswf.commitTran();
-
- // don't bounce
- iswf.beginTran();
- List<PrimitiveValuedEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persist_bounce_listAll() throws Exception {
-
- iswf.beginTran();
- repo.newEntity().setId(1);
- repo.newEntity().setId(2);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<PrimitiveValuedEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
-
-}
[38/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java
new file mode 100644
index 0000000..fa71905
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RestfulMatchers.java
@@ -0,0 +1,660 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck;
+
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.MediaType;
+import com.google.common.base.Objects;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.hamcrest.TypeSafeMatcher;
+import org.junit.Assert;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.HasLinkToSelf;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+
+public class RestfulMatchers {
+
+ public static <T extends JsonRepresentation> Matcher<T> isMap() {
+ return new TypeSafeMatcher<T>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("map");
+ }
+
+ @Override
+ public boolean matchesSafely(final T item) {
+ return item != null && item.isMap();
+ }
+ };
+ }
+
+ public static <T extends JsonRepresentation> Matcher<T> isArray() {
+ return new TypeSafeMatcher<T>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("array");
+ }
+
+ @Override
+ public boolean matchesSafely(final T item) {
+ return item != null && item.isArray();
+ }
+ };
+ }
+
+ public static <T extends JsonRepresentation> Matcher<T> isString() {
+ return new TypeSafeMatcher<T>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("string");
+ }
+
+ @Override
+ public boolean matchesSafely(final T item) {
+ return item != null && item.isValue() && item.asJsonNode().isTextual();
+ }
+ };
+ }
+
+ public static Matcher<LinkRepresentation> isLink(final RestfulHttpMethod httpMethod) {
+ return new TypeSafeMatcher<LinkRepresentation>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("link with method " + httpMethod.name());
+ }
+
+ @Override
+ public boolean matchesSafely(final LinkRepresentation item) {
+ return item != null && item.getHttpMethod() == httpMethod;
+ }
+ };
+ }
+
+ public static <T extends JsonRepresentation> Matcher<T> isFollowableLinkToSelf(final RestfulClient client) {
+ return new TypeSafeMatcher<T>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("links to self");
+ }
+
+ @Override
+ public boolean matchesSafely(final T item) {
+ final HasLinkToSelf initialRepr = (HasLinkToSelf) item; // no easy
+ // way to do
+ // this with
+ // Hamcrest
+ // when
+ try {
+ final RestfulResponse<T> followedResp = client.followT(initialRepr.getSelf());
+
+ // then
+ final T repr2 = followedResp.getEntity();
+ final HasLinkToSelf repr2AsLinksToSelf = (HasLinkToSelf) repr2;
+ return initialRepr.getSelf().equals(repr2AsLinksToSelf.getSelf());
+ } catch (final Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+ };
+ }
+
+ public static <T extends JsonRepresentation> void assertThat(final T actual, final AbstractMatcherBuilder<T> matcherBuilder) {
+ Assert.assertThat(actual, matcherBuilder.build());
+ }
+
+ public static LinkMatcherBuilder isLink(final RestfulClient client) {
+ return new LinkMatcherBuilder(client);
+ }
+
+ public static LinkMatcherBuilder isLink() {
+ return new LinkMatcherBuilder(null);
+ }
+
+ public static abstract class AbstractMatcherBuilder<T> {
+ protected RestfulClient client;
+
+ public AbstractMatcherBuilder() {
+ this(null);
+ }
+
+ public AbstractMatcherBuilder(final RestfulClient client) {
+ this.client = client;
+ }
+
+ public abstract Matcher<T> build();
+ }
+
+ public static class LinkMatcherBuilder extends AbstractMatcherBuilder<JsonRepresentation> {
+ private HttpStatusCode statusCode;
+ private RestfulHttpMethod httpMethod;
+ private String rel;
+ private String href;
+ private Matcher<String> relNameMatcher;
+ private Matcher<String> hrefMatcher;
+ private Matcher<JsonRepresentation> valueMatcher;
+ private Boolean novalue;
+ private MediaType mediaType;
+ private String typeParameterName;
+ private String typeParameterValue;
+ private String selfHref;
+ private JsonRepresentation arguments;
+ private String title;
+ private Matcher<String> titleMatcher;
+
+ private LinkMatcherBuilder(final RestfulClient client) {
+ super(client);
+ }
+
+ public LinkMatcherBuilder rel(final String rel) {
+ this.rel = rel;
+ return this;
+ }
+
+ public LinkMatcherBuilder rel(final Rel rel) {
+ this.rel = rel.getName();
+ return this;
+ }
+
+ public LinkMatcherBuilder rel(final Matcher<String> relNameMatcher) {
+ this.relNameMatcher = relNameMatcher;
+ return this;
+ }
+
+ public LinkMatcherBuilder href(final String href) {
+ this.href = href;
+ return this;
+ }
+
+ public LinkMatcherBuilder href(final Matcher<String> hrefMatcher) {
+ this.hrefMatcher = hrefMatcher;
+ return this;
+ }
+
+ public LinkMatcherBuilder httpMethod(final RestfulHttpMethod httpMethod) {
+ this.httpMethod = httpMethod;
+ return this;
+ }
+
+ public LinkMatcherBuilder type(final MediaType mediaType) {
+ this.mediaType = mediaType;
+ return this;
+ }
+
+ public LinkMatcherBuilder title(String title) {
+ this.title = title;
+ return this;
+ }
+
+ public LinkMatcherBuilder title(Matcher<String> titleMatcher) {
+ this.titleMatcher = titleMatcher;
+ return this;
+ }
+
+ public LinkMatcherBuilder typeParameter(final String typeParameterName, final String typeParameterValue) {
+ this.typeParameterName = typeParameterName;
+ this.typeParameterValue = typeParameterValue;
+ return this;
+ }
+
+ public LinkMatcherBuilder arguments(JsonRepresentation arguments) {
+ this.arguments = arguments;
+ return this;
+ }
+
+ public LinkMatcherBuilder novalue() {
+ if (valueMatcher != null) {
+ throw new IllegalStateException("cannot assert on both there being a value and there not being a value");
+ }
+ this.novalue = true;
+ return this;
+ }
+
+ public LinkMatcherBuilder value(final Matcher<JsonRepresentation> valueMatcher) {
+ if (this.novalue != null) {
+ throw new IllegalStateException("cannot assert on both there being a value and there not being a value");
+ }
+ this.valueMatcher = valueMatcher;
+ return this;
+ }
+
+ public LinkMatcherBuilder returning(final HttpStatusCode statusCode) {
+ this.statusCode = statusCode;
+ return this;
+ }
+
+ public LinkMatcherBuilder responseEntityWithSelfHref(String selfHref) {
+ this.selfHref = selfHref;
+ return this;
+ }
+
+ @Override
+ public Matcher<JsonRepresentation> build() {
+ return new TypeSafeMatcher<JsonRepresentation>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("a link");
+ if (rel != null) {
+ description.appendText(" with rel '").appendText(rel).appendText("'");
+ }
+ if (relNameMatcher != null) {
+ description.appendText(" with rel '");
+ relNameMatcher.describeTo(description);
+ }
+ if (href != null) {
+ description.appendText(" with href '").appendText(href).appendText("'");
+ }
+ if (hrefMatcher != null) {
+ description.appendText(" with href ");
+ hrefMatcher.describeTo(description);
+ }
+ if (title != null) {
+ description.appendText(" with title '").appendText(title).appendText("'");
+ }
+ if (titleMatcher != null) {
+ description.appendText(" with title ");
+ titleMatcher.describeTo(description);
+ }
+ if (httpMethod != null) {
+ description.appendText(" with method '").appendValue(httpMethod).appendText("'");
+ }
+ if (mediaType != null) {
+ description.appendText(" with type '").appendValue(mediaType).appendText("'");
+ }
+ if (typeParameterName != null) {
+ description.appendText(" with media type parameter '").appendText(typeParameterName).appendText("=").appendText(typeParameterValue).appendText("'");
+ }
+
+ if (arguments != null) {
+ description.appendText(" with arguments").appendText(arguments.toString());
+ }
+
+ if (novalue != null && novalue) {
+ description.appendText(" with no value");
+ }
+ if (valueMatcher != null) {
+ description.appendText(" with value ");
+ valueMatcher.describeTo(description);
+ }
+
+ // trigger link being followed
+ if (statusCode != null || selfHref != null) {
+ if (client == null) {
+ throw new IllegalStateException("require client in order to assert on statusCode");
+ }
+ description.appendText(" that when followed");
+ if (statusCode != null) {
+ description.appendText(" returns status " + statusCode);
+ }
+ if (statusCode != null || selfHref != null) {
+ description.appendText(" and");
+ }
+ if (selfHref != null) {
+ description.appendText(" has a response whose self.href is " + selfHref);
+ }
+ }
+ }
+
+ @Override
+ public boolean matchesSafely(final JsonRepresentation linkRepr) {
+ if (linkRepr == null) {
+ return false;
+ }
+ final LinkRepresentation link = linkRepr.asLink();
+ if (rel != null && !Rel.parse(rel).matches(link.getRel())) {
+ return false;
+ }
+ if (relNameMatcher != null && !relNameMatcher.matches(link.getRel())) {
+ return false;
+ }
+ if (href != null && !href.equals(link.getHref())) {
+ return false;
+ }
+ if (hrefMatcher != null && !hrefMatcher.matches(link.getHref())) {
+ return false;
+ }
+ if (title != null && !title.equals(link.getTitle())) {
+ return false;
+ }
+ if (titleMatcher != null && !titleMatcher.matches(link.getTitle())) {
+ return false;
+ }
+ if (httpMethod != null && !httpMethod.equals(link.getHttpMethod())) {
+ return false;
+ }
+ if (mediaType != null && !mediaType.isCompatible(mediaType)) {
+ return false;
+ }
+ if (typeParameterName != null) {
+ final MediaType mediaType = link.getType();
+ final String parameterValue = mediaType.getParameters().get(typeParameterName);
+ if (!typeParameterValue.equals(parameterValue)) {
+ return false;
+ }
+ }
+ if (novalue != null && novalue && link.getValue() != null) {
+ return false;
+ }
+ if (arguments != null && !arguments.equals(link.getArguments())) {
+ return false;
+ }
+ if (valueMatcher != null && !valueMatcher.matches(link.getValue())) {
+ return false;
+ }
+
+ // follow link if criteria require it
+ RestfulResponse<JsonRepresentation> jsonResp = null;
+ if (statusCode != null || selfHref != null) {
+ if (client == null) {
+ return false;
+ }
+ try {
+ jsonResp = client.followT(link);
+ } catch (final Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ // assertions based on provided criteria
+ try {
+ if (statusCode != null) {
+ if (jsonResp.getStatus() != statusCode) {
+ return false;
+ }
+ }
+ if (selfHref != null) {
+ JsonRepresentation entity;
+ try {
+ entity = jsonResp.getEntity();
+ } catch (Exception e) {
+ return false;
+ }
+ if(entity == null) {
+ return false;
+ }
+ LinkRepresentation selfLink = entity.getLink("links[rel=self]");
+ if(selfLink == null) {
+ return false;
+ }
+ if (!selfLink.getHref().equals(selfHref)) {
+ return false;
+ }
+ }
+ return true;
+ } finally {
+ // flush any pending response
+ try {
+ jsonResp.getEntity();
+ } catch (Exception e) {
+ // ignore
+ }
+ }
+ }
+ };
+ }
+
+
+
+
+ }
+
+ public static EntryMatcherBuilder entry(final String key) {
+ return new EntryMatcherBuilder(key);
+ }
+
+ public static class EntryMatcherBuilder extends AbstractMatcherBuilder<JsonRepresentation> {
+
+ private final String key;
+ private String value;
+
+ private EntryMatcherBuilder(final String key) {
+ this.key = key;
+ }
+
+ public EntryMatcherBuilder value(final String value) {
+ this.value = value;
+ return this;
+ }
+
+ @Override
+ public Matcher<JsonRepresentation> build() {
+ return new TypeSafeMatcher<JsonRepresentation>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("map with entry with key: " + key);
+ if (value != null) {
+ description.appendText(", and value: " + value);
+ }
+ }
+
+ @Override
+ public boolean matchesSafely(final JsonRepresentation item) {
+ if (!item.isMap()) {
+ return false;
+ }
+ final String val = item.getString(key);
+ if (val == null) {
+ return false;
+ }
+ if (value != null && !value.equals(val)) {
+ return false;
+ }
+ return true;
+ }
+ };
+ }
+
+ }
+
+ public static Matcher<MediaType> hasMediaType(final String type) {
+ return new TypeSafeMatcher<MediaType>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("has type " + type);
+ }
+
+ @Override
+ public boolean matchesSafely(final MediaType item) {
+ final String expectedType = item.getType();
+ return expectedType != null && type.contains(expectedType);
+ }
+ };
+ }
+
+ public static Matcher<MediaType> hasSubType(final String subtype) {
+ return new TypeSafeMatcher<MediaType>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("has subtype " + subtype);
+ }
+
+ @Override
+ public boolean matchesSafely(final MediaType item) {
+ return Objects.equal(subtype, item.getSubtype());
+ }
+ };
+ }
+
+ public static Matcher<MediaType> hasParameter(final String parameterName, final String parameterValue) {
+ return new TypeSafeMatcher<MediaType>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText(String.format("has parameter '%s' with value '%s'", parameterName, parameterValue));
+ }
+
+ @Override
+ public boolean matchesSafely(final MediaType item) {
+ final String paramValue = item.getParameters().get(parameterName);
+ return Objects.equal(paramValue, parameterValue);
+ }
+ };
+ }
+
+ public static Matcher<CacheControl> hasMaxAge(final int maxAge) {
+ return new TypeSafeMatcher<CacheControl>() {
+
+ @Override
+ public void describeTo(final Description description) {
+ description.appendText("has max age of " + maxAge + " secs");
+ }
+
+ @Override
+ public boolean matchesSafely(final CacheControl item) {
+ return maxAge == item.getMaxAge();
+ }
+ };
+ }
+
+ public static Matcher<? super JsonRepresentation> mapHas(final String key) {
+ return new TypeSafeMatcher<JsonRepresentation>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("is a map with key '" + key + "'");
+ }
+
+ @Override
+ protected boolean matchesSafely(JsonRepresentation item) {
+ return item.mapHas(key);
+ }
+ };
+ }
+
+ public static Matcher<? super MediaType> hasMediaTypeProfile(final String expectedMediaTypeAndProfileStr) {
+ final MediaType expectedMediaType = Header.CONTENT_TYPE.parse(expectedMediaTypeAndProfileStr);
+ final String expectedProfileIfAny = expectedMediaType.getParameters().get("profile");
+ return new TypeSafeMatcher<MediaType>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("is a media type 'application/json' with a profile parameter of '" + expectedMediaTypeAndProfileStr + '"');
+ }
+
+ @Override
+ protected boolean matchesSafely(MediaType item) {
+
+ if (!item.isCompatible(expectedMediaType)) {
+ return false;
+ }
+ String actualProfileIfAny = item.getParameters().get("profile");
+ return Objects.equal(expectedProfileIfAny, actualProfileIfAny);
+ }
+ };
+ }
+
+ public static Matcher<? super MediaType> hasMediaTypeXRoDomainType(final String expectedXRoDomainType) {
+ return new TypeSafeMatcher<MediaType>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("is a media type with an 'x-ro-domain-type' parameter of '" + expectedXRoDomainType + '"');
+ }
+
+ @Override
+ protected boolean matchesSafely(MediaType item) {
+ String actualXRoDomainTypeIfany = item.getParameters().get("x-ro-domain-type");
+ return actualXRoDomainTypeIfany != null && actualXRoDomainTypeIfany.contains(expectedXRoDomainType);
+ }
+ };
+ }
+
+ public static Matcher<? super MediaType> hasMediaTypeXRoElementType(final String expectedXRoElementTypeIfAny) {
+ return new TypeSafeMatcher<MediaType>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("is a media type with an 'x-ro-element-type' parameter of '" + expectedXRoElementTypeIfAny + '"');
+ }
+
+ @Override
+ protected boolean matchesSafely(MediaType item) {
+ String actualXRoElementTypeIfany = item.getParameters().get("x-ro-element-type");
+ return actualXRoElementTypeIfany != null && actualXRoElementTypeIfany.contains(expectedXRoElementTypeIfAny);
+ }
+ };
+ }
+
+ public static Matcher<? super RestfulResponse<?>> hasStatus(final HttpStatusCode statusCode) {
+ return new TypeSafeMatcher<RestfulResponse<?>>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("has status code of " + statusCode);
+ }
+
+ @Override
+ protected boolean matchesSafely(RestfulResponse<?> item) {
+ return item.getStatus() == statusCode;
+ }
+ };
+ }
+
+
+ public static class CacheControlMatcherBuilder extends AbstractMatcherBuilder<CacheControl> {
+
+ private Boolean noCache;
+
+ @Override
+ public Matcher<CacheControl> build() {
+ return new TypeSafeMatcher<CacheControl>() {
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("is a CacheControl header ");
+ if(noCache != null) {
+ description.appendText("with " + (noCache?"no":"") + " cache");
+ }
+ }
+
+ @Override
+ protected boolean matchesSafely(CacheControl item) {
+ if(noCache != null) {
+ if(item.isNoCache() != noCache) {
+ return false;
+ }
+ }
+ return true;
+ }
+ };
+ }
+
+ public CacheControlMatcherBuilder withNoCache() {
+ noCache = true;
+ return this;
+ }
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java
new file mode 100644
index 0000000..369c06d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/Util.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Util {
+
+ private Util() {
+ }
+
+ public static String givenLinkToService(RestfulClient restfulClient, String serviceId) throws IOException {
+
+ final DomainServiceResource resource = restfulClient.getDomainServiceResource();
+ final Response response = resource.services();
+ final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();
+
+ final String href = services.getRepresentation("value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"" + serviceId + "\"]").asLink().getHref();
+ return href;
+ }
+
+ public static String givenHrefToService(RestfulClient client, final String serviceId) throws IOException {
+ final DomainServiceResource resource = client.getDomainServiceResource();
+ final Response response = resource.services();
+ final ListRepresentation services = RestfulResponse.<ListRepresentation> ofT(response).getEntity();
+
+ return services.getRepresentation("value[rel=urn:org.restfulobjects:rels/service;serviceId=\"%s\"]", serviceId).asLink().getHref();
+ }
+
+ public static JsonRepresentation givenAction(RestfulClient client, final String serviceId, final String actionId) throws IOException {
+ final String href = givenHrefToService(client, serviceId);
+ final String detailRel = Rel.DETAILS.andParam("action", actionId);
+
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s]", actionId, detailRel);
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = restfulResponse.getEntity();
+
+ final JsonRepresentation actionLinkRepr = repr.getAction(actionId);
+ return actionLinkRepr.getRepresentation("links[rel=%s].value", detailRel);
+ }
+
+ /**
+ * For clientFollow tests; returns a link to the first entity in the list returned by invoking the 'list' action of the specified repo
+ */
+ public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName) throws Exception {
+ return serviceActionListInvokeFirstReference(client, repoName, "list");
+ }
+
+ /**
+ * For clientFollow tests; returns a link to the first entity in the list returned by invoking the specified repo and action
+ */
+ public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName, String actionName) throws Exception {
+ return serviceActionListInvokeFirstReference(client, repoName, actionName, 0);
+ }
+
+ /**
+ * For clientFollow tests; returns a link to the Nth entity in the list returned by invoking the specified repo and action
+ */
+ public static LinkRepresentation serviceActionListInvokeFirstReference(RestfulClient client, String repoName, String actionName, int idx) throws Exception {
+
+ final DomainServiceResource serviceResource = client.getDomainServiceResource();
+
+ Response response = serviceResource.invokeActionQueryOnly(repoName, actionName, null);
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
+ final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
+
+ assertThat(listRepr.getValue(), is(not(nullValue())));
+ assertThat(listRepr.getValue().size(), is(IsisMatchers.greaterThan(idx + 1)));
+
+ final LinkRepresentation domainObjectLinkRepr = listRepr.getValue().arrayGet(idx).as(LinkRepresentation.class);
+
+ assertThat(domainObjectLinkRepr, is(not(nullValue())));
+ assertThat(domainObjectLinkRepr, isLink().rel(Rel.ELEMENT).httpMethod(RestfulHttpMethod.GET).type(RepresentationType.DOMAIN_OBJECT.getMediaType()).arguments(JsonRepresentation.newMap()).build());
+
+ return domainObjectLinkRepr;
+ }
+
+
+
+ /**
+ * For resourceProxy tests; returns the first entity in the list returned by invoking the 'list' action on the specified repo
+ */
+ public static RestfulResponse<DomainObjectRepresentation> domainObjectJaxrsResponse(RestfulClient client, String repoName) throws Exception {
+ return domainObjectJaxrsResponse(client, repoName, "list");
+ }
+
+ /**
+ * For resourceProxy tests; returns the first entity in the list returned by invoking the specified repo and action
+ */
+ public static RestfulResponse<DomainObjectRepresentation> domainObjectJaxrsResponse(RestfulClient client, String repoName, String actionName) throws Exception {
+ return domainObjectJaxrsResponse(client, repoName, actionName, 0);
+ }
+
+ /**
+ * For resourceProxy tests; returns the Nth entity in the list returned by invoking the specified repo and action
+ */
+ public static RestfulResponse<DomainObjectRepresentation> domainObjectJaxrsResponse(RestfulClient client, String repoName, String actionName, int idx) throws Exception {
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, repoName, actionName, idx);
+ DomainObjectRepresentation domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
+
+ final Response jaxrsResponse = client.getDomainObjectResource().object(domainObjectRepr.getDomainType(), domainObjectRepr.getInstanceId());
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
+ return restfulResponse;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java
new file mode 100644
index 0000000..4ca4583
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/all/stories/UserStoryTest_TOFIX.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.all.stories;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RepresentationWalker;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class UserStoryTest_TOFIX {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore("to get working again")
+ @Test
+ public void walkResources() throws Exception {
+
+ // given a response for an initial resource
+ final HomePageResource homePageResource = client.getHomePageResource();
+ final Response homePageResp = homePageResource.homePage();
+
+ // and given a walker starting from this response
+ final RepresentationWalker walker = client.createWalker(homePageResp);
+
+ // when walk the home pages' 'services' link
+ walker.walk("services");
+
+ // and when locate the ApplibValues repo and walk the its 'object' link
+ walker.walk("values[title=ApplibValues].links[rel=object]");
+
+ // and when locate the AppLibValues repo's "newEntity" action and walk
+ // to its details
+ walker.walk("values[objectMemberType=action].details");
+
+ // and when find the invoke body for the "newEntity" action and then
+ // walk the action using the body
+ final JsonRepresentation newEntityActionDetails = walker.getEntity();
+ final JsonRepresentation newEntityActionInvokeBody = newEntityActionDetails.getArray("invoke.body");
+ walker.walk("invoke", newEntityActionInvokeBody);
+
+ // and when walk the link to the returned object
+ walker.walk("link");
+
+ // then the returned object is created with its OID
+ final JsonRepresentation newEntityDomainObject = walker.getEntity();
+ assertThat(newEntityDomainObject.getString("_self.link.href"), matches(".+/objects/OID:[\\d]+$"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java
new file mode 100644
index 0000000..b81203e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/NotAuthorizedTest_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.any;
+
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class NotAuthorizedTest_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Ignore("TODO")
+ @Test
+ public void whenAuthenticated() throws Exception {
+
+ }
+
+ @Ignore("TODO")
+ @Test
+ public void whenNotAuthenticated() throws Exception {
+ // should return 401 (13.5)
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java
new file mode 100644
index 0000000..26b9614
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/any/errorhandling/AnyResourceTest_serverSideException.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.any.errorhandling;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.util.Parser;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class AnyResourceTest_serverSideException {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void runtimeException_isMapped() throws Exception {
+
+ // given
+ final RestfulRequest restfulReq = client.createRequest(RestfulHttpMethod.GET, "version");
+ final Header<Boolean> header = new Header<Boolean>("X-FAIL", Parser.forBoolean());
+ restfulReq.withHeader(header, true);
+
+ // when
+ final RestfulResponse<JsonRepresentation> jsonResp = restfulReq.execute();
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.METHOD_FAILURE));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java
new file mode 100644
index 0000000..88c2131
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Delete_then_405_bad.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.errors.ErrorRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private ErrorRepresentation errorRepresentation;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
+ final LinkRepresentation deleteLink = link.withMethod(RestfulHttpMethod.DELETE);
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting objects is not supported."));
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java
new file mode 100644
index 0000000..fc8bb1c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDisabledMembers_thenRepresentation_ok.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenDisabledMembers_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+ @Test
+ public void domainObjectWithDisabledMembers() throws Exception {
+
+ // given, when
+ final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("BSRL","75");
+
+ // property ('visibleButNotEditableProperty')
+ final JsonRepresentation properties = domainObjectRepr.getProperties();
+ final JsonRepresentation nameProperty = properties.getRepresentation("visibleButNotEditableProperty");
+ assertThat(nameProperty.getString("disabledReason"), is("Always disabled"));
+ }
+
+
+ private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
+ final DomainObjectResource domainObjectResource = client.getDomainObjectResource();
+
+ final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
+ final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ return domainObjectJsonResp.getEntity();
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..2982489
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore("TODO")
+ @Test
+ public void thenMembers() throws Exception {
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..8f4a162
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore("TODO")
+ @Test
+ public void thenMembers() throws Exception {
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
new file mode 100644
index 0000000..a107a4f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithActions_thenRepresentation_ok.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.*;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenEntityWithActions_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+ @Test
+ public void thenMembers() throws Exception {
+
+ // when
+ final Response jaxrsResponse = domainObjectResource.object("RTNE","78");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+
+ // then
+ domainObjectRepr = restfulResponse.getEntity();
+ assertThat(domainObjectRepr, is(not(nullValue())));
+
+
+ final LinkRepresentation self = domainObjectRepr.getSelf();
+
+ // then actions
+ final JsonRepresentation actions = domainObjectRepr.getActions();
+ assertThat(actions.size(), is(3));
+
+ final DomainObjectMemberRepresentation containsAction = domainObjectRepr.getAction("contains");
+ assertThat(containsAction.getString("memberType"), is("action"));
+ assertThat(containsAction.getString("id"), is("contains"));
+
+ LinkRepresentation containsActionLink = containsAction.getLinkWithRel(Rel.DETAILS.andParam("action", "contains"));
+ assertThat(containsActionLink.getRel(), is(Rel.DETAILS.andParam("action", "contains")));
+ assertThat(containsActionLink.getHref(), is(self.getHref() + "/actions/contains"));
+ assertThat(containsActionLink.getType(), is(RepresentationType.OBJECT_ACTION.getMediaType()));
+ assertThat(containsActionLink.getHttpMethod(), is(RestfulHttpMethod.GET));
+
+ // can also look up with abbreviated parameterized version of Rel
+ containsActionLink = containsAction.getLinkWithRel(Rel.DETAILS);
+ assertThat(containsActionLink.getRel(), is("urn:org.restfulobjects:rels/details;action=\"contains\""));
+ assertThat(containsActionLink.getHref(), is(self.getHref() + "/actions/contains"));
+ assertThat(containsActionLink.getType(), is(RepresentationType.OBJECT_ACTION.getMediaType()));
+ assertThat(containsActionLink.getHttpMethod(), is(RestfulHttpMethod.GET));
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..3f38f85
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+public class Get_givenEntityWithApplibProperties_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore("TODO")
+ @Test
+ public void thenMembers() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "ApplibValuedEntities");
+ domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
+
+ // and then members (types)
+ DomainObjectMemberRepresentation property;
+ ScalarValueRepresentation scalarRepr;
+
+
+ // copy from Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..0ea7f76
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithCollections_thenRepresentation_ok_TODO.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenEntityWithCollections_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+
+ @Test
+ public void thenCollections() throws Exception {
+
+ // when
+ final Response jaxrsResponse = domainObjectResource.object("PRMV","43");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+
+ // then
+
+ domainObjectRepr = restfulResponse.getEntity();
+ assertThat(domainObjectRepr, is(not(nullValue())));
+
+ // then collections
+
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java
new file mode 100644
index 0000000..a658574
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJdkProperties_thenRepresentation_ok.java
@@ -0,0 +1,160 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenEntityWithJdkProperties_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void thenMembers() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "JdkValuedEntities");
+ final RestfulResponse<JsonRepresentation> restResp = client.follow(link);
+ final JsonRepresentation entityRepr = restResp.getEntity();
+ domainObjectRepr = entityRepr.as(DomainObjectRepresentation.class);
+
+ // and then members (types)
+ DomainObjectMemberRepresentation property;
+ ScalarValueRepresentation scalarRepr;
+
+ property = domainObjectRepr.getProperty("bigDecimalProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("big-decimal(30,10)"));
+ assertThat(property.getXIsisFormat(), is("javamathbigdecimal"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ BigDecimal bigDecimal = scalarRepr.asBigDecimal(property.getFormat());
+ assertThat(bigDecimal, is(new BigDecimal("12345678901234567890.1234567890")));
+
+ property = domainObjectRepr.getProperty("bigDecimalProperty2");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("big-decimal(18,2)"));
+ assertThat(property.getXIsisFormat(), is("javamathbigdecimal"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ BigDecimal bigDecimal2 = scalarRepr.asBigDecimal(property.getFormat());
+ assertThat(bigDecimal2, is(new BigDecimal("123.45")));
+
+ property = domainObjectRepr.getProperty("bigIntegerProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("big-integer"));
+ assertThat(property.getXIsisFormat(), is("javamathbiginteger"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ BigInteger bigInteger = scalarRepr.asBigInteger(property.getFormat());
+ assertThat(bigInteger, is(new BigInteger("123456789012345678")));
+
+ property = domainObjectRepr.getProperty("bigIntegerProperty2");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("big-integer"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ BigInteger bigInteger2 = scalarRepr.asBigInteger(property.getFormat());
+ assertThat(bigInteger2, is(new BigInteger("12345")));
+
+ property = domainObjectRepr.getProperty("javaSqlDateProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("date"));
+ assertThat(property.getXIsisFormat(), is("javasqldate"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ assertThat(scalarRepr.asString(), is("2014-04-24"));
+ assertThat(scalarRepr.asDate(), is(asDate("2014-04-24")));
+
+ property = domainObjectRepr.getProperty("javaSqlTimeProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("time"));
+ assertThat(property.getXIsisFormat(), is("javasqltime"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ assertThat(scalarRepr.asString(), is("12:34:45"));
+ assertThat(scalarRepr.asTime(), is(asDateTime("1970-01-01T12:34:45Z")));
+
+ property = domainObjectRepr.getProperty("javaSqlTimestampProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("utc-millisec"));
+ assertThat(property.getXIsisFormat(), is("javasqltimestamp"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isInt() || scalarRepr.isLong(), is(true));
+ Long aLong = scalarRepr.asLong();
+ assertThat(aLong, is(new Long("1234567890")));
+
+ property = domainObjectRepr.getProperty("javaUtilDateProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("date-time"));
+ assertThat(property.getXIsisFormat(), is("javautildate"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ Date utilDate = scalarRepr.asDateTime();
+ assertThat(utilDate, is(asDateTime("2013-05-25T12:34:45Z")));
+ assertThat(scalarRepr.asString(), is("2013-05-25T12:34:45Z"));
+
+ property = domainObjectRepr.getProperty("myEnum");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("string"));
+ assertThat(property.getXIsisFormat(), is("string"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ String myEnumStr = scalarRepr.asString();
+ assertThat(myEnumStr, is("RED"));
+ }
+
+
+ private static Date asDate(final String text) {
+ return new java.util.Date(JsonRepresentation.yyyyMMdd.withZoneUTC().parseDateTime(text).getMillis());
+ }
+
+ private static Date asDateTime(final String text) {
+ return new java.util.Date(JsonRepresentation.yyyyMMddTHHmmssZ.withZoneUTC().parseDateTime(text).getMillis());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java
new file mode 100644
index 0000000..e6b55d7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithJodaProperties_thenRepresentation_ok.java
@@ -0,0 +1,122 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import java.util.Date;
+import org.joda.time.LocalDateTime;
+import org.joda.time.format.ISODateTimeFormat;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.*;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenEntityWithJodaProperties_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectRepresentation domainObjectRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void thenMembers() throws Exception {
+
+ // when
+ final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "JodaValuedEntities");
+ domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
+
+ // and then members (types)
+ DomainObjectMemberRepresentation property;
+ ScalarValueRepresentation scalarRepr;
+
+ property = domainObjectRepr.getProperty("dateTimeProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("date-time"));
+ assertThat(property.getXIsisFormat(), is("jodadatetime"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ assertThat(scalarRepr.asDateTime(), is(asDateTime("2010-03-31T09:50:43Z")));
+ assertThat(scalarRepr.asString(), is("2010-03-31T09:50:43Z"));
+
+ property = domainObjectRepr.getProperty("localDateProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("date"));
+ assertThat(property.getXIsisFormat(), is("jodalocaldate"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+ assertThat(scalarRepr.asDate(), is(asDate("2008-03-21")));
+ assertThat(scalarRepr.asString(), is("2008-03-21"));
+
+ property = domainObjectRepr.getProperty("localDateTimeProperty");
+ assertThat(property.getMemberType(), is("property"));
+ assertThat(property.getFormat(), is("date-time"));
+ assertThat(property.getXIsisFormat(), is("jodalocaldatetime"));
+ scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
+ assertThat(scalarRepr.isString(), is(true));
+
+ final LocalDateTime expected = new LocalDateTime(2009, 4, 29, 13, 45, 22);
+
+ assertThat(scalarRepr.asDateTime(), is(expected.toDate()));
+ assertThat(scalarRepr.asString(), is(ISODateTimeFormat.dateTimeNoMillis().withZoneUTC().print(expected.toDateTime())));
+
+ // and then member types have links to details (selected ones inspected only)
+ property = domainObjectRepr.getProperty("localDateProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/JODA\\/\\d+\\/properties\\/localDateProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+
+ property = domainObjectRepr.getProperty("localDateTimeProperty");
+ assertThat(property.getLinkWithRel(Rel.DETAILS),
+ isLink()
+ .href(matches(".+\\/objects\\/JODA\\/\\d+\\/properties\\/localDateTimeProperty"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
+ }
+
+ private static Date asDate(final String text) {
+ return new java.util.Date(JsonRepresentation.yyyyMMdd.withZoneUTC().parseDateTime(text).getMillis());
+ }
+
+ private static Date asDateTime(final String text) {
+ return new java.util.Date(JsonRepresentation.yyyyMMddTHHmmssZ.withZoneUTC().parseDateTime(text).getMillis());
+ }
+
+}
[21/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java
deleted file mode 100644
index 6f4c0b4..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/DateTimeValuedEntityRepository.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("DateTimeValuedEntities")
-@ObjectType("DateTimeValuedEntities")
-public class DateTimeValuedEntityRepository extends AbstractEntityRepository<DateTimeValuedEntity> {
-
- public DateTimeValuedEntityRepository() {
- super(DateTimeValuedEntity.class, "DateTimeValuedEntities");
- }
-
- /**
- * Required to discover the DateTimeValueEntity type.
- */
- @Override
- @MemberOrder(sequence = "2")
- public DateTimeValuedEntity newEntity() {
- return super.newEntity();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java
deleted file mode 100644
index 43cd3fe..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntity.java
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.util.Date;
-import javax.validation.constraints.Digits;
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("JDKV")
-@javax.jdo.annotations.Query(
- name="jdkv_findByStringProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.scalars.JdkValuedEntity WHERE stringProperty == :i")
-@ObjectType("JDKV")
-public class JdkValuedEntity extends AbstractDomainObject {
-
- // {{ StringProperty (also title, pk)
- private String stringProperty;
-
- @javax.jdo.annotations.PrimaryKey
- @Title
- @Optional
- @MemberOrder(sequence = "1")
- public String getStringProperty() {
- return stringProperty;
- }
-
- public void setStringProperty(final String description) {
- this.stringProperty = description;
- }
-
- // }}
-
- // {{ JavaUtilDateProperty
- private Date javaUtilDateProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Date getJavaUtilDateProperty() {
- return javaUtilDateProperty;
- }
-
- public void setJavaUtilDateProperty(final Date javaUtilDateProperty) {
- this.javaUtilDateProperty = javaUtilDateProperty;
- }
-
- // }}
-
- // {{ JavaSqlDateProperty
- private java.sql.Date javaSqlDateProperty;
-
- @javax.jdo.annotations.Persistent() // since not persistent by default
- @Optional
- @MemberOrder(sequence = "1")
- public java.sql.Date getJavaSqlDateProperty() {
- return javaSqlDateProperty;
- }
-
- public void setJavaSqlDateProperty(final java.sql.Date javaSqlDateProperty) {
- this.javaSqlDateProperty = javaSqlDateProperty;
- }
-
- // }}
-
- // {{ JavaSqlTimeProperty (property)
- @javax.jdo.annotations.Persistent() // since not persistent by default
- private java.sql.Time javaSqlTimeProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public java.sql.Time getJavaSqlTimeProperty() {
- return javaSqlTimeProperty;
- }
-
- public void setJavaSqlTimeProperty(final java.sql.Time javaSqlTimeProperty) {
- this.javaSqlTimeProperty = javaSqlTimeProperty;
- }
- // }}
-
-
-
- // {{ JavaSqlTimestampProperty
- @javax.jdo.annotations.Persistent() // since not persistent by default
- private java.sql.Timestamp javaSqlTimestampProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public java.sql.Timestamp getJavaSqlTimestampProperty() {
- return javaSqlTimestampProperty;
- }
-
- public void setJavaSqlTimestampProperty(final java.sql.Timestamp javaSqlTimestampProperty) {
- this.javaSqlTimestampProperty = javaSqlTimestampProperty;
- }
-
- // }}
-
- // {{ BigIntegerProperty (to hold values that are larger than a long)
- private BigInteger bigIntegerProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public BigInteger getBigIntegerProperty() {
- return bigIntegerProperty;
- }
-
- public void setBigIntegerProperty(final BigInteger bigIntegerProperty) {
- this.bigIntegerProperty = bigIntegerProperty;
- }
-
- // }}
-
- // {{ BigIntegerProperty2 (to hold values that can also fit into a long)
- private BigInteger bigIntegerProperty2;
-
- @Optional
- @MemberOrder(sequence = "1")
- public BigInteger getBigIntegerProperty2() {
- return bigIntegerProperty2;
- }
-
- public void setBigIntegerProperty2(final BigInteger bigIntegerProperty2) {
- this.bigIntegerProperty2 = bigIntegerProperty2;
- }
-
- // }}
-
- // {{ BigDecimalProperty (to hold values that are larger than a double)
- private BigDecimal bigDecimalProperty;
-
- @Digits(integer=20,fraction = 10) // corresponds to big-decimal(30,10)
- @Optional
- @MemberOrder(sequence = "1")
- public BigDecimal getBigDecimalProperty() {
- return bigDecimalProperty;
- }
-
- public void setBigDecimalProperty(final BigDecimal bigDecimalProperty) {
- this.bigDecimalProperty = bigDecimalProperty;
- }
-
- // }}
-
-
- // {{ BigDecimalProperty (to hold values that are larger than a double)
- private BigDecimal bigDecimalProperty2;
-
- @Optional
- @MemberOrder(sequence = "1")
- public BigDecimal getBigDecimalProperty2() {
- return bigDecimalProperty2;
- }
-
- public void setBigDecimalProperty2(final BigDecimal bigDecimalProperty2) {
- this.bigDecimalProperty2 = bigDecimalProperty2;
- }
-
- // }}
-
-
- // {{ MyEnum (property)
- private MyEnum myEnum;
-
- @javax.jdo.annotations.Persistent
- @Optional
- @MemberOrder(sequence = "1")
- public MyEnum getMyEnum() {
- return myEnum;
- }
-
- public void setMyEnum(final MyEnum myEnum) {
- this.myEnum = myEnum;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java
deleted file mode 100644
index 9a0624e..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JdkValuedEntityRepository.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("JdkValuedEntities")
-@ObjectType("JdkValuedEntities")
-@DomainService
-public class JdkValuedEntityRepository extends AbstractEntityRepository<JdkValuedEntity> {
-
- public JdkValuedEntityRepository() {
- super(JdkValuedEntity.class, "JdkValuedEntities");
- }
-
- /**
- * Required to discover the JdkValueEntity type.
- */
- @Override
- @MemberOrder(sequence = "2")
- public JdkValuedEntity newEntity() {
- return super.newEntity();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java
deleted file mode 100644
index cc0e81c..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntity.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("JODA")
-@javax.jdo.annotations.Query(
- name="joda_findByStringProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.scalars.JdkValuedEntity WHERE stringProperty == :i")
-@ObjectType("JODA")
-public class JodaValuedEntity extends AbstractDomainObject {
-
- // {{ StringProperty (also title, pk)
- private String stringProperty;
-
- @javax.jdo.annotations.PrimaryKey
- @Title
- @Optional
- @MemberOrder(sequence = "1")
- public String getStringProperty() {
- return stringProperty;
- }
-
- public void setStringProperty(final String stringProperty) {
- this.stringProperty = stringProperty;
- }
-
- public JodaValuedEntity updateStringProperty(
- @Optional final String stringProperty) {
- setStringProperty(stringProperty);
- return this;
- }
-
- // }}
-
- // {{ LocalDateProperty
- private LocalDate localDateProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public LocalDate getLocalDateProperty() {
- return localDateProperty;
- }
-
- public void setLocalDateProperty(final LocalDate localDateProperty) {
- this.localDateProperty = localDateProperty;
- }
-
- public JodaValuedEntity updateLocalDateProperty(
- @Optional final LocalDate localDateProperty) {
- setLocalDateProperty(localDateProperty);
- return this;
- }
- // }}
-
-
- // {{ LocalDateTimeProperty
- private LocalDateTime localDateTimeProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public LocalDateTime getLocalDateTimeProperty() {
- return localDateTimeProperty;
- }
-
- public void setLocalDateTimeProperty(final LocalDateTime localDateTimeProperty) {
- this.localDateTimeProperty = localDateTimeProperty;
- }
-
- public JodaValuedEntity updateLocalDateTimeProperty(
- @Optional final LocalDateTime localDateTimeProperty) {
- setLocalDateTimeProperty(localDateTimeProperty);
- return this;
- }
- // }}
-
-
- // {{ DateTimeProperty
- private DateTime dateTimeProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public DateTime getDateTimeProperty() {
- return dateTimeProperty;
- }
-
- public void setDateTimeProperty(final DateTime dateTimeProperty) {
- this.dateTimeProperty = dateTimeProperty;
- }
-
- public JodaValuedEntity updateDateTimeProperty(
- @Optional final DateTime dateTimeProperty) {
- setDateTimeProperty(dateTimeProperty);
- return this;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java
deleted file mode 100644
index 8f46899..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/JodaValuedEntityRepository.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("JodaValuedEntities")
-@ObjectType("JodaValuedEntities")
-@DomainService
-public class JodaValuedEntityRepository extends AbstractEntityRepository<JodaValuedEntity> {
-
- public JodaValuedEntityRepository() {
- super(JodaValuedEntity.class, "JodaValuedEntities");
- }
-
- /**
- * Required to discover the JodaValueEntity type.
- */
- @Override
- @MemberOrder(sequence = "2")
- public JodaValuedEntity newEntity() {
- return super.newEntity();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java
deleted file mode 100644
index edcd676..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/MyEnum.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.tck.dom.scalars;
-
-public enum MyEnum {
- RED,
- ORANGE,
- YELLOW,
- GREEN,
- BLUE,
- INDIGO,
- VIOLET
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java
deleted file mode 100644
index fc8cefa..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntity.java
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("PRMV")
-@javax.jdo.annotations.Query(
- name="prmv_findByIntProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity WHERE intProperty == :i")
-@ObjectType("PRMV")
-public class PrimitiveValuedEntity extends AbstractDomainObject {
-
-
- // {{ Id (Integer)
- private Integer id;
-
- @Title(prepend="Primitive Valued Entity #")
- @javax.jdo.annotations.PrimaryKey // must be on the getter.
- public Integer getId() {
- return id;
- }
-
- public void setId(final Integer id) {
- this.id = id;
- }
- // }}
-
-
- // {{ BooleanProperty
- private boolean booleanProperty;
-
- @MemberOrder(sequence = "3")
- public boolean getBooleanProperty() {
- return booleanProperty;
- }
-
- public void setBooleanProperty(final boolean booleanProperty) {
- this.booleanProperty = booleanProperty;
- }
-
- public PrimitiveValuedEntity updateBooleanProperty(
- final boolean booleanProperty) {
- setBooleanProperty(booleanProperty);
- return this;
- }
- // }}
-
- // {{ ByteProperty
- private byte byteProperty;
-
- @MemberOrder(sequence = "1")
- public byte getByteProperty() {
- return byteProperty;
- }
-
- public void setByteProperty(final byte byteProperty) {
- this.byteProperty = byteProperty;
- }
-
- public PrimitiveValuedEntity updateByteProperty(
- final byte byteProperty) {
- setByteProperty(byteProperty);
- return this;
- }
-
- // }}
-
- // {{ ShortProperty
- private short shortProperty;
-
- @MemberOrder(sequence = "1")
- public short getShortProperty() {
- return shortProperty;
- }
-
- public void setShortProperty(final short shortProperty) {
- this.shortProperty = shortProperty;
- }
-
- public PrimitiveValuedEntity updateShortProperty(
- final short shortProperty) {
- setShortProperty(shortProperty);
- return this;
- }
-
- // }}
-
- // {{ IntProperty
- private int intProperty;
-
- @MemberOrder(sequence = "1")
- public int getIntProperty() {
- return intProperty;
- }
-
- public void setIntProperty(final int intProperty) {
- this.intProperty = intProperty;
- }
-
- public PrimitiveValuedEntity updateIntProperty(
- final int intProperty) {
- setIntProperty(intProperty);
- return this;
- }
-
- // }}
-
- // {{ LongProperty
- private long longProperty;
-
- @MemberOrder(sequence = "1")
- public long getLongProperty() {
- return longProperty;
- }
-
- public void setLongProperty(final long longProperty) {
- this.longProperty = longProperty;
- }
-
- public PrimitiveValuedEntity updateLongProperty(
- final long longProperty) {
- setLongProperty(longProperty);
- return this;
- }
-
- // }}
-
- // {{ FloatProperty
- private float floatProperty;
-
- @MemberOrder(sequence = "1")
- public float getFloatProperty() {
- return floatProperty;
- }
-
- public void setFloatProperty(final float floatProperty) {
- this.floatProperty = floatProperty;
- }
-
- public PrimitiveValuedEntity updateFloatProperty(
- final float floatProperty) {
- setFloatProperty(floatProperty);
- return this;
- }
-
- // }}
-
- // {{ DoubleProperty
- private double doubleProperty;
-
- @MemberOrder(sequence = "1")
- public double getDoubleProperty() {
- return doubleProperty;
- }
-
- public void setDoubleProperty(final double doubleProperty) {
- this.doubleProperty = doubleProperty;
- }
-
- public PrimitiveValuedEntity updateDoubleProperty(
- final double doubleProperty) {
- setDoubleProperty(doubleProperty);
- return this;
- }
-
- // }}
-
-
- // {{ CharProperty
- @javax.jdo.annotations.Column(jdbcType="char") // for hsqldb
- //@javax.jdo.annotations.Column(jdbcType="char", sqlType="char") // for mssqlserver
- private char charProperty;
-
- @MemberOrder(sequence = "1")
- public char getCharProperty() {
- return charProperty;
- }
-
- public void setCharProperty(final char charProperty) {
- this.charProperty = charProperty;
- }
-
- public PrimitiveValuedEntity updateCharProperty(
- final char charProperty) {
- setCharProperty(charProperty);
- return this;
- }
-
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java
deleted file mode 100644
index aa84d55..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/PrimitiveValuedEntityRepository.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.applib.query.Query;
-import org.apache.isis.applib.query.QueryDefault;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("PrimitiveValuedEntities")
-@ObjectType("PrimitiveValuedEntities")
-@DomainService
-public class PrimitiveValuedEntityRepository extends AbstractEntityRepository<PrimitiveValuedEntity> {
-
- public PrimitiveValuedEntityRepository() {
- super(PrimitiveValuedEntity.class, "PrimitiveValuedEntities");
- }
-
- @QueryOnly
- @MemberOrder(sequence = "1")
- public PrimitiveValuedEntity findById(int id) {
- final Query<PrimitiveValuedEntity> query =
- new QueryDefault<PrimitiveValuedEntity>(PrimitiveValuedEntity.class, PrimitiveValuedEntity.class.getName() + "#pk", "id", id);
- return this.firstMatch(query);
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java
deleted file mode 100644
index a926b25..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("WRPV")
-@javax.jdo.annotations.Query(
- name="wrpv_findByStringProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.scalars.WrapperValuedEntity WHERE stringProperty == :i")
-@ObjectType("WRPV")
-public class WrapperValuedEntity extends AbstractDomainObject {
-
- // {{ StringProperty (also pk, title)
- private String stringProperty;
-
- @javax.jdo.annotations.PrimaryKey
- @Title
- @Optional
- @MemberOrder(sequence = "1")
- public String getStringProperty() {
- return stringProperty;
- }
-
- public void setStringProperty(final String stringProperty) {
- this.stringProperty = stringProperty;
- }
-
- public WrapperValuedEntity updateStringProperty(
- @Optional final String stringProperty) {
- setStringProperty(stringProperty);
- return this;
- }
-
- // }}
-
- // {{ BooleanProperty
- private Boolean booleanProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Boolean getBooleanProperty() {
- return booleanProperty;
- }
-
- public void setBooleanProperty(final Boolean booleanProperty) {
- this.booleanProperty = booleanProperty;
- }
-
- public WrapperValuedEntity updateBooleanProperty(@Optional final Boolean booleanProperty) {
- setBooleanProperty(booleanProperty);
- return this;
- }
-
- // }}
-
- // {{ ByteProperty
- private Byte byteProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Byte getByteProperty() {
- return byteProperty;
- }
-
- public void setByteProperty(final Byte byteProperty) {
- this.byteProperty = byteProperty;
- }
-
- public WrapperValuedEntity updateByteProperty(
- @Optional final Byte byteProperty) {
- setByteProperty(byteProperty);
- return this;
- }
-
- // }}
-
- // {{ ShortProperty
- private Short shortProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Short getShortProperty() {
- return shortProperty;
- }
-
- public void setShortProperty(final Short shortProperty) {
- this.shortProperty = shortProperty;
- }
-
- public WrapperValuedEntity updateShortProperty(
- @Optional final Short shortProperty) {
- setShortProperty(shortProperty);
- return this;
- }
-
- // }}
-
- // {{ IntegerProperty
- private Integer integerProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Integer getIntegerProperty() {
- return integerProperty;
- }
-
- public void setIntegerProperty(final Integer integerProperty) {
- this.integerProperty = integerProperty;
- }
-
- public WrapperValuedEntity updateIntegerProperty(
- @Optional final Integer integerProperty) {
- setIntegerProperty(integerProperty);
- return this;
- }
-
- // }}
-
- // {{ LongProperty
- private Long longProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Long getLongProperty() {
- return longProperty;
- }
-
- public void setLongProperty(final Long longProperty) {
- this.longProperty = longProperty;
- }
-
- public WrapperValuedEntity updateLongProperty(
- @Optional final Long longProperty) {
- setLongProperty(longProperty);
- return this;
- }
-
- // }}
-
- // {{ FloatProperty
- private Float floatProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Float getFloatProperty() {
- return floatProperty;
- }
-
- public void setFloatProperty(final Float floatProperty) {
- this.floatProperty = floatProperty;
- }
-
- public WrapperValuedEntity updateFloatProperty(
- @Optional final Float floatProperty) {
- setFloatProperty(floatProperty);
- return this;
- }
-
- // }}
-
- // {{ DoubleProperty
- private Double doubleProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Double getDoubleProperty() {
- return doubleProperty;
- }
-
- public void setDoubleProperty(final Double doubleProperty) {
- this.doubleProperty = doubleProperty;
- }
-
- public WrapperValuedEntity updateDoubleProperty(
- @Optional final Double doubleProperty) {
- setDoubleProperty(doubleProperty);
- return this;
- }
-
- // }}
-
- // {{ CharacterProperty (property)
- @javax.jdo.annotations.Column(jdbcType="char") // works for hsqldb
- //@javax.jdo.annotations.Column(jdbcType="char", sqlType="char") // works for mssqlserver
- private Character characterProperty;
-
- @Optional
- @MemberOrder(sequence = "1")
- public Character getCharacterProperty() {
- return characterProperty;
- }
-
- public void setCharacterProperty(final Character charProperty) {
- this.characterProperty = charProperty;
- }
-
- public WrapperValuedEntity updateCharacterProperty(
- @Optional final Character charProperty) {
- setCharacterProperty(charProperty);
- return this;
- }
-
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java
deleted file mode 100644
index e9f9eb9..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.scalars;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("WrapperValues")
-@ObjectType("WrapperValues")
-@DomainService
-public class WrapperValuedEntityRepository extends AbstractEntityRepository<WrapperValuedEntity> {
-
- public WrapperValuedEntityRepository() {
- super(WrapperValuedEntity.class, "WrapperValuedEntities");
- }
-
- /**
- * Required to discover the WrapperValuedEntity type.
- */
- @Override
- @MemberOrder(sequence = "2")
- public WrapperValuedEntity newEntity() {
- return super.newEntity();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java
deleted file mode 100644
index 07a648d..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.sqlos;
-
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.core.tck.dom.poly.Empty;
-import org.apache.isis.core.tck.dom.poly.ReferencingPolyTypesEntity;
-import org.apache.isis.core.tck.dom.poly.SelfReferencingEntity;
-import org.apache.isis.core.tck.dom.poly.StringBaseEntitySub;
-import org.apache.isis.core.tck.dom.poly.StringBaseEntitySubThree;
-import org.apache.isis.core.tck.dom.poly.StringBaseEntitySubTwo;
-import org.apache.isis.core.tck.dom.poly.Stringable;
-import org.apache.isis.core.tck.dom.poly.StringableEntityWithOwnProperties;
-import org.apache.isis.core.tck.dom.poly.StringableEntityWithOwnProperty;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.sqlos.data.SimpleClass;
-import org.apache.isis.core.tck.dom.sqlos.data.SimpleClassTwo;
-import org.apache.isis.core.tck.dom.sqlos.data.SqlDataClass;
-
-/**
- * @author Kevin
- *
- */
-public class SqlDomainObjectRepository extends AbstractFactoryAndRepository {
-
- // {{ Persistor actions
- public void save(final Object sqlDataClass) {
- persistIfNotAlready(sqlDataClass);
- }
-
- public void delete(final Object sqlDataClass) {
- remove(sqlDataClass);
- }
-
- public void update(final Object object) {
- getContainer().objectChanged(object);
- }
-
- public void resolve(final Object domainObject) {
- getContainer().resolve(domainObject);
- }
-
- // }}
-
- // SqlDataClass
- public List<SqlDataClass> allDataClasses() {
- return allInstances(SqlDataClass.class);
- }
-
- public SqlDataClass newDataClass() {
- final SqlDataClass object = newTransientInstance(SqlDataClass.class);
- return object;
- }
-
-
- // SimpleClass
- public SimpleClass newSimpleClass() {
- final SimpleClass object = newTransientInstance(SimpleClass.class);
- return object;
- }
-
- public List<SimpleClass> allSimpleClasses() {
- return allInstances(SimpleClass.class);
- }
-
- public List<SimpleClass> allSimpleClassesThatMatch(final SimpleClass simpleClassMatch) {
- return allMatches(SimpleClass.class, simpleClassMatch);
- }
-
-
- // SimpleClassTwo
- public List<SimpleClassTwo> allSimpleClassTwos() {
- return allInstances(SimpleClassTwo.class);
- }
-
- public SimpleClassTwo newSimpleClassTwo() {
- final SimpleClassTwo object = newTransientInstance(SimpleClassTwo.class);
- return object;
- }
-
- // PrimitiveValuedEntity
- public List<PrimitiveValuedEntity> allPrimitiveValueEntities() {
- return allInstances(PrimitiveValuedEntity.class);
- }
-
- public PrimitiveValuedEntity newPrimitiveValuedEntity() {
- return newTransientInstance(PrimitiveValuedEntity.class);
- }
-
- public List<PrimitiveValuedEntity> allPrimitiveValuedEntitiesThatMatch(final PrimitiveValuedEntity match) {
- return allMatches(PrimitiveValuedEntity.class, match);
- }
-
-
- // PolyTestClass
- public ReferencingPolyTypesEntity newPolyTestClass() {
- final ReferencingPolyTypesEntity object = newTransientInstance(ReferencingPolyTypesEntity.class);
- return object;
- }
-
- public List<ReferencingPolyTypesEntity> allPolyTestClasses() {
- return allInstances(ReferencingPolyTypesEntity.class);
- }
-
- public StringBaseEntitySub newPolySubClassOne() {
- final StringBaseEntitySub object = newTransientInstance(StringBaseEntitySub.class);
- return object;
- }
-
- public StringBaseEntitySubThree newPolySubClassThree() {
- final StringBaseEntitySubThree object = newTransientInstance(StringBaseEntitySubThree.class);
- return object;
- }
-
- public StringBaseEntitySubTwo newPolySubClassTwo() {
- final StringBaseEntitySubTwo object = newTransientInstance(StringBaseEntitySubTwo.class);
- return object;
- }
-
- public StringableEntityWithOwnProperty newPolyInterfaceImplA() {
- final StringableEntityWithOwnProperty object = newTransientInstance(StringableEntityWithOwnProperty.class);
- return object;
- }
-
- public StringableEntityWithOwnProperties newPolyInterfaceImplB() {
- final StringableEntityWithOwnProperties object = newTransientInstance(StringableEntityWithOwnProperties.class);
- return object;
- }
-
- public SelfReferencingEntity newPolySelfRefClass() {
- final SelfReferencingEntity object = newTransientInstance(SelfReferencingEntity.class);
- return object;
- }
-
- public List<Stringable> allPolyInterfaces() {
- return allInstances(Stringable.class);
- }
-
- public List<Stringable> queryPolyInterfaces(final Stringable query) {
- return allMatches(Stringable.class, query);
- }
-
- public List<Empty> allEmptyInterfacesThatMatch(final Empty match) {
- return allMatches(Empty.class, match);
- }
-
- public List<SimpleClass> someSimpleClasses(final long startIndex, final long rowCount) {
- return allInstances(SimpleClass.class, startIndex, rowCount);
- }
-
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java
deleted file mode 100644
index 0b9888d..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.sqlos.data;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-/**
- * @author Kevin
- *
- */
-public class SimpleClass extends AbstractDomainObject {
- public String title() {
- return string;
- }
-
- // {{ String type
- private String string;
-
- public String getString() {
- return string;
- }
-
- public void setString(final String string) {
- this.string = string;
- }
-
- // }}
-
- // {{ SimpleClassTwoA
- private SimpleClassTwo simplyClassTwoA;
-
- public SimpleClassTwo getSimpleClassTwoA() {
- return simplyClassTwoA;
- }
-
- public void setSimpleClassTwoA(final SimpleClassTwo simpleClassTwoA) {
- this.simplyClassTwoA = simpleClassTwoA;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java
deleted file mode 100644
index 8fddc22..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.sqlos.data;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-/**
- * @author Kevin
- *
- */
-public class SimpleClassTwo extends AbstractDomainObject {
-
- public String title() {
- return text;
- }
-
- // {{ String type
- public String text;
-
- public String getText() {
- return text;
- }
-
- public void setText(final String text) {
- this.text = text;
- }
-
- // }}
-
- // {{ IntValue
- private int intValue;
-
- public int getIntValue() {
- return intValue;
- }
-
- public void setIntValue(final int value) {
- this.intValue = value;
- }
-
- // }}
-
- // {{ BooleanValue
- private boolean booleanValue;
-
- public boolean getBooleanValue() {
- return booleanValue;
- }
-
- public void setBooleanValue(final boolean value) {
- this.booleanValue = value;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java
deleted file mode 100644
index c1c604b..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java
+++ /dev/null
@@ -1,338 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.sqlos.data;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.value.Color;
-import org.apache.isis.applib.value.Date;
-import org.apache.isis.applib.value.DateTime;
-import org.apache.isis.applib.value.Image;
-import org.apache.isis.applib.value.Money;
-import org.apache.isis.applib.value.Password;
-import org.apache.isis.applib.value.Percentage;
-import org.apache.isis.applib.value.Time;
-import org.apache.isis.applib.value.TimeStamp;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-
-/**
- * The SqlDataClass is a test class used in the sql-persistor integration tests.
- * It's properties are stored and retrieved using the persistor, to confirm
- * accurate persistence behaviour.
- *
- * Each property here requires an equivalent test in
- * {@link SqlIntegrationTestCommon}
- *
- * @author Kevin Meyer
- *
- */
-
-public class SqlDataClass extends AbstractDomainObject {
-
- public String title() {
- return string;
- }
-
- // {{ String
- private String string;
-
- public String getString() {
- return string;
- }
-
- public void setString(final String string) {
- this.string = string;
- }
-
- // }}
-
- // {{ Isis Date
- private Date date;
-
- public Date getDate() {
- return date;
- }
-
- public void setDate(final Date date) {
- this.date = date;
- }
-
- // }}
-
- // {{ java.sql Date
- private java.sql.Date sqlDate;
-
- @MemberOrder(sequence = "1")
- public java.sql.Date getSqlDate() {
- return sqlDate;
- }
-
- public void setSqlDate(final java.sql.Date sqlDate) {
- this.sqlDate = sqlDate;
- }
-
- /**/
-
- // }}
-
- // {{ Isis Money
- private Money money;
-
- @MemberOrder(sequence = "1")
- public Money getMoney() {
- return money;
- }
-
- public void setMoney(final Money money) {
- this.money = money;
- }
-
- // }}
-
- // {{ Isis DateTime
- private DateTime dateTime;
-
- @MemberOrder(sequence = "1")
- public DateTime getDateTime() {
- return dateTime;
- }
-
- public void setDateTime(final DateTime dateTime) {
- this.dateTime = dateTime;
- }
-
- // }}
-
- // {{ Isis TimeStamp
- private TimeStamp timeStamp;
-
- @MemberOrder(sequence = "1")
- public TimeStamp getTimeStamp() {
- return timeStamp;
- }
-
- public void setTimeStamp(final TimeStamp timeStamp) {
- this.timeStamp = timeStamp;
- }
-
- // }}
-
- // {{ Isis Time
- private Time time;
-
- @MemberOrder(sequence = "1")
- public Time getTime() {
- return time;
- }
-
- public void setTime(final Time time) {
- this.time = time;
- }
-
- // }}
-
- // {{ Isis Color
- private Color color;
-
- @MemberOrder(sequence = "1")
- public Color getColor() {
- return color;
- }
-
- public void setColor(final Color color) {
- this.color = color;
- }
-
- // }}
-
- // {{ Isis Image
- private Image image;
-
- @MemberOrder(sequence = "1")
- public Image getImage() {
- return image;
- }
-
- public void setImage(final Image image) {
- this.image = image;
- }
- // }}
-
- // {{ Isis Password
- private Password password;
-
- @MemberOrder(sequence = "1")
- public Password getPassword() {
- return password;
- }
-
- public void setPassword(final Password password) {
- this.password = password;
- }
-
- // }}
-
- // {{ Isis Percentage
- private Percentage percentage;
-
- @MemberOrder(sequence = "1")
- public Percentage getPercentage() {
- return percentage;
- }
-
- public void setPercentage(final Percentage percentage) {
- this.percentage = percentage;
- }
-
- // }}
-
-
- //
- // References to other entities
- //
-
- // {{ SimpleClasses
- public List<SimpleClass> simpleClasses1 = new ArrayList<SimpleClass>();
-
- @MemberOrder(sequence = "1")
- public List<SimpleClass> getSimpleClasses1() {
- return simpleClasses1;
- }
-
- public void setSimpleClasses1(final List<SimpleClass> simpleClasses) {
- this.simpleClasses1 = simpleClasses;
- }
-
- public void addToSimpleClasses1(final SimpleClass simpleClass) {
- // check for no-op
- if (simpleClass == null || getSimpleClasses1().contains(simpleClass)) {
- return;
- }
- // associate new
- getSimpleClasses1().add(simpleClass);
- // additional business logic
- onAddToSimpleClasses1(simpleClass);
- }
-
- public void removeFromSimpleClasses1(final SimpleClass simpleClass) {
- // check for no-op
- if (simpleClass == null || !getSimpleClasses1().contains(simpleClass)) {
- return;
- }
- // dissociate existing
- getSimpleClasses1().remove(simpleClass);
- // additional business logic
- onRemoveFromSimpleClasses1(simpleClass);
- }
-
- protected void onAddToSimpleClasses1(final SimpleClass simpleClass) {
- }
-
- protected void onRemoveFromSimpleClasses1(final SimpleClass simpleClass) {
- }
-
- // }}
-
- // {{ SimpleClasses2
- /**/
- private List<SimpleClass> simpleClasses2 = new ArrayList<SimpleClass>();
-
- @MemberOrder(sequence = "1")
- public List<SimpleClass> getSimpleClasses2() {
- return simpleClasses2;
- }
-
- public void setSimpleClasses2(final List<SimpleClass> simpleClasses) {
- this.simpleClasses2 = simpleClasses;
- }
-
- public void addToSimpleClasses2(final SimpleClass simpleClass) {
- // check for no-op
- if (simpleClass == null || getSimpleClasses2().contains(simpleClass)) {
- return;
- }
- // associate new
- getSimpleClasses2().add(simpleClass);
- // additional business logic
- onAddToSimpleClasses2(simpleClass);
- }
-
- public void removeFromSimpleClasses2(final SimpleClass simpleClass) {
- // check for no-op
- if (simpleClass == null || !getSimpleClasses2().contains(simpleClass)) {
- return;
- }
- // dissociate existing
- getSimpleClasses2().remove(simpleClass);
- // additional business logic
- onRemoveFromSimpleClasses2(simpleClass);
- }
-
- protected void onAddToSimpleClasses2(final SimpleClass simpleClass) {
- }
-
- protected void onRemoveFromSimpleClasses2(final SimpleClass simpleClass) {
- }
-
- /**/
- // }}
-
- // {{ SimpleClassTwo
- private SimpleClassTwo simplyClassTwo;
-
- public SimpleClassTwo getSimpleClassTwo() {
- return simplyClassTwo;
- }
-
- public void setSimpleClassTwo(final SimpleClassTwo simpleClassTwo) {
- this.simplyClassTwo = simpleClassTwo;
- }
-
- // }}
-
- // {{ PrimitiveValuedEntityMax
- private PrimitiveValuedEntity pveMax;
-
- public PrimitiveValuedEntity getPrimitiveValuedEntityMax() {
- return pveMax;
- }
-
- public void setPrimitiveValuedEntityMax(final PrimitiveValuedEntity pveMax) {
- this.pveMax = pveMax;
- }
-
- // }}
-
- // {{ PrimitiveValuedEntityMin
- private PrimitiveValuedEntity pveMin;
-
- public PrimitiveValuedEntity getPrimitiveValuedEntityMin() {
- return pveMin;
- }
-
- public void setPrimitiveValuedEntityMin(final PrimitiveValuedEntity pveMin) {
- this.pveMin = pveMin;
- }
-
- // }}
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java
deleted file mode 100644
index ab987c6..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.viewmodels;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.ViewModel;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.util.TitleBuffer;
-
-
-public class SimpleViewModel extends AbstractDomainObject implements ViewModel {
-
- public String title() {
- final TitleBuffer buf = new TitleBuffer();
- buf.append(name);
- return buf.toString();
- }
-
- // //////////////////////////////////////
-
- private String name;
-
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // //////////////////////////////////////
-
- @Override
- public String viewModelMemento() {
- return name;
- }
-
- @Override
- public void viewModelInit(final String memento) {
- setName(memento);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java
deleted file mode 100644
index bd6d8be..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.xmlos;
-
-import org.apache.isis.applib.annotation.ObjectType;
-
-@ObjectType("PER")
-public class Person {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java
deleted file mode 100644
index 8c2b01f..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.xmlos;
-
-import org.apache.isis.applib.annotation.ObjectType;
-
-@ObjectType("RLE")
-public class Role {
-
- // {{ Name (String)
- public String name;
- public String getName() {
- return name;
- }
- public void setName(final String name) {
- this.name = name;
- }
- // }}
-
- // {{ Person (Person)
- public Person person;
- public Person getPerson() {
- return person;
- }
- public void setPerson(final Person v) {
- person = v;
- }
- public void modifyPerson(final Person person) {
- setPerson(person);
- }
- public void clearPerson() {
- setPerson(null);
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java
deleted file mode 100644
index 34ce6ea..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.xmlos;
-
-import org.apache.isis.applib.annotation.ObjectType;
-
-@ObjectType("TEA")
-public class Team {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java
deleted file mode 100644
index bf6c494..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.xmlos;
-
-import java.util.List;
-
-import org.apache.isis.applib.DomainObjectContainer;
-
-public class TeamDomainRepository {
-
- public List<Person> allPersons() {
- return container.allInstances(Person.class);
- }
-
- public List<Role> allRoles() {
- return container.allInstances(Role.class);
- }
-
- public List<Team> allTeams() {
- return container.allInstances(Team.class);
- }
-
-
- // {{ injected: DomainObjectContainer
- private DomainObjectContainer container;
-
- public void setDomainObjectContainer(final DomainObjectContainer container) {
- this.container = container;
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/resources/images/ToDoItem.gif
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/resources/images/ToDoItem.gif b/tck/tck-dom/src/main/resources/images/ToDoItem.gif
deleted file mode 100644
index cc536e1..0000000
Binary files a/tck/tck-dom/src/main/resources/images/ToDoItem.gif and /dev/null differ
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/pom.xml
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/pom.xml b/tck/tck-fixture/pom.xml
deleted file mode 100644
index 82c67b1..0000000
--- a/tck/tck-fixture/pom.xml
+++ /dev/null
@@ -1,38 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-tck-fixture</artifactId>
- <name>Isis TCK Fixtures</name>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-dom</artifactId>
- </dependency>
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java
deleted file mode 100644
index a815bbc..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture;
-
-import org.apache.isis.applib.fixtures.LogonFixture;
-
-public class LogonAsSvenFixture extends LogonFixture {
-
- public LogonAsSvenFixture() {
- super("sven");
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java
deleted file mode 100644
index 2a5e6ad..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.tck.fixture.actions;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.actions.ActionsEntity;
-import org.apache.isis.core.tck.dom.actions.ActionsEntityRepository;
-import org.apache.isis.core.tck.dom.busrules.BusRulesEntity;
-import org.apache.isis.core.tck.dom.busrules.BusRulesEntityRepository;
-
-public class ActionsEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity(1);
- createEntity(2);
- createEntity(3);
- createEntity(4);
- createEntity(5);
- }
-
- private ActionsEntity createEntity(Integer id) {
- final ActionsEntity entity = repository.newEntity();
- entity.setId(id);
- return entity;
- }
-
- // {{ injected: ActionSemanticsEntityRepository
- private ActionsEntityRepository repository;
-
- public void setActionSemanticsEntityRepository(final ActionsEntityRepository repository) {
- this.repository = repository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java
deleted file mode 100644
index 39a84c4..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.tck.fixture.busrules;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.busrules.BusRulesEntity;
-import org.apache.isis.core.tck.dom.busrules.BusRulesEntityRepository;
-
-public class BusRulesEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity(1);
- createEntity(2);
- createEntity(3);
- createEntity(4);
- createEntity(5);
- }
-
- private BusRulesEntity createEntity(Integer id) {
- final BusRulesEntity entity = repository.newEntity();
- entity.setId(id);
- return entity;
- }
-
- // {{ injected: BusRulesEntityRepository
- private BusRulesEntityRepository repository;
-
- public void setBusRulesEntityRepository(final BusRulesEntityRepository repository) {
- this.repository = repository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java
deleted file mode 100644
index 98fc917..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.tck.fixture.defaults;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity;
-import org.apache.isis.core.tck.dom.defaults.WithDefaultsEntityRepository;
-
-public class WithDefaultsEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity("John");
- createEntity("Mary");
- createEntity("Bill");
- createEntity("Sally");
- createEntity("Diedre");
- }
-
- private WithDefaultsEntity createEntity(final String name) {
- final WithDefaultsEntity entity = repository.newTransientEntity();
- persist(entity);
- return entity;
- }
-
- // {{ injected: WithDefaultsEntityRepository
- private WithDefaultsEntityRepository repository;
-
- public void setWithDefaultsEntityRepository(final WithDefaultsEntityRepository repository) {
- this.repository = repository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java
deleted file mode 100644
index 66e4eae..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture.refs;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.refs.ParentEntity;
-import org.apache.isis.core.tck.dom.refs.ParentEntityRepository;
-
-public class ParentEntitiesFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity("parent 1");
- createEntity("parent 2");
- createEntity("parent 3");
- createEntity("parent 4");
- createEntity("parent 5");
- }
-
- private ParentEntity createEntity(final String name) {
- final ParentEntity parent = parentEntityRepository.newEntity(name);
- parent.newChild("child 1");
- parent.newChild("child 2");
- return parent;
- }
-
- private ParentEntityRepository parentEntityRepository;
-
- public void setParentEntityRepository(final ParentEntityRepository parentEntityRepository) {
- this.parentEntityRepository = parentEntityRepository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java
deleted file mode 100644
index 4581d26..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture.scalars;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntityRepository;
-
-public class ApplibValuedEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- }
-
- private ApplibValuedEntity createEntity() {
- return applibValuesEntityRepository.newEntity();
- }
-
- private ApplibValuedEntityRepository applibValuesEntityRepository;
-
- public void setApplibValuesEntityRepository(final ApplibValuedEntityRepository applibValuesEntityRepository) {
- this.applibValuesEntityRepository = applibValuesEntityRepository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java
deleted file mode 100644
index c77b359..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture.scalars;
-
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.scalars.DateTimeValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.DateTimeValuedEntityRepository;
-
-public class DateTimeValuedEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- }
-
- private DateTimeValuedEntity createEntity() {
- return dateTimeValuesEntityRepository.newEntity();
- }
-
- private DateTimeValuedEntityRepository dateTimeValuesEntityRepository;
-
- public void setDateTimeValuesEntityRepository(final DateTimeValuedEntityRepository dateTimeValuesEntityRepository) {
- this.dateTimeValuesEntityRepository = dateTimeValuesEntityRepository;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java b/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java
deleted file mode 100644
index 73e5dd1..0000000
--- a/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.fixture.scalars;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.sql.Timestamp;
-import java.util.Date;
-import javax.inject.Inject;
-import org.joda.time.format.DateTimeFormat;
-import org.joda.time.format.DateTimeFormatter;
-import org.apache.isis.applib.fixtures.AbstractFixture;
-import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.JdkValuedEntityRepository;
-import org.apache.isis.core.tck.dom.scalars.MyEnum;
-
-public class JdkValuedEntityFixture extends AbstractFixture {
-
- @Override
- public void install() {
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- createEntity();
- }
-
- private JdkValuedEntity createEntity() {
- final JdkValuedEntity entity = jdkValuesEntityRepository.newEntity();
- entity.setBigDecimalProperty(new BigDecimal("12345678901234567890.1234567890"));
- entity.setBigDecimalProperty2(new BigDecimal("123.45"));
- entity.setBigIntegerProperty(new BigInteger("123456789012345678"));
- entity.setBigIntegerProperty2(new BigInteger("12345"));
- entity.setJavaSqlDateProperty(asSqlDate("2014-04-24"));
- entity.setJavaSqlTimeProperty(asSqlTime("1970-01-01T12:34:45Z"));
- entity.setJavaSqlTimestampProperty(new Timestamp(1234567890));
- entity.setJavaUtilDateProperty(asDateTime("2013-05-25T12:34:45Z"));
- entity.setMyEnum(MyEnum.RED);
- return entity;
- }
-
- private final static DateTimeFormatter yyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd").withZoneUTC();
- private final static DateTimeFormatter yyyyMMddTHHmmssZ = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ssZ").withZoneUTC();
-
- private static Date asDate(final String text) {
- return new java.util.Date(yyyyMMdd.parseDateTime(text).getMillis());
- }
-
- private static Date asDateTime(final String text) {
- return new java.util.Date(yyyyMMddTHHmmssZ.parseDateTime(text).getMillis());
- }
-
- private static java.sql.Date asSqlDate(final String text) {
- return new java.sql.Date(yyyyMMdd.parseDateTime(text).getMillis());
- }
-
- private static java.sql.Time asSqlTime(final String text) {
- return new java.sql.Time(yyyyMMddTHHmmssZ.parseDateTime(text).getMillis());
- }
-
- @Inject
- private JdkValuedEntityRepository jdkValuesEntityRepository;
-
-}
[13/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 139fcde..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 1696b4c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index 2980202..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_thenResponseHeaders_eTag_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java
deleted file mode 100644
index 398996b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_then_200_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
deleted file mode 100644
index 2758a45..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java
deleted file mode 100644
index 63aa13f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java
deleted file mode 100644
index e161f75..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java
deleted file mode 100644
index 1ee3764..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_whenArgMandatoryButMissing_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java
deleted file mode 100644
index 642f1ad..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_whenArgValueIsInvalid_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
deleted file mode 100644
index 25122a7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
-import org.joda.time.format.ISODateTimeFormat;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_whenArgsValid_thenMultiplePropertyUpdate {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
- @Test
- public void primitivePropertiesUpdated() throws Exception {
-
- final DomainObjectRepresentation domainObjectRepr = getObjectRepr("PRMV", "43");
-
- final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
-
- final JsonRepresentation argRepr = updateLink.getArguments();
-
- final byte b = (byte)99;
- final char c = 'b';
- final double d = 12345.678;
- final float f = 54321.123F;
- final int i = 999999;
- final long l = 99999999999L;
- final short s = (short)999;
- final boolean z = false;
- argRepr.mapPut("byteProperty.value", b);
- argRepr.mapPut("charProperty.value", c);
- argRepr.mapPut("doubleProperty.value", d);
- argRepr.mapPut("floatProperty.value", f);
- argRepr.mapPut("intProperty.value", i);
- argRepr.mapPut("longProperty.value", l);
- argRepr.mapPut("shortProperty.value", s);
- argRepr.mapPut("booleanProperty.value", z);
- RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
- assertThat(result.getStatus(), is(HttpStatusCode.OK));
-
- final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
- assertThat(afterResp.getProperty("byteProperty").getByte("value"), is(b));
- assertThat(afterResp.getProperty("charProperty").getChar("value"), is(c));
- assertThat(afterResp.getProperty("doubleProperty").getDouble("value"), is(d));
- assertThat(afterResp.getProperty("floatProperty").getFloat("value"), is(f));
- assertThat(afterResp.getProperty("intProperty").getInt("value"), is(i));
- assertThat(afterResp.getProperty("longProperty").getLong("value"), is(l));
- assertThat(afterResp.getProperty("shortProperty").getShort("value"), is(s));
- assertThat(afterResp.getProperty("booleanProperty").getBoolean("value"), is(z));
- }
-
- @Test
- public void jdkPropertiesUpdated() throws Exception {
-
- final DomainObjectRepresentation domainObjectRepr = getObjectRepr("JDKV", "38");
- final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
- final JsonRepresentation argRepr = updateLink.getArguments();
-
- final BigDecimal bd = new BigDecimal("12345678901234567.789");
- final BigInteger bi = new BigInteger("123456789012345678");
- final java.sql.Date sqld = new java.sql.Date(new DateTime(2014,5,1, 0,0, DateTimeZone.UTC).getMillis());
- final java.sql.Time sqlt = new java.sql.Time(13,0,0);
- final java.sql.Timestamp sqlts = new java.sql.Timestamp(114,4,1,13,0,0,0);
- final java.util.Date d = new DateTime(2014,5,1, 11,45, DateTimeZone.UTC).toDate();
- final String e = "ORANGE";
- final String s = "Tangerine";
-
- argRepr.mapPut("bigDecimalProperty.value", bd);
- argRepr.mapPut("bigIntegerProperty.value", bi);
- argRepr.mapPut("javaSqlDateProperty.value", asIsoNoT(sqld)); // 1-may-2014
- argRepr.mapPut("javaSqlTimeProperty.value", asIsoOnlyT(sqlt)); // 1 pm
- argRepr.mapPut("javaSqlTimestampProperty.value", sqlts.getTime());
- argRepr.mapPut("javaUtilDateProperty.value", asIso(d));
- argRepr.mapPut("myEnum.value", e);
- argRepr.mapPut("stringProperty.value", s);
-
- final RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
- assertThat(result.getStatus(), is(HttpStatusCode.OK));
-
- final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
-
- assertThat(afterResp.getProperty("bigDecimalProperty").getBigDecimal("value"), is(new BigDecimal("12345678901234567.7890000000"))); // big-decimal(30,10)
- assertThat(afterResp.getProperty("bigIntegerProperty").getBigInteger("value"), is(bi));
- assertThat(afterResp.getProperty("javaSqlDateProperty").getDate("value"), is((java.util.Date)sqld));
- assertThat(afterResp.getProperty("javaSqlTimeProperty").getTime("value"), is((java.util.Date)sqlt));
- assertThat(afterResp.getProperty("javaSqlTimestampProperty").getLong("value"), is(sqlts.getTime()));
- assertThat(afterResp.getProperty("javaUtilDateProperty").getDateTime("value"), is(d));
- assertThat(afterResp.getProperty("myEnum").getString("value"), is(e));
- assertThat(afterResp.getProperty("stringProperty").getString("value"), is(s));
-
- }
-
- @Test
- public void jodaPropertiesUpdated() throws Exception {
-
- final DomainObjectRepresentation domainObjectRepr = getObjectRepr("JODA", "83");
-
- final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
-
- final JsonRepresentation argRepr = updateLink.getArguments();
-
- final LocalDate ld = new LocalDate(2013,5,1);
- final LocalDateTime ldt = new LocalDateTime(2013,2,1,14,15,0);
- final DateTime dt = new DateTime(2013,2,1,14,15,0, DateTimeZone.UTC);
- final String s = "New string";
-
- argRepr.mapPut("localDateProperty.value", "2013-05-01");
- argRepr.mapPut("localDateTimeProperty.value", "2013-02-01T14:15:00Z");
- argRepr.mapPut("dateTimeProperty.value", asIso(dt.toDate()));
- argRepr.mapPut("stringProperty.value", s);
-
- final RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
- assertThat(result.getStatus(), is(HttpStatusCode.OK));
-
- final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
-
- assertThat(afterResp.getProperty("localDateProperty").getString("value"), is("2013-05-01")); // being a bit hacky here...
- assertThat(afterResp.getProperty("localDateTimeProperty").getDateTime("value"), is(ldt.toDate()));
- assertThat(afterResp.getProperty("dateTimeProperty").getDateTime("value"), is(dt.toDate()));
- assertThat(afterResp.getProperty("stringProperty").getString("value"), is(s));
- }
-
- private static String asIso(final java.util.Date d) {
- final org.joda.time.DateTime dt = new org.joda.time.DateTime(d.getTime());
- return asIso(dt);
- }
-
- private static String asIso(final org.joda.time.DateTime dt) {
- return ISODateTimeFormat.dateTimeNoMillis().withZoneUTC().print(dt);
- }
-
- private static String asIsoNoT(final java.util.Date d) {
- final org.joda.time.DateTime dt = new org.joda.time.DateTime(d.getTime());
- return asIsoNoT(dt);
- }
-
- private static String asIsoNoT(final org.joda.time.DateTime dt) {
- return ISODateTimeFormat.date().withZoneUTC().print(dt);
- }
-
- private static String asIsoOnlyT(final java.util.Date d) {
- final org.joda.time.DateTime dt = new org.joda.time.DateTime(d.getTime());
- return asIsoOnlyT(dt);
- }
-
- private static String asIsoOnlyT(final org.joda.time.DateTime dt) {
- return ISODateTimeFormat.timeNoMillis().withZoneUTC().print(dt);
- }
-
- private DomainObjectRepresentation getObjectRepr(final String domainType, final String instanceId) throws IOException {
- final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
- final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
- return domainObjectRepr;
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java
deleted file mode 100644
index d91b823..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_whenDoesntExistOid_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java
deleted file mode 100644
index 1e2b140..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_givenDisabled_then_203_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
deleted file mode 100644
index 8f2c4d8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
deleted file mode 100644
index e8bad14..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java
deleted file mode 100644
index 86de341..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_givenHidden_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 2f140c5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index e286ba7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Delete_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 95cd503..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Delete_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 0a499f4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Delete_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index 43496bc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_thenResponseHeaders_eTag_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java
deleted file mode 100644
index 519deaf..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_then_200_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java
deleted file mode 100644
index 03d051a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java
deleted file mode 100644
index 03e066b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java
deleted file mode 100644
index 807da6e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java
deleted file mode 100644
index fb9b144..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgIsMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java
deleted file mode 100644
index 7ae5e98..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgMandatoryButMissing_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java
deleted file mode 100644
index a047a82..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
deleted file mode 100644
index a16014b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java
deleted file mode 100644
index f8ac216..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgValueIsInvalid_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
deleted file mode 100644
index 9bdea41..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java
deleted file mode 100644
index b86b9ac..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenDoesntExistColl_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java
deleted file mode 100644
index 2a486b2..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Delete_whenDoesntExistOid_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
deleted file mode 100644
index 6160a3d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Ignore
- @Test
- public void collectionDetails() throws Exception {
-
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
deleted file mode 100644
index ce343d0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Ignore
- @Test
- public void collectionDetails() throws Exception {
-
-
- }
-}
[39/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java
new file mode 100644
index 0000000..b3c05f1
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import com.google.common.collect.ImmutableMap;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_namedQuery_all {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Before
+ public void setUp() throws Exception {
+
+ iswf.beginTran();
+
+ PrimitiveValuedEntity entity = repo.newEntity();
+ entity.setId(1);
+ entity.setIntProperty(111);
+
+ entity = repo.newEntity();
+ entity.setId(2);
+ entity.setIntProperty(222);
+
+ entity = repo.newEntity();
+ entity.setId(3);
+ entity.setIntProperty(333);
+
+ entity = repo.newEntity();
+ entity.setId(4);
+ entity.setIntProperty(111);
+
+ iswf.commitTran();
+ }
+
+ @Test
+ public void whenOne() throws Exception {
+
+ iswf.beginTran();
+
+ List<PrimitiveValuedEntity> entities = repo.findByNamedQueryAll("prmv_findByIntProperty", ImmutableMap.of("i", (Object)222));
+ assertThat(entities, is(not(nullValue())));
+ assertThat(entities.size(), is(1));
+
+ iswf.commitTran();
+ }
+
+ @Test
+ public void whenTwo() throws Exception {
+
+ iswf.beginTran();
+
+ List<PrimitiveValuedEntity> entities = repo.findByNamedQueryAll("prmv_findByIntProperty", ImmutableMap.of("i", (Object)111));
+ assertThat(entities, is(not(nullValue())));
+ assertThat(entities.size(), is(2));
+
+ iswf.commitTran();
+ }
+
+ @Test
+ public void whenNone() throws Exception {
+
+ iswf.beginTran();
+
+ List<PrimitiveValuedEntity> entities = repo.findByNamedQueryAll("prmv_findByIntProperty", ImmutableMap.of("i", (Object)999));
+ assertThat(entities, is(not(nullValue())));
+ assertThat(entities.size(), is(0));
+
+ iswf.commitTran();
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java
new file mode 100644
index 0000000..15fdcd7
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import com.google.common.collect.ImmutableMap;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_namedQuery_firstOnly {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Before
+ public void setUp() throws Exception {
+
+ iswf.beginTran();
+
+ PrimitiveValuedEntity entity = repo.newEntity();
+ entity.setId(1);
+ entity.setIntProperty(111);
+
+ entity = repo.newEntity();
+ entity.setId(2);
+ entity.setIntProperty(222);
+
+ entity = repo.newEntity();
+ entity.setId(3);
+ entity.setIntProperty(333);
+
+ entity = repo.newEntity();
+ entity.setId(4);
+ entity.setIntProperty(111);
+
+ iswf.commitTran();
+
+ }
+
+ @Test
+ public void whenOne() throws Exception {
+
+ PrimitiveValuedEntity entity;
+
+ iswf.beginTran();
+
+ entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)222));
+ assertThat(entity, is(not(nullValue())));
+ assertThat(entity.getId(), is(2));
+
+ iswf.commitTran();
+ }
+
+ @Test
+ public void whenTwo() throws Exception {
+
+ PrimitiveValuedEntity entity;
+
+ iswf.beginTran();
+
+ entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)111));
+ assertThat(entity, is(not(nullValue())));
+ assertThat(entity.getId(), is(1));
+
+ iswf.commitTran();
+ }
+
+ @Test
+ public void whenNone() throws Exception {
+
+ PrimitiveValuedEntity entity;
+
+ iswf.beginTran();
+
+ entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)999));
+ assertThat(entity, is(nullValue()));
+
+ iswf.commitTran();
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java
new file mode 100644
index 0000000..4b27d8d
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java
@@ -0,0 +1,92 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persistAndUpdate_applibValuedEntity {
+
+ private ApplibValuedEntityRepository repo = new ApplibValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("APPLIBVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwo() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setStringProperty("1");
+ repo.newEntity().setStringProperty("2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<ApplibValuedEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persist_then_update() throws Exception {
+ iswf.beginTran();
+
+ ApplibValuedEntity entity = repo.newEntity();
+ entity.setStringProperty("1");
+
+ Date date = new Date();
+ entity.setDateProperty(date);
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+ assertThat(entity.getDateProperty().dateValue(), is(date.dateValue()));
+
+ date = date.add(-1, -1, -1);
+ entity.setDateProperty(date);
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+ assertThat(entity.getDateProperty().dateValue(), is(date.dateValue()));
+
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java
new file mode 100644
index 0000000..b74224e
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.sql.Timestamp;
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.JdkValuedEntityRepository;
+import org.apache.isis.core.tck.dom.scalars.MyEnum;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persistAndUpdate_jdkValuedEntity {
+
+ private JdkValuedEntityRepository repo = new JdkValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("JDKVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwo() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setStringProperty("1");
+ repo.newEntity().setStringProperty("2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<JdkValuedEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persist_then_update() throws Exception {
+ iswf.beginTran();
+ JdkValuedEntity entity = repo.newEntity();
+ entity.setStringProperty("1");
+ entity.setBigDecimalProperty(BigDecimal.valueOf(543210987654321L, 0)); // mssqlserver can cope with scale>0, but hsqldb cannot
+ entity.setBigIntegerProperty(BigInteger.valueOf(123456789012345L));
+ entity.setJavaSqlDateProperty(new java.sql.Date(Utils.toMillis(2009, 6, 11)));
+ entity.setJavaSqlTimeProperty(new java.sql.Time(Utils.toMillis(1970, 1, 1, 0, 5, 10))); // date portion is unimportant, is preserved on mssqlserver but not on hsqldb
+ entity.setJavaSqlTimestampProperty(new Timestamp(Utils.toMillis(2010, 5, 13, 20, 25, 30)));
+ entity.setJavaUtilDateProperty(new java.util.Date(Utils.toMillis(2010, 5, 13, 22, 17, 12)));
+ entity.setMyEnum(MyEnum.GREEN);
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+
+ assertThat(entity.getStringProperty(), is("1"));
+ assertThat(entity.getBigDecimalProperty(), is(BigDecimal.valueOf(543210987654321L, 0)));
+ assertThat(entity.getBigIntegerProperty(), is(BigInteger.valueOf(123456789012345L)));
+ assertThat(entity.getJavaSqlDateProperty(), is(new java.sql.Date(Utils.toMillis(2009, 6, 11))));
+ assertThat(entity.getJavaSqlTimeProperty(), is(new java.sql.Time(Utils.toMillis(1970, 1, 1, 0, 5, 10))));
+ assertThat(entity.getJavaSqlTimestampProperty(), is(new Timestamp(Utils.toMillis(2010, 5, 13, 20, 25, 30))));
+ assertThat(entity.getJavaUtilDateProperty(), is(new java.util.Date(Utils.toMillis(2010, 5, 13, 22, 17, 12))));
+ assertThat(entity.getMyEnum(), is(MyEnum.GREEN));
+
+
+ entity.setBigDecimalProperty(BigDecimal.valueOf(123456789012345L, 0));
+ entity.setBigIntegerProperty(BigInteger.valueOf(543210987654321L));
+ entity.setJavaSqlDateProperty(new java.sql.Date(Utils.toMillis(2010, 5, 13)));
+ entity.setJavaSqlTimeProperty(new java.sql.Time(Utils.toMillis(1970, 1, 1, 5, 10, 15)));
+ entity.setJavaSqlTimestampProperty(new Timestamp(Utils.toMillis(2010, 5, 13, 10, 15, 20)));
+ entity.setJavaUtilDateProperty(new java.util.Date(Utils.toMillis(2010, 5, 13, 20, 15, 10)));
+ entity.setMyEnum(MyEnum.BLUE);
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+ assertThat(entity.getBigDecimalProperty(), is(BigDecimal.valueOf(123456789012345L, 0)));
+ assertThat(entity.getBigIntegerProperty(), is(BigInteger.valueOf(543210987654321L)));
+ assertThat(entity.getJavaSqlDateProperty(), is(new java.sql.Date(Utils.toMillis(2010, 5, 13))));
+ assertThat(entity.getJavaSqlTimeProperty(), is(new java.sql.Time(Utils.toMillis(1970, 1, 1, 5, 10, 15))));
+ assertThat(entity.getJavaSqlTimestampProperty(), is(new Timestamp(Utils.toMillis(2010, 5, 13, 10, 15, 20))));
+ assertThat(entity.getJavaUtilDateProperty(), is(new java.util.Date(Utils.toMillis(2010, 5, 13, 20, 15, 10))));
+ assertThat(entity.getMyEnum(), is(MyEnum.BLUE));
+
+ iswf.commitTran();
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java
new file mode 100644
index 0000000..d1567cb
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persistAndUpdate_objectAdapters {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void transient_then_persistent() throws Exception {
+
+ iswf.beginTran();
+ PrimitiveValuedEntity entity = repo.newEntity();
+ ObjectAdapter adapter = iswf.adapterFor(entity);
+
+ assertThat(adapter.isTransient(), is(true));
+ assertThat(adapter.getResolveState(), is(ResolveState.TRANSIENT));
+ assertThat(adapter.getOid().isTransient(), is(true));
+
+ entity.setId(1);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ final List<PrimitiveValuedEntity> list = repo.list();
+ assertThat(list.size(), is(1));
+
+ adapter = iswf.adapterFor(list.get(0));
+ assertThat(adapter.getResolveState(), is(ResolveState.RESOLVED));
+ assertThat(adapter.isTransient(), is(false));
+ assertThat(adapter.getOid().enString(new OidMarshaller()), is("PRMV:i~1"));
+
+ iswf.commitTran();
+ }
+
+ @Test
+ public void updated_and_retrieved() throws Exception {
+
+ // given persisted
+ iswf.beginTran();
+ PrimitiveValuedEntity entity = repo.newEntity();
+ ObjectAdapter adapter = iswf.adapterFor(entity);
+
+ entity.setId(1);
+ entity.setCharProperty('X');
+
+ iswf.commitTran();
+
+ // when update
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+ entity.setCharProperty('Y');
+ iswf.commitTran();
+
+ // then adapter's state is resolved
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+ assertThat(entity.getCharProperty(), is('Y'));
+
+ adapter = iswf.adapterFor(entity);
+ assertThat(adapter.getResolveState(), is(ResolveState.RESOLVED));
+
+ iswf.commitTran();
+
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java
new file mode 100644
index 0000000..3dfb7d4
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java
@@ -0,0 +1,119 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persistAndUpdate_primitiveValuedEntity {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwo() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setId(1);
+ repo.newEntity().setId(2);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<PrimitiveValuedEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persist_then_update() throws Exception {
+
+ iswf.beginTran();
+ PrimitiveValuedEntity entity = repo.newEntity();
+ entity.setId(1);
+
+ entity.setBooleanProperty(false);
+ entity.setByteProperty((byte)456);
+ entity.setDoubleProperty(123456789876.0);
+ entity.setFloatProperty(654321.0f);
+ entity.setIntProperty(765);
+ entity.setLongProperty(7654321012345L);
+ entity.setShortProperty((short)543);
+ entity.setCharProperty('A');
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+
+ assertThat(entity.getBooleanProperty(), is(false));
+ assertThat(entity.getByteProperty(), is((byte)456));
+ assertThat(entity.getDoubleProperty(), is(123456789876.0));
+ assertThat(entity.getFloatProperty(), is(654321.0f));
+ assertThat(entity.getIntProperty(), is(765));
+ assertThat(entity.getLongProperty(), is(7654321012345L));
+ assertThat(entity.getShortProperty(), is((short)543));
+ assertThat(entity.getCharProperty(), is('A'));
+
+
+ entity.setBooleanProperty(true);
+ entity.setByteProperty((byte)123);
+ entity.setDoubleProperty(9876543210987.0);
+ entity.setFloatProperty(123456.0f);
+ entity.setIntProperty(456);
+ entity.setLongProperty(12345678901L);
+ entity.setShortProperty((short)4567);
+ entity.setCharProperty('X');
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+
+ assertThat(entity.getBooleanProperty(), is(true));
+ assertThat(entity.getByteProperty(), is((byte)123));
+ assertThat(entity.getDoubleProperty(), is(9876543210987.0));
+ assertThat(entity.getFloatProperty(), is(123456.0f));
+ assertThat(entity.getIntProperty(), is(456));
+ assertThat(entity.getLongProperty(), is(12345678901L));
+ assertThat(entity.getShortProperty(), is((short)4567));
+ assertThat(entity.getCharProperty(), is('X'));
+
+ iswf.commitTran();
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java
new file mode 100644
index 0000000..94e3c62
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java
@@ -0,0 +1,118 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persistAndUpdate_wrapperValuedEntity {
+
+ private WrapperValuedEntityRepository repo = new WrapperValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("WRAPPERVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwo() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setStringProperty("1");
+ repo.newEntity().setStringProperty("2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<WrapperValuedEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+
+ @Test
+ public void persist_then_update() throws Exception {
+ iswf.beginTran();
+ WrapperValuedEntity entity = repo.newEntity();
+ entity.setStringProperty("1");
+ entity.setBooleanProperty(false);
+ entity.setByteProperty((byte)321);
+ entity.setDoubleProperty(123456768723429.0);
+ entity.setFloatProperty(654321.0f);
+ entity.setIntegerProperty(543);
+ entity.setLongProperty(90876512345L);
+ entity.setShortProperty((short)7654);
+ entity.setCharacterProperty('A');
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+ assertThat(entity.getStringProperty(), is("1"));
+ assertThat(entity.getBooleanProperty(), is(false));
+ assertThat(entity.getByteProperty(), is((byte)321));
+ assertThat(entity.getDoubleProperty(), is(123456768723429.0));
+ assertThat(entity.getFloatProperty(), is(654321.0f));
+ assertThat(entity.getIntegerProperty(), is(543));
+ assertThat(entity.getLongProperty(), is(90876512345L));
+ assertThat(entity.getShortProperty(), is((short)7654));
+ assertThat(entity.getCharacterProperty(), is('A'));
+
+
+ entity.setBooleanProperty(true);
+ entity.setByteProperty((byte)123);
+ entity.setDoubleProperty(9876543210987.0);
+ entity.setFloatProperty(123456.0f);
+ entity.setIntegerProperty(456);
+ entity.setLongProperty(12345678901L);
+ entity.setShortProperty((short)4567);
+ entity.setCharacterProperty('X');
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ entity = repo.list().get(0);
+ assertThat(entity.getBooleanProperty(), is(true));
+ assertThat(entity.getByteProperty(), is((byte)123));
+ assertThat(entity.getDoubleProperty(), is(9876543210987.0));
+ assertThat(entity.getFloatProperty(), is(123456.0f));
+ assertThat(entity.getIntegerProperty(), is(456));
+ assertThat(entity.getLongProperty(), is(12345678901L));
+ assertThat(entity.getShortProperty(), is((short)4567));
+ assertThat(entity.getCharacterProperty(), is('X'));
+
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java
new file mode 100644
index 0000000..25a858f
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.AutoAssignedEntity;
+import org.apache.isis.core.tck.dom.scalars.AutoAssignedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_dataStoreAssignedPrimaryKey {
+
+ private AutoAssignedEntityRepository repo = new AutoAssignedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("AUTOASSIGNEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwo() throws Exception {
+ iswf.beginTran();
+ repo.newEntity();
+ repo.newEntity();
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<AutoAssignedEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/README-testcases.md
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/README-testcases.md b/mothballed/tck/tck-viewer-restfulobjects/README-testcases.md
new file mode 100644
index 0000000..b05c06a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/README-testcases.md
@@ -0,0 +1,80 @@
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+
+<pre>
+
+[incorrect]_thenResponseCode_405_bad
+
+Get_whenQueryArg_xRoFollowLinks_ok
+Get_whenQueryArg_xRoDomainModel_ok
+
+Get_whenRequestHeaders_Accept_isInvalid_bad
+Get_whenRequestHeaders_Accept_ok
+
+
+[modifying]_givenDisabled_thenResponseCode_203_TODO
+
+[modifying]_givenEtag_whenIfMatchHeaderDoesMatch_ok
+[modifying]_givenEtag_whenIfMatchHeaderDoesNotMatch_bad
+
+[modifying]_givenXxx_whenArgsValid_thenXxx_ok_TODO
+
+
+[modifying]_whenArgsMandatoryButMissing_bad_TODO
+rename from
+[modifying]_whenNoArg_bad_TODO
+
+
+[modifying]_then[PostConditionsHappyCase]_TODO
+
+[modifying]_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO
+[modifying]_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO
+
+[modifying]_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO
+[modifying]_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO
+[modifying]_whenArgValueIsInvalid_bad_TODO
+
+[modifying]_whenArgIsMalformed_bad_TODO
+
+[anyValid]_whenDoesntExistOid_thenResponseCode_404_TODO
+[anyValid]_whenDoesntExistMember_thenResponseCode_404_TODO
+[anyValid]_givenHidden_thenResponseCode_404_TODO
+
+[anyValid]_thenRepresentation_ok_TODO
+[anyValid]_thenResponseCode_200_ok
+[anyValid]_thenResponseHeaders_ContentType_ok
+[anyValid]_thenResponseHeaders_ContentLength_ok
+[anyValid]_thenResponseHeaders_CacheControl_ok
+[anyValid]_thenResponseHeaders_eTag_ok
+
+
+
+
+
+
+
+Delete_whenLinkToEntityThatExistsButIsNotInCollection_ok_TODO
+Delete_whenHrefArgLinksToEntityInCollection_ok_TODO
+Put_whenArgsValid_thenMultiplePropertyUpdate_TODO
+
+Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO
+Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO
+
+Get_givenHiddenMembers_thenRepresentation_ok_TODO
+</pre>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch b/mothballed/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch
new file mode 100644
index 0000000..53bd401
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
+<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
+</mapAttribute>
+<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="isis-viewer-restfulobjects-tck"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
+</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/pom.xml b/mothballed/tck/tck-viewer-restfulobjects/pom.xml
new file mode 100644
index 0000000..1e7d558
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/pom.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-tck-viewer-restfulobjects</artifactId>
+ <name>Isis RestfulObjects Viewer TCK tests</name>
+
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ </plugin>
+
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <includes>
+ <include>**/*Test_*.java</include>
+ <include>**/Get_*.java</include>
+ <include>**/Delete_*.java</include>
+ <include>**/Put_*.java</include>
+ <include>**/Post_*.java</include>
+ </includes>
+ <!-- TODO: reinstate -->
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+ <repositories>
+ <repository>
+ <id>JBoss Public Release</id>
+ <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <dependencies>
+
+ <!-- other modules in this project -->
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-dom</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-fixture</artifactId>
+ </dependency>
+
+ <!-- isis viewer -->
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-viewer-restfulobjects-server</artifactId>
+ </dependency>
+
+
+ <!-- isis runtime -->
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-runtime</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-security</artifactId>
+ </dependency>
+
+ <!-- to run using WebServer -->
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-webserver</artifactId>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+
+ <dependency>
+ <groupId>org.reflections</groupId>
+ <artifactId>reflections</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java b/mothballed/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java
new file mode 100644
index 0000000..e72a568
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck;
+
+
+public class Dummy {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties b/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties
new file mode 100644
index 0000000..e6bf541
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+isis.authentication=bypass
+isis.authorization=bypass
+
+isis.persistor=in-memory
+
+isis.services-installer=configuration-and-annotation
+isis.services.ServicesInstallerFromAnnotation.packagePrefix=org.apache.isis.core.tck.dom
+
+isis.services = org.apache.isis.applib.services.eventbus.EventBusService$Noop
+
+isis.fixtures.prefix= org.apache.isis.core.tck.fixture
+isis.fixtures=\
+ LogonAsSvenFixture,\
+ scalars.ApplibValuedEntityFixture,\
+ scalars.JdkValuedEntityFixture,\
+ scalars.PrimitiveValuedEntityFixture,\
+ scalars.WrapperValuedEntityFixture,\
+ refs.ParentEntitiesFixture,\
+ defaults.WithDefaultsEntityFixture,\
+ busrules.BusRulesEntityFixture,\
+ actions.ActionsEntityFixture,\
+ scalars.JodaValuedEntityFixture
+
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties b/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties
new file mode 100644
index 0000000..c7f605a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# apache's log4j is used to provide system logging.
+log4j.rootCategory=WARN, Console
+
+# The console appender
+log4j.appender.Console=org.apache.log4j.ConsoleAppender
+log4j.appender.Console.target=System.out
+log4j.appender.Console.layout=org.apache.log4j.PatternLayout
+log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n
+
+log4j.appender.File=org.apache.log4j.RollingFileAppender
+log4j.appender.File.file=isis.log
+log4j.appender.File.append=false
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml b/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..366134d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,141 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<web-app id="WebApp_ID" version="2.4"
+ xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <display-name>RestfulObjects TCK</display-name>
+
+
+ <filter>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
+ <init-param>
+ <param-name>CacheTime</param-name>
+ <param-value>86400</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.js</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.css</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.jpg</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.png</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>ResourceCachingFilter</filter-name>
+ <url-pattern>*.gif</url-pattern>
+ </filter-mapping>
+
+ <servlet>
+ <servlet-name>Resource</servlet-name>
+ <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.js</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.gif</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.png</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Resource</servlet-name>
+ <url-pattern>*.html</url-pattern>
+ </servlet-mapping>
+
+
+
+
+ <listener>
+ <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
+ </listener>
+
+ <context-param>
+ <param-name>isis.viewers</param-name>
+ <param-value>restfulobjects</param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>IsisSessionFilter</filter-name>
+ <filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
+ <init-param>
+ <!-- trusted client, so no authentication required -->
+ <param-name>authenticationSessionStrategy</param-name>
+ <param-value>org.apache.isis.viewer.restfulobjects.server.authentication.AuthenticationSessionStrategyTrusted</param-value>
+ </init-param>
+ <init-param>
+ <!-- what to do if no session was found; we indicate to issue a 401 basic authentication challenge -->
+ <param-name>whenNoSession</param-name>
+ <param-value>continue</param-value>
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>IsisSessionFilter</filter-name>
+ <url-pattern>*</url-pattern>
+ </filter-mapping>
+
+ <filter>
+ <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
+ <filter-class>org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
+ <url-pattern>*</url-pattern>
+ </filter-mapping>
+
+
+
+ <listener>
+ <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
+ </listener>
+
+ <context-param>
+ <param-name>javax.ws.rs.Application</param-name>
+ <param-value>org.apache.isis.viewer.restfulobjects.server.RestfulObjectsApplication</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>RestEasy</servlet-name>
+ <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>RestEasy</servlet-name>
+ <url-pattern>/</url-pattern>
+ </servlet-mapping>
+
+</web-app>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java
new file mode 100644
index 0000000..7197ff0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck;
+
+import org.apache.http.client.HttpClient;
+import org.jboss.resteasy.client.ClientExecutor;
+import org.junit.rules.MethodRule;
+import org.junit.runners.model.FrameworkMethod;
+import org.junit.runners.model.Statement;
+
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+
+public class IsisWebServerRule implements MethodRule {
+
+ private static ThreadLocal<WebServer> WEBSERVER = new ThreadLocal<WebServer>();
+
+ private RestfulClient client;
+
+ @Override
+ public Statement apply(final Statement base, final FrameworkMethod method, final Object target) {
+ getWebServer(); // creates and starts running if required
+ return base;
+ }
+
+ public WebServer getWebServer() {
+ WebServer webServer = WEBSERVER.get();
+ if(webServer == null) {
+ webServer = new WebServer();
+ WEBSERVER.set(webServer);
+ webServer.run(39393);
+ }
+ return webServer;
+ }
+
+ public void discardWebApp() {
+ getWebServer().stop();
+ WEBSERVER.set(null);
+ IsisContext.testReset();
+ }
+
+ public RestfulClient getClient() {
+ if(client == null) {
+ final WebServer webServer = getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+ return client;
+ }
+
+ public RestfulClient getClient(HttpClient httpClient) {
+ if(client == null) {
+ final WebServer webServer = getWebServer();
+ client = new RestfulClient(webServer.getBase(), httpClient);
+ }
+ return client;
+ }
+
+ public RestfulClient getClient(ClientExecutor clientExecutor) {
+ if(client == null) {
+ final WebServer webServer = getWebServer();
+ client = new RestfulClient(webServer.getBase(), clientExecutor);
+ }
+ return client;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java
new file mode 100644
index 0000000..72808e4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck;
+
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+
+import static org.hamcrest.Matchers.is;
+import static org.junit.Assert.assertThat;
+
+public class RelTest_matches {
+
+ @Test
+ public void whenDoes() throws Exception {
+ assertThat(Rel.ACTION.matches(Rel.ACTION), is(true));
+ }
+
+ @Test
+ public void whenDoesNot() throws Exception {
+ assertThat(Rel.ACTION.matches(Rel.ACTION_PARAM), is(false));
+ }
+
+ @Test
+ public void whenMatchesOnStr() throws Exception {
+ assertThat(Rel.ACTION.matches(Rel.ACTION.getName()), is(true));
+ }
+
+ @Test
+ public void whenMatchesOnStrWithParams() throws Exception {
+ assertThat(Rel.ACTION.matches(Rel.ACTION.andParam("foo", "bar")), is(true));
+ }
+
+
+}
[40/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java
new file mode 100644
index 0000000..44a5b46
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/DataNucleusPersistenceMechanismInstallerTest_services.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.Oid;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.spec.ObjectSpecId;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+
+public class DataNucleusPersistenceMechanismInstallerTest_services {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void servicesBootstrapped() {
+ final List<Object> services = IsisContext.getServices();
+ assertThat(services.size(), is(1));
+ assertThat(services.get(0), is((Object)repo));
+
+ final ObjectAdapter serviceAdapter = IsisContext.getPersistenceSession().getAdapterManager().getAdapterFor(repo);
+ assertThat(serviceAdapter, is(not(nullValue())));
+
+ assertThat(serviceAdapter.getOid(), is(equalTo((Oid)RootOidDefault.create(ObjectSpecId.of("PrimitiveValuedEntities"), "1"))));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java
new file mode 100644
index 0000000..5b0bb73
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/Utils.java
@@ -0,0 +1,124 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus;
+
+import java.sql.Connection;
+import java.sql.Statement;
+import java.util.Properties;
+
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+
+import org.apache.isis.core.commons.config.IsisConfiguration;
+import org.apache.isis.core.commons.config.IsisConfigurationDefault;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.runtime.system.context.IsisContext;
+
+public class Utils {
+
+ private Utils(){}
+
+ public static IsisSystemWithFixtures.Builder systemBuilder() {
+ return IsisSystemWithFixtures.builder()
+ .with(configurationForDataNucleusDb())
+ .with(new DataNucleusPersistenceMechanismInstaller());
+ }
+
+ public static IsisSystemWithFixtures.Listener listenerToDeleteFrom(final String... tables) {
+ return new IsisSystemWithFixtures.ListenerAdapter(){
+
+ @Override
+ public void postSetupSystem(boolean firstTime) throws Exception {
+ Connection connection = getConnection();
+ try {
+ final Statement statement = connection.createStatement();
+ for(String table: tables) {
+ statement.executeUpdate("DELETE FROM " + table);
+ }
+ } catch(Exception ex) {
+ connection.rollback();
+ throw ex;
+ } finally {
+ connection.commit();
+ }
+ }
+
+ private Connection getConnection() {
+ final DataNucleusObjectStore objectStore = (DataNucleusObjectStore) IsisContext.getPersistenceSession().getObjectStore();
+ return objectStore.getJavaSqlConnection();
+ }
+ };
+ }
+
+ public static IsisConfiguration configurationForDataNucleusDb() {
+ final IsisConfigurationDefault configuration = new IsisConfigurationDefault();
+ Properties props = new Properties();
+
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.PersistenceManagerFactoryClass", "org.datanucleus.api.jdo.JDOPersistenceManagerFactory");
+
+ // last one wins!
+ configureHsqlDbFileBased(props);
+ configureForMsSqlServer(props);
+ configureHsqlDbInMemory(props);
+
+ props.put("isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema", "true");
+ props.put("isis.persistor.datanucleus.impl.datanucleus.validateTables", "true");
+ props.put("isis.persistor.datanucleus.impl.datanucleus.validateConstraints", "true");
+
+ props.put("isis.persistor.datanucleus.impl.datanucleus.cache.level2.type", "none");
+
+ configuration.add(props);
+ return configuration;
+ }
+
+
+ private static void configureHsqlDbInMemory(Properties props) {
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName", "org.hsqldb.jdbcDriver");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:mem:test");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName", "sa");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword", "");
+ }
+
+ private static void configureHsqlDbFileBased(Properties props) {
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName", "org.hsqldb.jdbcDriver");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:file:hsql-db/test;hsqldb.write_delay=false;shutdown=true");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName", "sa");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword", "");
+ }
+
+ private static void configureForMsSqlServer(Properties props) {
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName", "com.microsoft.sqlserver.jdbc.SQLServerDriver");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:sqlserver://127.0.0.1:1433;instance=SQLEXPRESS;databaseName=jdo;");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName", "jdo");
+ props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword", "jdopass");
+ }
+
+
+
+ public static long toMillis(int year, int monthOfYear, int dayOfMonth) {
+ LocalDate d = new LocalDate(year, monthOfYear, dayOfMonth);
+ return d.toDateMidnight().getMillis();
+ }
+
+ public static long toMillis(int year, int monthOfYear, int dayOfMonth, int hourOfDay, int minuteOfHour, int secondOfMinute) {
+ LocalDateTime d = new LocalDateTime(year, monthOfYear, dayOfMonth, hourOfDay, minuteOfHour, secondOfMinute);
+ return d.toDateTime().getMillis();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java
new file mode 100644
index 0000000..f4c5364
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/persistence/spi/JdoObjectIdSerializerTest.java
@@ -0,0 +1,150 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.persistence.spi;
+
+import java.math.BigInteger;
+import java.util.Date;
+import org.datanucleus.identity.ObjectId;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
+import org.apache.isis.core.metamodel.spec.ObjectSpecId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class JdoObjectIdSerializerTest {
+
+ @ObjectType("CUS")
+ public static class Customer {}
+ public static class CustomerRepository {
+ public void foo(Customer x) {}
+ }
+
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
+ .withServices(new CustomerRepository())
+ .build();
+
+
+
+ @Test
+ public void whenJavaxJdoIntIdentity() throws Exception {
+ Object jdoObjectId = new javax.jdo.identity.IntIdentity(Customer.class, 123);
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoObjectId);
+ assertThat(id, is("i_123"));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoObjectIdRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoObjectIdRecreated, is(jdoObjectId));
+ }
+
+
+ @Test
+ public void whenJavaxJdoStringIdentity() throws Exception {
+ Object jdoObjectId = new javax.jdo.identity.StringIdentity(Customer.class, "123");
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoObjectId);
+ assertThat(id, is("s_123"));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoObjectIdRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoObjectIdRecreated, is(jdoObjectId));
+ }
+
+
+ @Test
+ public void whenJavaxJdoLongIdentity() throws Exception {
+ Object jdoObjectId = new javax.jdo.identity.LongIdentity(Customer.class, 123L);
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoObjectId);
+ assertThat(id, is("l_123"));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoObjectIdRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoObjectIdRecreated, is(jdoObjectId));
+ }
+
+
+ @Test
+ public void whenLong() throws Exception {
+ Object jdoOid = new ObjectId(Customer.class, 123L);
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
+ assertThat(id, is("L_123"));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoOidRecreated, is((Object)("123"+ "[OID]" + Customer.class.getName())));
+ }
+
+ @Test
+ public void whenDataNucleusOidAndLong() throws Exception {
+ Object jdoOid = new ObjectId(Customer.class, 123L);
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
+ assertThat(id, is("L_123"));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoOidRecreated, is((Object)("123"+ "[OID]" + Customer.class.getName())));
+ }
+
+ @Test
+ public void whenDataNucleusOidAndBigInteger() throws Exception {
+ Object jdoOid = new ObjectId(Customer.class, new BigInteger("123"));
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
+ assertThat(id, is("B_123"));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoOidRecreated, is(((Object)("123"+ "[OID]" + Customer.class.getName()))));
+ }
+
+ @Test
+ public void whenDataNucleusOidAndString() throws Exception {
+ Object jdoOid = new ObjectId(Customer.class, "456");
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
+ assertThat(id, is("S_456"));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoOidRecreated, is((Object)("456" + "[OID]" + Customer.class.getName())));
+ }
+
+ @Test
+ public void whenDataNucleusOidAndOtherKeyValue() throws Exception {
+ Date key = new Date();
+ Object jdoOid = new ObjectId(Customer.class, key);
+ String id = JdoObjectIdSerializer.toOidIdentifier(jdoOid);
+ assertThat(id, IsisMatchers.startsWith(ObjectId.class.getName() + "_" + key.toString()));
+
+ RootOidDefault oid = RootOidDefault.create(ObjectSpecId.of("CUS"), id);
+ Object jdoOidRecreated = JdoObjectIdSerializer.toJdoObjectId(oid);
+
+ assertThat(jdoOidRecreated, is((Object)(key.toString() + "[OID]" + Customer.class.getName())));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java
new file mode 100644
index 0000000..94087d7
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_lazyLoading.java
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.adaptermanager;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.ResolveState;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_lazyLoading {
+
+ private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
+ private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
+ .withServices(referencingRepo, referencedRepo)
+ .build();
+
+ @Test
+ public void lazyLoading_and_adapters() throws Exception {
+ iswf.beginTran();
+ referencedRepo.newEntity().setName("Referenced 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ UnidirReferencedEntity referencedEntity1 = referencedRepo.list().get(0);
+
+ UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
+ referencingEntity1.setName("Referencing 1");
+ referencingEntity1.setReferenced(referencedEntity1);
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<UnidirReferencingEntity> list = referencingRepo.list();
+ referencingEntity1 = list.get(0);
+
+ assertThat(referencingEntity1.referenced, is(nullValue())); // lazy loading
+ UnidirReferencedEntity referenced = referencingEntity1.getReferenced();
+ ObjectAdapter referencedAdapter = iswf.adapterFor(referenced);
+ assertThat(referencedAdapter.getResolveState(), is(ResolveState.RESOLVED));
+ assertThat(referenced, is(not(nullValue())));
+
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java
new file mode 100644
index 0000000..32487be
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_loadObject.java
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.adaptermanager;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_loadObject {
+
+ private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
+ private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
+ .withServices(referencingRepo, referencedRepo)
+ .build();
+
+
+ @Test
+ public void persist_then_update_using_persistentAdapterFor() throws Exception {
+
+ iswf.beginTran();
+ UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
+ referencedEntity1.setName("Referenced 1");
+ UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
+ referencedEntity2.setName("Referenced 2");
+
+ UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
+ referencingEntity1.setName("Referencing 1");
+ referencingEntity1.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
+ referencingEntity2.setName("Referencing 2");
+ referencingEntity2.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
+ referencingEntity3.setName("Referencing 3");
+ referencingEntity3.setReferenced(referencedEntity2);
+
+ iswf.commitTran();
+
+ TypedOid referencingOid2 = (TypedOid) iswf.adapterFor(referencingEntity2).getOid();
+
+ TypedOid referencedOid1 = (TypedOid) iswf.adapterFor(referencedEntity1).getOid();
+ TypedOid referencedOid2 = (TypedOid) iswf.adapterFor(referencedEntity2).getOid();
+
+
+ // when ...
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+
+ ObjectAdapter referencingAdapter2 = iswf.getPersistor().loadObject(referencingOid2);
+ referencingEntity2 = (UnidirReferencingEntity) referencingAdapter2.getObject();
+
+ UnidirReferencedEntity referenced = referencingEntity2.getReferenced();
+
+ ObjectAdapter referencedAdapter1 = iswf.getAdapterManager().adapterFor(referencedOid1);
+ assertThat(referenced, is(referencedAdapter1.getObject()));
+
+ // ...switch to refer to other
+
+ ObjectAdapter referencedAdapter2 = iswf.getAdapterManager().adapterFor(referencedOid2);
+ referencedEntity2 = (UnidirReferencedEntity) referencedAdapter2.getObject();
+
+ referencingEntity2.setReferenced(referencedEntity2);
+ iswf.commitTran();
+
+ }
+
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java
new file mode 100644
index 0000000..39d9833
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/adaptermanager/Persistence_persistentAdapterFor.java
@@ -0,0 +1,115 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.adaptermanager;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
+import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persistentAdapterFor {
+
+ private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
+ private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
+ .withServices(referencingRepo, referencedRepo)
+ .build();
+
+
+ @Test
+ public void persist_then_update_using_persistentAdapterFor() throws Exception {
+
+ iswf.beginTran();
+ UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
+ referencedEntity1.setName("Referenced 1");
+ UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
+ referencedEntity2.setName("Referenced 2");
+
+ UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
+ referencingEntity1.setName("Referencing 1");
+ referencingEntity1.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
+ referencingEntity2.setName("Referencing 2");
+ referencingEntity2.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
+ referencingEntity3.setName("Referencing 3");
+ referencingEntity3.setReferenced(referencedEntity2);
+
+ iswf.commitTran();
+
+ TypedOid referencingOid2 = (TypedOid) iswf.adapterFor(referencingEntity2).getOid();
+
+ TypedOid referencedOid1 = (TypedOid) iswf.adapterFor(referencedEntity1).getOid();
+ TypedOid referencedOid2 = (TypedOid) iswf.adapterFor(referencedEntity2).getOid();
+
+
+ // when ...
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+
+ ObjectAdapter referencingAdapter2 = iswf.getAdapterManager().adapterFor(referencingOid2);
+ referencingEntity2 = (UnidirReferencingEntity) referencingAdapter2.getObject();
+
+ UnidirReferencedEntity referenced = referencingEntity2.getReferenced();
+
+ ObjectAdapter referencedAdapter1 = iswf.getAdapterManager().adapterFor(referencedOid1);
+ assertThat(referenced, is(referencedAdapter1.getObject()));
+
+ // ...switch to refer to other
+
+ ObjectAdapter referencedAdapter2 = iswf.getAdapterManager().adapterFor(referencedOid2);
+ referencedEntity2 = (UnidirReferencedEntity) referencedAdapter2.getObject();
+
+ referencingEntity2.setReferenced(referencedEntity2);
+ iswf.commitTran();
+
+ // then...
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+
+ referencingAdapter2 = iswf.getAdapterManager().adapterFor(referencingOid2);
+ referencingEntity2 = (UnidirReferencingEntity) referencingAdapter2.getObject();
+
+ referenced = referencingEntity2.getReferenced();
+
+ referencedAdapter2 = iswf.getAdapterManager().adapterFor(referencedOid2);
+
+ // ...is switched
+ assertThat(referenced, is(referencedAdapter2.getObject()));
+
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java
new file mode 100644
index 0000000..b618efd
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithListParent.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.BidirWithListChildEntity;
+import org.apache.isis.core.tck.dom.refs.BidirWithListParentEntity;
+import org.apache.isis.core.tck.dom.refs.BidirWithListParentEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_bidirWithListParent {
+
+ private BidirWithListParentEntityRepository repo = new BidirWithListParentEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("BIDIRWITHLISTCHILDeNTITY"))
+ .with(Utils.listenerToDeleteFrom("BIDIRWITHLISTPARENTENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwoParents() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<BidirWithListParentEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistTwoChildrenOfParent() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ BidirWithListParentEntity retrievedEntity = repo.list().get(0);
+ retrievedEntity.newChild("Child 1 of Parent 1");
+ retrievedEntity.newChild("Child 2 of Parent 1");
+ retrievedEntity.newChild("Child 3 of Parent 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ retrievedEntity = repo.list().get(0);
+ List<BidirWithListChildEntity> children = retrievedEntity.getChildren();
+ assertThat(children.size(), is(3));
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java
new file mode 100644
index 0000000..21447b7
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_bidirWithSetParent.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.BidirWithSetChildEntity;
+import org.apache.isis.core.tck.dom.refs.BidirWithSetParentEntity;
+import org.apache.isis.core.tck.dom.refs.BidirWithSetParentEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_bidirWithSetParent {
+
+ private BidirWithSetParentEntityRepository repo = new BidirWithSetParentEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("BIDIRWITHSETCHILDENTITY"))
+ .with(Utils.listenerToDeleteFrom("BIDIRWITHSETPARENTENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwoParents() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<BidirWithSetParentEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistTwoChildrenOfParent() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ BidirWithSetParentEntity retrievedEntity = repo.list().get(0);
+ retrievedEntity.newChild("Child 1 of Parent 1");
+ retrievedEntity.newChild("Child 2 of Parent 1");
+ retrievedEntity.newChild("Child 3 of Parent 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ retrievedEntity = repo.list().get(0);
+ Set<BidirWithSetChildEntity> children = retrievedEntity.getChildren();
+ assertThat(children.size(), is(3));
+ iswf.commitTran();
+ }
+
+ @Ignore("Not currently working, is an update")
+ @Test
+ public void updateBidirectional() throws Exception {
+ iswf.beginTran();
+ BidirWithSetParentEntity parent1 = repo.newEntity();
+ parent1.setName("Parent 1");
+ BidirWithSetParentEntity parent2 = repo.newEntity();
+ parent2.setName("Parent 2");
+
+ parent1.newChild("Child 1 of Parent 1");
+ parent1.newChild("Child 2 of Parent 1");
+ parent1.newChild("Child 3 of Parent 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ parent1 = repo.list().get(0);
+ parent2 = repo.list().get(0);
+ Set<BidirWithSetChildEntity> children = parent1.getChildren();
+ assertThat(children.size(), is(3));
+ BidirWithSetChildEntity child1 = parent1.getChildren().iterator().next();
+ child1.moveTo(parent2);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ parent1 = repo.list().get(0);
+ parent2 = repo.list().get(0);
+ children = parent1.getChildren();
+ assertThat(children.size(), is(2));
+
+ children = parent2.getChildren();
+ assertThat(children.size(), is(1));
+ iswf.commitTran();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java
new file mode 100644
index 0000000..bb1b8c6
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyclass.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.PolyClassChildEntity;
+import org.apache.isis.core.tck.dom.refs.PolyClassParentEntity;
+import org.apache.isis.core.tck.dom.refs.PolyClassParentEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_polyclass {
+
+ private PolyClassParentEntityRepository repo = new PolyClassParentEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("POLYCLASSSUBTYPE1ENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYCLASSCHILDENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYCLASSPARENTENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwoParents() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<PolyClassParentEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistSixDifferentChildrenOfParent() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ PolyClassParentEntity retrievedEntity = repo.list().get(0);
+ retrievedEntity.newSubtype1("Child 1 of Parent 1", 123);
+ retrievedEntity.newSubtype1("Child 2 of Parent 1", 456);
+ retrievedEntity.newSubtype2("Child 3 of Parent 1", "abc");
+ retrievedEntity.newSubtype2("Child 4 of Parent 1", "def");
+ retrievedEntity.newSubtype3("Child 5 of Parent 1", BigDecimal.ONE);
+ retrievedEntity.newSubtype3("Child 6 of Parent 1", BigDecimal.TEN);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ retrievedEntity = repo.list().get(0);
+ Set<PolyClassChildEntity> children = retrievedEntity.getChildren();
+ assertThat(children.size(), is(6));
+ iswf.commitTran();
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java
new file mode 100644
index 0000000..60a8ee7
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinter.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.PolyInterface;
+import org.apache.isis.core.tck.dom.refs.PolyInterfaceParentEntity;
+import org.apache.isis.core.tck.dom.refs.PolyInterfaceParentEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_polyinter {
+
+ private PolyInterfaceParentEntityRepository repo = new PolyInterfaceParentEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACEPARENTENTITY_CHILDREN"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACESUBTYPE1ENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACESUBTYPE2ENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACESUBTYPE3ENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACEPARENTENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwoParents() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<PolyInterfaceParentEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistSixDifferentChildrenOfParent() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ PolyInterfaceParentEntity retrievedEntity = repo.list().get(0);
+ retrievedEntity.newSubtype1("Child 1 of Parent 1", 123);
+ retrievedEntity.newSubtype1("Child 2 of Parent 1", 456);
+ retrievedEntity.newSubtype2("Child 3 of Parent 1", "abc");
+ retrievedEntity.newSubtype2("Child 4 of Parent 1", "def");
+ retrievedEntity.newSubtype3("Child 5 of Parent 1", BigDecimal.ONE);
+ retrievedEntity.newSubtype3("Child 6 of Parent 1", BigDecimal.TEN);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ retrievedEntity = repo.list().get(0);
+ Set<PolyInterface> children = retrievedEntity.getChildren();
+ assertThat(children.size(), is(6));
+ iswf.commitTran();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java
new file mode 100644
index 0000000..9484c1d
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_polyinterIdentityStrategy.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.math.BigDecimal;
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.PolyInterfaceIdentityStrategy;
+import org.apache.isis.core.tck.dom.refs.PolyInterfaceIdentityStrategyParentEntity;
+import org.apache.isis.core.tck.dom.refs.PolyInterfaceIdentityStrategyParentEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_polyinterIdentityStrategy {
+
+ private PolyInterfaceIdentityStrategyParentEntityRepository repo = new PolyInterfaceIdentityStrategyParentEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYPARENTENTITY_CHILDREN"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYSUBTYPE1ENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYSUBTYPE2ENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYSUBTYPE3ENTITY"))
+ .with(Utils.listenerToDeleteFrom("POLYINTERFACEIDENTITYSTRATEGYPARENTENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwoParents() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<PolyInterfaceIdentityStrategyParentEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistSixDifferentChildrenOfParent() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ PolyInterfaceIdentityStrategyParentEntity retrievedEntity = repo.list().get(0);
+ retrievedEntity.newSubtype1("Child 1 of Parent 1", 123);
+ retrievedEntity.newSubtype1("Child 2 of Parent 1", 456);
+ retrievedEntity.newSubtype2("Child 3 of Parent 1", "abc");
+ retrievedEntity.newSubtype2("Child 4 of Parent 1", "def");
+ retrievedEntity.newSubtype3("Child 5 of Parent 1", BigDecimal.ONE);
+ retrievedEntity.newSubtype3("Child 6 of Parent 1", BigDecimal.TEN);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ retrievedEntity = repo.list().get(0);
+ Set<PolyInterfaceIdentityStrategy> children = retrievedEntity.getChildren();
+ assertThat(children.size(), is(6));
+ iswf.commitTran();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java
new file mode 100644
index 0000000..d29c674
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_referencing.java
@@ -0,0 +1,133 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_referencing {
+
+ private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
+ private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
+ .withServices(referencingRepo, referencedRepo)
+ .build();
+
+ @Test
+ public void persist() throws Exception {
+
+ iswf.beginTran();
+ referencedRepo.newEntity().setName("Referenced 1");
+ referencedRepo.newEntity().setName("Referenced 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ UnidirReferencedEntity referencedEntity1 = referencedRepo.list().get(0);
+ UnidirReferencedEntity referencedEntity2 = referencedRepo.list().get(1);
+
+ UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
+ referencingEntity1.setName("Referencing 1");
+ referencingEntity1.setReferenced(referencedEntity1);
+
+ UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
+ referencingEntity2.setName("Referencing 2");
+ referencingEntity2.setReferenced(referencedEntity1);
+
+ UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
+ referencingEntity3.setName("Referencing 3");
+ referencingEntity3.setReferenced(referencedEntity2);
+
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<UnidirReferencingEntity> list = referencingRepo.list();
+ referencingEntity1 = list.get(0);
+ referencingEntity2 = list.get(1);
+ referencingEntity3 = list.get(2);
+
+ assertThat(referencingEntity1.getReferenced(), is(not(nullValue())));
+ assertThat(referencingEntity2.getReferenced(), is(not(nullValue())));
+ assertThat(referencingEntity3.getReferenced(), is(not(nullValue())));
+
+ assertThat(referencingEntity1.getReferenced(), is(referencingEntity1.getReferenced()));
+ assertThat(referencingEntity1.getReferenced(), is(not(referencingEntity3.getReferenced())));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistAGraphOfObjects() throws Exception {
+
+ iswf.beginTran();
+ UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
+ referencedEntity1.setName("Referenced 1");
+ UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
+ referencedEntity2.setName("Referenced 2");
+
+ UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
+ referencingEntity1.setName("Referencing 1");
+ referencingEntity1.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
+ referencingEntity2.setName("Referencing 2");
+ referencingEntity2.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
+ referencingEntity3.setName("Referencing 3");
+ referencingEntity3.setReferenced(referencedEntity2);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<UnidirReferencingEntity> list = referencingRepo.list();
+ referencingEntity1 = list.get(0);
+ referencingEntity2 = list.get(1);
+ referencingEntity3 = list.get(2);
+
+ assertThat(referencingEntity1.getReferenced(), is(not(nullValue())));
+ assertThat(referencingEntity2.getReferenced(), is(not(nullValue())));
+ assertThat(referencingEntity3.getReferenced(), is(not(nullValue())));
+
+ assertThat(referencingEntity1.getReferenced(), is(referencingEntity1.getReferenced()));
+ assertThat(referencingEntity1.getReferenced(), is(not(referencingEntity3.getReferenced())));
+ iswf.commitTran();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java
new file mode 100644
index 0000000..387f561
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidir.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.UnidirFkChildEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirFkParentEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirFkParentEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_unidir {
+
+ private UnidirFkParentEntityRepository repo = new UnidirFkParentEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("UNIDIRFKCHILDENTITY"))
+ .with(Utils.listenerToDeleteFrom("UNIDIRFKPARENTENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwoParents() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<UnidirFkParentEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistTwoChildrenOfParent() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ UnidirFkParentEntity retrievedEntity = repo.list().get(0);
+ retrievedEntity.newChild("Child 1 of Parent 1");
+ retrievedEntity.newChild("Child 2 of Parent 1");
+ retrievedEntity.newChild("Child 3 of Parent 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ retrievedEntity = repo.list().get(0);
+ Set<UnidirFkChildEntity> children = retrievedEntity.getChildren();
+ assertThat(children.size(), is(3));
+ iswf.commitTran();
+ }
+
+ @Ignore("Not currently working, is an update")
+ @Test
+ public void updateBidirectional() throws Exception {
+ iswf.beginTran();
+ UnidirFkParentEntity parent1 = repo.newEntity();
+ parent1.setName("Parent 1");
+ UnidirFkParentEntity parent2 = repo.newEntity();
+ parent2.setName("Parent 2");
+
+ parent1.newChild("Child 1 of Parent 1");
+ parent1.newChild("Child 2 of Parent 1");
+ parent1.newChild("Child 3 of Parent 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ parent1 = repo.list().get(0);
+ parent2 = repo.list().get(0);
+ Set<UnidirFkChildEntity> children = parent1.getChildren();
+ assertThat(children.size(), is(3));
+ UnidirFkChildEntity child1 = parent1.getChildren().iterator().next();
+ parent1.removeChild(child1);
+ parent2.addChild(child1);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ parent1 = repo.list().get(0);
+ parent2 = repo.list().get(0);
+ children = parent1.getChildren();
+ assertThat(children.size(), is(2));
+
+ children = parent2.getChildren();
+ assertThat(children.size(), is(1));
+ iswf.commitTran();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java
new file mode 100644
index 0000000..3f56f4e
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_persist_unidirJoin.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+import java.util.Set;
+
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.UnidirJoinChildEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirJoinParentEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirJoinParentEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_persist_unidirJoin {
+
+ private UnidirJoinParentEntityRepository repo = new UnidirJoinParentEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("UNIDIRJOINCHILDENTITY"))
+ .with(Utils.listenerToDeleteFrom("UNIDIRJOINPARENTENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void persistTwoParents() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<UnidirJoinParentEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persistTwoChildrenOfParent() throws Exception {
+ iswf.beginTran();
+ repo.newEntity().setName("Parent 1");
+ repo.newEntity().setName("Parent 2");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ UnidirJoinParentEntity retrievedEntity = repo.list().get(0);
+ retrievedEntity.newChild("Child 1 of Parent 1");
+ retrievedEntity.newChild("Child 2 of Parent 1");
+ retrievedEntity.newChild("Child 3 of Parent 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ retrievedEntity = repo.list().get(0);
+ Set<UnidirJoinChildEntity> children = retrievedEntity.getChildren();
+ assertThat(children.size(), is(3));
+ iswf.commitTran();
+ }
+
+ @Ignore("Not currently working, is an update")
+ @Test
+ public void updateBidirectional() throws Exception {
+ iswf.beginTran();
+ UnidirJoinParentEntity parent1 = repo.newEntity();
+ parent1.setName("Parent 1");
+ UnidirJoinParentEntity parent2 = repo.newEntity();
+ parent2.setName("Parent 2");
+
+ parent1.newChild("Child 1 of Parent 1");
+ parent1.newChild("Child 2 of Parent 1");
+ parent1.newChild("Child 3 of Parent 1");
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ parent1 = repo.list().get(0);
+ parent2 = repo.list().get(0);
+ Set<UnidirJoinChildEntity> children = parent1.getChildren();
+ assertThat(children.size(), is(3));
+ UnidirJoinChildEntity child1 = parent1.getChildren().iterator().next();
+ parent1.removeChild(child1);
+ parent2.addChild(child1);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ parent1 = repo.list().get(0);
+ parent2 = repo.list().get(0);
+ children = parent1.getChildren();
+ assertThat(children.size(), is(2));
+
+ children = parent2.getChildren();
+ assertThat(children.size(), is(1));
+ iswf.commitTran();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java
new file mode 100644
index 0000000..b7d8026
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/refs/Persistence_update_using_domMethodCalls.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.refs;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencedEntityRepository;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntity;
+import org.apache.isis.core.tck.dom.refs.UnidirReferencingEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_update_using_domMethodCalls {
+
+ private UnidirReferencingEntityRepository referencingRepo = new UnidirReferencingEntityRepository();
+ private UnidirReferencedEntityRepository referencedRepo = new UnidirReferencedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCINGENTITY"))
+ .with(Utils.listenerToDeleteFrom("UNIDIRREFERENCEDENTITY"))
+ .withServices(referencingRepo, referencedRepo)
+ .build();
+
+
+ @Test
+ public void persist_then_update() throws Exception {
+
+ iswf.beginTran();
+ UnidirReferencedEntity referencedEntity1 = referencedRepo.newEntity();
+ referencedEntity1.setName("Referenced 1");
+ UnidirReferencedEntity referencedEntity2 = referencedRepo.newEntity();
+ referencedEntity2.setName("Referenced 2");
+
+ UnidirReferencingEntity referencingEntity1 = referencingRepo.newEntity();
+ referencingEntity1.setName("Referencing 1");
+ referencingEntity1.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity2 = referencingRepo.newEntity();
+ referencingEntity2.setName("Referencing 2");
+ referencingEntity2.setReferenced(referencedEntity1);
+ UnidirReferencingEntity referencingEntity3 = referencingRepo.newEntity();
+ referencingEntity3.setName("Referencing 3");
+ referencingEntity3.setReferenced(referencedEntity2);
+
+ iswf.commitTran();
+
+ // when ...
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<UnidirReferencingEntity> referencingList = referencingRepo.list();
+ referencingEntity1 = referencingList.get(0);
+ referencingEntity2 = referencingList.get(1);
+ referencingEntity3 = referencingList.get(2);
+
+ List<UnidirReferencedEntity> referencedList = referencedRepo.list();
+ referencedEntity1 = referencedList.get(0);
+ referencedEntity2 = referencedList.get(1);
+
+ assertThat(referencingEntity2.getReferenced(), is(referencedEntity1));
+
+ // ...switch to refer to other
+ referencingEntity2.setReferenced(referencedEntity2);
+ iswf.commitTran();
+
+ // then...
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ referencingList = referencingRepo.list();
+ referencingEntity1 = referencingList.get(0);
+ referencingEntity2 = referencingList.get(1);
+ referencingEntity3 = referencingList.get(2);
+
+ referencedList = referencedRepo.list();
+ referencedEntity1 = referencedList.get(0);
+ referencedEntity2 = referencedList.get(1);
+
+ // ...is switched
+ assertThat(referencingEntity2.getReferenced(), is(referencedEntity2));
+ iswf.commitTran();
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java
new file mode 100644
index 0000000..7a2fad1
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_allInstances.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_allInstances {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void whenNoInstances() {
+ iswf.beginTran();
+ final List<PrimitiveValuedEntity> list = repo.list();
+ assertThat(list.size(), is(0));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persist_dontBounce_listAll() throws Exception {
+
+ iswf.beginTran();
+ PrimitiveValuedEntity entity = repo.newEntity();
+ entity.setId(1);
+ entity = repo.newEntity();
+ entity.setId(2);
+ iswf.commitTran();
+
+ // don't bounce
+ iswf.beginTran();
+ List<PrimitiveValuedEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void persist_bounce_listAll() throws Exception {
+
+ iswf.beginTran();
+ repo.newEntity().setId(1);
+ repo.newEntity().setId(2);
+ iswf.commitTran();
+
+ iswf.bounceSystem();
+
+ iswf.beginTran();
+ List<PrimitiveValuedEntity> list = repo.list();
+ assertThat(list.size(), is(2));
+ iswf.commitTran();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java
new file mode 100644
index 0000000..4512592
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_bounceSystem {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void bounceSystem() throws Exception {
+ iswf.bounceSystem();
+ iswf.bounceSystem();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java
new file mode 100644
index 0000000..cea02d5
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+import org.apache.isis.objectstore.jdo.datanucleus.Utils;
+
+public class Persistence_findInstance {
+
+ private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
+
+ @Rule
+ public IsisSystemWithFixtures iswf = Utils.systemBuilder()
+ .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
+ .withServices(repo)
+ .build();
+
+ @Test
+ public void whenNoInstances() {
+ iswf.beginTran();
+ final PrimitiveValuedEntity entity = repo.findById(1);
+ assertThat(entity, is(nullValue()));
+ iswf.commitTran();
+ }
+
+ @Test
+ public void whenAnInstance() throws Exception {
+
+ iswf.beginTran();
+ repo.newEntity().setId(1);
+ iswf.commitTran();
+
+ iswf.beginTran();
+ final PrimitiveValuedEntity entity = repo.findById(1);
+ assertThat(entity, is(not(nullValue())));
+ assertThat(entity.getId(), is(1));
+ iswf.commitTran();
+ }
+
+
+}
[07/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java
deleted file mode 100644
index 23a06f9..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO {
-
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void success() throws Exception {
- // should return 204 (13.3)
- }
-
- @Ignore
- @Test
- public void failure() throws Exception {
- // should return 422, etc
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java
deleted file mode 100644
index 89a673e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenOptionalArg_whenNoArgProvided_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow_whenExplicitlySetToNull() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args.mapPut("from.value", (Integer)null);
- args.mapPut("to.value", (Integer)null);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- then(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy_whenExplicitlySetToNull() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from.value", (Integer)null);
- args.mapPut("to.value", (Integer)null);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
- }
-
-
- @Test
- public void usingClientFollow_whenImplicitlySetToNull() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- then(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy_whenImplicitlySetToNull() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
- }
-
-
- private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
-
- final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
-
- assertThat(listRepr.getValue().size(), is(5));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java
deleted file mode 100644
index 752b0c5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given a reference to a non-existent entity
- LinkRepresentation nonExistentEntityLink = new LinkRepresentation()
- .withHref("http://localhost:39393/objects/NONEXISTENT/123");
-
- // and given a representation of the 'contains' action accepting a entity href
- final JsonRepresentation containsAction = Util.givenAction(client, "ActionsEntities", "contains");
- final ObjectActionRepresentation containsActionRepr = containsAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = containsActionRepr.getInvoke();
- final JsonRepresentation args = invokeLink.getArguments();
-
- // when query the 'contains' action passing in the reference to the non-existent entity
- args.mapPut("searchFor.value", nonExistentEntityLink);
- args.mapPut("from.value", 0);
- args.mapPut("to.value", 1);
-
- RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(args, restfulResponse);
- }
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given a reference to a non-existent entity
- LinkRepresentation nonExistentEntityLink = new LinkRepresentation()
- .withHref("http://localhost:39393/objects/NONEXISTENT/123");
-
- // when query the 'contains' action passing in the reference to the non-existent entity
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("searchFor.value", nonExistentEntityLink);
- args.mapPut("from.value", 0);
- args.mapPut("to.value", 3);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(args, restfulResponse);
- }
-
- private static void then(final JsonRepresentation args, RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- // then the response is an error
- assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
- assertThat(restfulResponse.getHeader(Header.WARNING), is("Validation failed, see body for details"));
-
- // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
-
- RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
- JsonRepresentation repr = restfulResponseOfError.getEntity();
-
- assertThat(repr.getString("searchFor.value.href"), is(args.getString("searchFor.value.href")));
- assertThat(repr.getString("searchFor.invalidReason"), is("'href' does not reference a known entity"));
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java
deleted file mode 100644
index 74845d5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenRefArg_whenArgProvided_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given a reference to the first entity
- final ListRepresentation subListRepr = givenSublistActionInvoked(0, 1);
- assertThat(subListRepr.getValue().size(), is(1));
-
- LinkRepresentation firstEntityLink = subListRepr.getValue().arrayGet(0).asLink();
-
- // and given a representation of the 'contains' action accepting a entity href
- final JsonRepresentation containsAction = Util.givenAction(client, "ActionsEntities", "contains");
- final ObjectActionRepresentation containsActionRepr = containsAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = containsActionRepr.getInvoke();
- final JsonRepresentation args = invokeLink.getArguments();
- assertThat(args.size(), is(3));
-
- // when query the 'contains' action passing in the entity
- // (for a range where the entity is contained in the range)
- args.mapPut("searchFor.value", firstEntityLink);
- args.mapPut("from.value", 0);
- args.mapPut("to.value", 3);
-
- RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsScalarValueOf(restfulResponse, true);
-
-
- // and when query the 'contains' action for a different range which does not
- // contain the entity
- args.mapPut("searchFor.value", firstEntityLink);
- args.mapPut("from.value", 3);
- args.mapPut("to.values", 5);
-
- restfulResponse = client.followT(invokeLink, args);
-
- // then
- thenResponseIsScalarValueOf(restfulResponse, false);
- }
-
-
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given a reference to the first entity
- final ListRepresentation subListRepr = givenSublistActionInvoked(0, 1);
- LinkRepresentation firstEntityLink = subListRepr.getValue().arrayGet(0).asLink();
-
- // when query the 'contains' action passing in the entity
- // (for a range where the entity is contained in the range)
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("searchFor.value", firstEntityLink);
- args.mapPut("from.value", 0);
- args.mapPut("to.value", 3);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- thenResponseIsScalarValueOf(restfulResponse, true);
- }
-
- private void thenResponseIsScalarValueOf(RestfulResponse<ActionResultRepresentation> restfulResponse, boolean value) throws IOException {
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
- assertThat(actionResultRepr.getResultType(), is(ResultType.SCALAR_VALUE));
- JsonRepresentation resultRepr = actionResultRepr.getResult();
- assertThat(resultRepr, is(not(nullValue())));
-
- ScalarValueRepresentation scalarValueRepr = resultRepr.as(ScalarValueRepresentation.class);
-
- LinkRepresentation returnTypeLink = scalarValueRepr.getLinkWithRel(Rel.RETURN_TYPE);
- assertThat(returnTypeLink, is(not(nullValue())));
- assertThat(returnTypeLink, isLink(client)
- .rel(Rel.RETURN_TYPE)
- .href(Matchers.endsWith(":39393/domain-types/boolean"))
- .returning(HttpStatusCode.OK)
- .build());
-
- assertThat(scalarValueRepr.getValue().asBoolean(), is(value));
- }
-
-
- private ListRepresentation givenSublistActionInvoked(int from, int to) throws Exception {
- final JsonRepresentation givenSubListAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenSubListAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
- final JsonRepresentation args = invokeLink.getArguments();
-
- // when
- args.mapPut("from.value", from);
- args.mapPut("to.value", to);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
- return actionResultRepr.getResult().as(ListRepresentation.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java
deleted file mode 100644
index 9dba3f3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Ignore
- @Test
- public void success() throws Exception {
- // should return 204 (13.3)
- }
-
- @Ignore
- @Test
- public void failure() throws Exception {
- // should return 422, etc
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index 7c6d289..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java
deleted file mode 100644
index a99d75a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index 0dec01e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java
deleted file mode 100644
index f8d7c95..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index d80e5fd..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBlob_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java
deleted file mode 100644
index fe637fa..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBlob_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index 8708e17..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java
deleted file mode 100644
index e858c7a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgBoolean_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index 00676c3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgClob_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index c2b72f9..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java
deleted file mode 100644
index 8b2d4ae..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgDateTime_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index e42a304..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgDate_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java
deleted file mode 100644
index d7a633f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgDate_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index d805010..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java
deleted file mode 100644
index ec6bd33..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgDecimal_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index 2519e5c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenScalarArgInteger_whenArgMalformed_bad_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args.mapPut("from.value", 1);
- args.mapPut("to.value", 3);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- then(restfulResponse);
- }
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from.value", 1);
- args.mapPut("to.value", 3);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
- }
-
- private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
-
- final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
-
- assertThat(listRepr.getValue().size(), is(2));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java
deleted file mode 100644
index c3cb3bb..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenScalarArgInteger_whenArgProvided_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
- .build());
-
- JsonRepresentation args =invokeLink.getArguments();
- assertThat(args.size(), is(2));
- assertThat(args, RestfulMatchers.mapHas("from"));
- assertThat(args, RestfulMatchers.mapHas("to"));
-
- // when
- args.mapPut("from.value", 1);
- args.mapPut("to.value", 3);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- then(restfulResponse);
- }
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from.value", 1);
- args.mapPut("to.value", 3);
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
- }
-
- private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
- final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
-
- assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
-
- final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
-
- assertThat(listRepr.getValue().size(), is(2));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index dcfa4dd..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgString_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java
deleted file mode 100644
index 2c6f778..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgString_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index a14ea36..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgTime_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java
deleted file mode 100644
index ed84e0b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgTime_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java
deleted file mode 100644
index 602fcfb..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java
deleted file mode 100644
index 496c6c8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-public class Get_givenScalarArgUtcMillisec_whenArgProvided_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java
deleted file mode 100644
index 3082091..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArg_whenArgMalformedMissingValueNode_bad.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
-
-import java.io.IOException;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenScalarArg_whenArgMalformedMissingValueNode_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- serviceResource = client.getDomainServiceResource();
- }
-
-
- @Test
- public void usingClientFollow_whenImplicitlySetToNull() throws Exception {
-
- // given
- final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
- final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
-
- final LinkRepresentation invokeLink = actionRepr.getInvoke();
-
- assertThat(invokeLink, isLink(client)
- .rel(Rel.INVOKE)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
- .build());
-
- // when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from", JsonRepresentation.newMap());
- args.mapPut("to.value", (Integer)null);
-
- final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
-
- // then
- then(restfulResponse);
- }
-
-
- @Test
- public void usingResourceProxy_whenExplicitSetToNull() throws Exception {
-
- // given, when
- JsonRepresentation args = JsonRepresentation.newMap();
- args.mapPut("from", JsonRepresentation.newMap());
- args.mapPut("to.value", (Integer)null);
-
- Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
- RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
-
- // then
- then(restfulResponse);
- }
-
-
- private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
- assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
- final JsonRepresentation errorRepr = restfulResponse.wraps(JsonRepresentation.class).getEntity();
-
- assertThat(errorRepr.getString("from.invalidReason"), is("No 'value' key"));
- }
-
-}
[26/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java
new file mode 100644
index 0000000..0236708
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java
@@ -0,0 +1,161 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import java.io.IOException;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenQueryArg_xRoFollowLinks_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Test
+ public void self() throws Exception {
+ final String href = givenHrefToService("WrapperValuedEntities");
+
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "links[rel=self]");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = restfulResponse.getEntity();
+
+ assertThat(repr.getSelf().getValue(), is(not(nullValue())));
+ }
+
+ @Test
+ public void toDescribedBy() throws Exception {
+ final String href = givenHrefToService("WrapperValuedEntities");
+
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "links[rel=describedby]");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = restfulResponse.getEntity();
+
+ assertThat(repr.getLinkWithRel(Rel.DESCRIBEDBY).getValue(), is(not(nullValue())));
+ }
+
+ @Test
+ public void toMembersDetails() throws Exception {
+ final String href = givenHrefToService("WrapperValuedEntities");
+
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members.links[rel=%s]", Rel.DETAILS.getName());
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = restfulResponse.getEntity();
+
+ final JsonRepresentation membersList = repr.getMembers();
+ assertThat(membersList, isMap());
+
+ JsonRepresentation actionRepr;
+
+ actionRepr = membersList.getRepresentation("list");
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"]"), is(not(nullValue())));
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"].value"), is(not(nullValue()))); // followed
+
+ actionRepr = membersList.getRepresentation("newEntity");
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"]"), is(not(nullValue())));
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"].value"), is(not(nullValue()))); // also followed
+ }
+
+ @Test
+ public void singleMember_specified_by_criteria() throws Exception {
+
+ final String href = givenHrefToService("WrapperValuedEntities");
+
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s]", "list", Rel.DETAILS.andParam("action", "list"));
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = restfulResponse.getEntity();
+
+ final JsonRepresentation membersList = repr.getMembers();
+ assertThat(membersList, isMap());
+
+ JsonRepresentation actionRepr;
+
+ actionRepr = membersList.getRepresentation("list");
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"]"), is(not(nullValue())));
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"].value"), is(not(nullValue()))); // followed
+
+ actionRepr = membersList.getRepresentation("newEntity");
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"]"), is(not(nullValue())));
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"].value"), is(nullValue())); // not followed
+ }
+
+ @Test
+ public void toMultipleMembersDetails() throws Exception {
+
+ final String href = givenHrefToService("WrapperValuedEntities");
+
+ final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s],members[%s].links[rel=%s]", "list", Rel.DETAILS.andParam("action", "list"), "newEntity", Rel.DETAILS.andParam("action", "newEntity"));
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = restfulResponse.getEntity();
+
+ final JsonRepresentation membersList = repr.getMembers();
+ assertThat(membersList, isMap());
+
+ JsonRepresentation actionRepr;
+
+ actionRepr = membersList.getRepresentation("list");
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"]"), is(not(nullValue())));
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"].value"), is(not(nullValue()))); // followed
+
+ actionRepr = membersList.getRepresentation("newEntity");
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"]"), is(not(nullValue())));
+ assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"].value"), is(not(nullValue()))); // also followed
+ }
+
+ private String givenHrefToService(final String serviceId) throws IOException {
+ return Util.givenHrefToService(client, serviceId);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
new file mode 100644
index 0000000..51284a6
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+public class Get_whenRequestHeaders_Accept_isInvalid_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java
new file mode 100644
index 0000000..8b10d6a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenRequestHeaders_Accept_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private RestfulRequest request;
+
+ private String href;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ href = Util.givenLinkToService(client, "JdkValuedEntities");
+ request = client.createRequest(RestfulHttpMethod.GET, href);
+ }
+
+ @Test
+ public void applicationJson_noProfile_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+ @Test
+ public void applicationJson_profileDomainObject_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.DOMAIN_OBJECT.getMediaType());
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+ @Test
+ public void missingHeader_returns200() throws Exception {
+
+ final RestfulResponse<DomainObjectRepresentation> restfulResp = request.executeT();
+
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
+ }
+
+ @Test
+ public void applicationJson_profileIncorrect_returns406() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
+ final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+ @Test
+ public void incorrectMediaType_returnsNotAcceptable() throws Exception {
+
+ // given
+ final ClientRequest clientRequest = client.getClientRequestFactory().createRequest(href);
+ clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
+
+ // when
+ final ClientResponse<?> resp = clientRequest.get();
+ final RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(resp);
+
+ // then
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java
new file mode 100644
index 0000000..b425b4a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource domainServiceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainServiceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = domainServiceResource.service("ActionsEntities");
+ final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final DomainObjectRepresentation servicesRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = servicesRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to a service resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java
new file mode 100644
index 0000000..3a73c44
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource domainServiceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainServiceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+
+ // given
+ final Response serviceResp = domainServiceResource.service("ActionsEntities");
+ final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.PUT);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to a service resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java
new file mode 100644
index 0000000..54d7964
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private HomePageResource homePageResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ homePageResource = client.getHomePageResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = homePageResource.homePage();
+ final RestfulResponse<HomePageRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final HomePageRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the home page resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
new file mode 100644
index 0000000..5db4480
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private HomePageResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getHomePageResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
new file mode 100644
index 0000000..5685315
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private HomePageResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getHomePageResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java
new file mode 100644
index 0000000..df7e573
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private HomePageResource homePageResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ homePageResource = client.getHomePageResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = homePageResource.homePage();
+ final RestfulResponse<HomePageRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final HomePageRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the home page resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java
new file mode 100644
index 0000000..d07d5e7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private HomePageResource homePageResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ homePageResource = client.getHomePageResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = homePageResource.homePage();
+ final RestfulResponse<HomePageRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final HomePageRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation putLink = selfLink.withMethod(RestfulHttpMethod.PUT);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(putLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the home page resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java
new file mode 100644
index 0000000..0417dc0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Delete_then_405_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java
new file mode 100644
index 0000000..575d206
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Get_then_405_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java
new file mode 100644
index 0000000..0e09ec5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..2e4e4a1
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..6a3f280
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..2e59d4e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java
new file mode 100644
index 0000000..ccf8b70
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_thenResponseHeaders_Location_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..2931252
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_thenResponseHeaders_eTag_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java
new file mode 100644
index 0000000..2fab7fc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_then_201_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
new file mode 100644
index 0000000..0860425
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
new file mode 100644
index 0000000..b25a7aa
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java
new file mode 100644
index 0000000..6637f14
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_whenArgsMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java
new file mode 100644
index 0000000..9166228
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_whenArgsMandatoryButMissing_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java
new file mode 100644
index 0000000..ffddefc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Post_whenArgsValid_thenPersistsObject_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java
new file mode 100644
index 0000000..8a8f5f3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
+
+public class Put_then_405_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java
new file mode 100644
index 0000000..a20063d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.*;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
+import static org.hamcrest.CoreMatchers.*;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Delete_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private UserResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getUserResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response resp = resource.user();
+
+ final RestfulResponse<UserRepresentation> jsonResp = RestfulResponse.ofT(resp);
+ final UserRepresentation repr = jsonResp.getEntity();
+ final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the user resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
new file mode 100644
index 0000000..acaabfb
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private UserResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getUserResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
new file mode 100644
index 0000000..5516779
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private UserResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getUserResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java
new file mode 100644
index 0000000..6578b26
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java
@@ -0,0 +1,106 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
+import static org.hamcrest.CoreMatchers.endsWith;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private UserResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getUserResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response resp = resource.user();
+
+ // when
+ final RestfulResponse<UserRepresentation> jsonResp = RestfulResponse.ofT(resp);
+ assertThat(jsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
+
+ final UserRepresentation repr = jsonResp.getEntity();
+ assertThat(repr, is(not(nullValue())));
+ assertThat(repr.isMap(), is(true));
+
+ assertThat(repr.getSelf(), isLink(client)
+ .rel(Rel.SELF)
+ .href(endsWith(":39393/user"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.USER.getMediaType())
+ .returning(HttpStatusCode.OK)
+ );
+
+ assertThat(repr.getUp(), isLink(client)
+ .rel(Rel.UP)
+ .href(endsWith(":39393/"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.HOME_PAGE.getMediaType())
+ .returning(HttpStatusCode.OK)
+ );
+ assertThat(repr.getUserName(), is(not(nullValue())));
+
+ // TODO: change fixture so populated
+ assertThat(repr.getFriendlyName(), is(nullValue()));
+ assertThat(repr.getEmail(), is(nullValue()));
+ assertThat(repr.getRoles(), is(not(nullValue())));
+
+ assertThat(repr.getLinks(), isArray());
+ assertThat(repr.getExtensions(), isMap());
+ }
+}
+
+
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java
new file mode 100644
index 0000000..358cba1
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.user.root;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMaxAge;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_CacheControl_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private UserResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getUserResource();
+ }
+
+
+ @Test
+ public void ok() throws Exception {
+
+ // given
+ final Response resp = resource.user();
+
+ // when
+ final RestfulResponse<UserRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ final CacheControl cacheControl = restfulResponse.getHeader(Header.CACHE_CONTROL);
+ assertThat(cacheControl, hasMaxAge(60 * 60));
+ assertThat(cacheControl.getMaxAge(), is(60 * 60));
+ }
+}
[28/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..d558786
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenScalar_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..023d719
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenScalar_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..28921d3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenRepresentation_ok_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenVoid_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..aaccf4b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenVoid_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..6e702a4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenVoid_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void todo() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java
new file mode 100644
index 0000000..00450fa
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_givenActionSemanticsOfIdempotent_then_205_bad_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Ignore("to write - copied from req_safe")
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given, when
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ invokeLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ // not possible to test using resourceProxy
+
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java
new file mode 100644
index 0000000..fa8e824
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_givenActionSemanticsOfSafe_then_205_bad_TOFIX {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Ignore("currently failing")
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given, when
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ invokeLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ // not possible to test using resourceProxy
+
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java
new file mode 100644
index 0000000..c167c62
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_givenViewModel_then_ok_TODO.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.core.Response;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_givenViewModel_then_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Ignore
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java
new file mode 100644
index 0000000..8f898f3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_thenRepresentation_doesNotContainSelfLink_ok.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+public class Post_thenRepresentation_doesNotContainSelfLink_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+
+ /**
+ * Tests might change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findByIdNotIdempotent");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final JsonRepresentation args =invokeLink.getArguments();
+
+ // when
+ args.mapPut("id.value", 1);
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ final JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 1);
+
+ final Response response = serviceResource.invokeAction("ActionsEntities", "findByIdNotIdempotent", JsonNodeUtils.asInputStream(args));
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+
+ }
+
+ private void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws Exception {
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+ assertThat(actionResultRepr.mapHas("links[rel=self]"), is(false));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
new file mode 100644
index 0000000..2c1fc94
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenInvokeArgWithObjectReference_thenOK.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.jboss.resteasy.client.core.executors.URLConnectionClientExecutor;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.tck.dom.refs.ParentEntity;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectCollectionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+/**
+ * This test calls {@link ParentEntity#getChildren()} to retrieve the list of children,
+ * then invokes {@link ParentEntity#removeChild(org.apache.isis.core.tck.dom.refs.ChildEntity)} to remove
+ * one of the children (expoiting the fact that a list of {@link ParentEntity#choices0RemoveChild() choices} is
+ * provided), then finally calls {@link ParentEntity#getChildren()} once more to confirm that one of the children has been removed.
+ */
+public class Post_whenInvokeArgWithObjectReference_thenOK {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainObjectResource objectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient(new URLConnectionClientExecutor());
+ objectResource = client.getDomainObjectResource();
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ RestfulResponse<ObjectCollectionRepresentation> childrenRestfulResponse =
+ RestfulResponse.ofT(objectResource.accessCollection("PRNT", "53", "children"));
+ ObjectCollectionRepresentation childrenRepr = childrenRestfulResponse.getEntity();
+
+ JsonRepresentation collValue = childrenRepr.getValue();
+
+ final int numChildren = collValue.size();
+ assertThat(numChildren, is(IsisMatchers.greaterThan(0)));
+
+ final LinkRepresentation firstChildRepr = collValue.arrayIterator(LinkRepresentation.class).next();
+
+ // when
+ final RestfulResponse<ObjectActionRepresentation> removeChildRestfulResponse =
+ RestfulResponse.ofT(objectResource.actionPrompt("PRNT", "53", "removeChild"));
+ final ObjectActionRepresentation removeChildRepr = removeChildRestfulResponse.getEntity();
+
+ LinkRepresentation invokeLinkRepr = removeChildRepr.getLinkWithRel(Rel.INVOKE);
+ JsonRepresentation args = invokeLinkRepr.getArguments();
+ args.mapPut("childEntity.value", firstChildRepr);
+ RestfulResponse<JsonRepresentation> invokeResp = client.follow(invokeLinkRepr, args);
+
+ @SuppressWarnings("unused")
+ JsonRepresentation invokeRepr = invokeResp.getEntity();
+ final HttpStatusCode status = invokeResp.getStatus();
+ assertThat(status, is(HttpStatusCode.OK));
+
+ // then
+ childrenRestfulResponse =
+ RestfulResponse.ofT(objectResource.accessCollection("PRNT", "53", "children"));
+ childrenRepr = childrenRestfulResponse.getEntity();
+
+ collValue = childrenRepr.getValue();
+ assertThat(collValue.size(), is(numChildren-1));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java
new file mode 100644
index 0000000..2a06d0a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_whenRequestHeaders_Accept_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
new file mode 100644
index 0000000..f3998aa
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Post_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Post_whenRequestHeaders_Accept_whenInvalid_406_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java
new file mode 100644
index 0000000..6f804d4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_givenActionSemanticsOfNotIdempotent_then_405_bad_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Ignore("to write - copied from req_safe")
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given, when
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ invokeLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ // not possible to test using resourceProxy
+
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java
new file mode 100644
index 0000000..6aba617
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenActionSemanticsOfSafe_then_405_bad_TODO.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_givenActionSemanticsOfSafe_then_405_bad_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Ignore("to write - copied from req_safe")
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given, when
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ invokeLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 123);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsErrorWithInvalidReason(restfulResponse);
+ }
+
+
+ // not possible to test using resourceProxy
+
+
+ private static void thenResponseIsErrorWithInvalidReason(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("object is immutable")); // not a good message, but as per spec
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java
new file mode 100644
index 0000000..80aa93e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_givenViewModel_then_ok_TODO.java
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_givenViewModel_then_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Ignore
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java
new file mode 100644
index 0000000..86355e7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_thenRepresentation_doesNotContainSelfLink_ok.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+public class Put_thenRepresentation_doesNotContainSelfLink_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ /**
+ * Tests might change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "findByIdIdempotent");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final JsonRepresentation args =invokeLink.getArguments();
+
+ // when
+ args.mapPut("id.value", 1);
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ final JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("id.value", 1);
+
+ final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "findByIdIdempotent", JsonNodeUtils.asInputStream(args));
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+
+ }
+
+ private void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws Exception {
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+ assertThat(actionResultRepr.getSelf(), is(nullValue()));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java
new file mode 100644
index 0000000..be2dfda
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_whenRequestHeaders_Accept_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
new file mode 100644
index 0000000..ed3c13f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Put_whenRequestHeaders_Accept_whenInvalid_406_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java
new file mode 100644
index 0000000..fdd940e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgsContainsPlusSymbol_then_ok.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import javax.ws.rs.core.Response;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+// ISIS-797
+public class Put_whenStringArgsContainsPlusSymbol_then_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ /**
+ * Tests might change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ final JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("str1.value", "abc+def");
+ args.mapPut("str2.value", "HOORAY");
+
+ final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "concatenate", JsonNodeUtils.asInputStream(args));
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final ActionResultRepresentation entity = restfulResponse.getEntity();
+ final ScalarValueRepresentation svr = entity.getResult().as(ScalarValueRepresentation.class);
+ assertThat(svr.getValue().asString(), is("abc+defHOORAY"));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java
new file mode 100644
index 0000000..a8e6591
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Put_whenStringArgs_then_ok.java
@@ -0,0 +1,111 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import javax.ws.rs.core.Response;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.JsonNodeUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_whenStringArgs_then_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ /**
+ * Tests might change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "concatenate");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final JsonRepresentation args =invokeLink.getArguments();
+
+ // when
+ args.mapPut("str1.value", "IVA VENDITE 21%");
+ args.mapPut("str2.value", "AAA");
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(restfulResponse, "IVA VENDITE 21%AAA");
+ }
+
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ final JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("str1.value", "IVA VENDITE 21%");
+ args.mapPut("str2.value", "AAA");
+
+ final Response response = serviceResource.invokeActionIdempotent("ActionsEntities", "concatenate", JsonNodeUtils.asInputStream(args));
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse, "IVA VENDITE 21%AAA");
+ }
+
+ private void then(RestfulResponse<ActionResultRepresentation> restfulResponse, final String expected) throws Exception {
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ final ActionResultRepresentation entity = restfulResponse.getEntity();
+ final ScalarValueRepresentation svr = entity.getResult().as(ScalarValueRepresentation.class);
+ assertThat(svr.getValue().asString(), is(expected));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java
new file mode 100644
index 0000000..7a1e97f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Delete_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource domainServiceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainServiceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = domainServiceResource.service("ActionsEntities");
+ final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation upLink = serviceRepr.getLinkWithRel(Rel.UP);
+ final LinkRepresentation deleteLink = upLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the services resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
new file mode 100644
index 0000000..fce2fc7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
new file mode 100644
index 0000000..3c4824d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.*;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+
+}
[35/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
new file mode 100644
index 0000000..3b235ec
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectCollectionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenRepresentation_ok {
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Test
+ public void representation() throws Exception {
+
+ // when
+ final Response collectionResp = domainObjectResource.accessCollection("BSRL", "73", "visibleAndEditableCollection");
+ final RestfulResponse<ObjectCollectionRepresentation> collectionJsonResp = RestfulResponse.ofT(collectionResp);
+ assertThat(collectionJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ // then
+ final ObjectCollectionRepresentation collectionRepr = collectionJsonResp.getEntity();
+
+ assertThat(collectionRepr.getString("memberType"), is("collection"));
+
+ // self link
+ final LinkRepresentation selfLink = collectionRepr.getLinkWithRel(Rel.SELF);
+ assertThat(selfLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/objects/BSRL/73/collections/visibleAndEditableCollection"))
+ .returning(HttpStatusCode.OK)
+ .build());
+
+ // up link
+ final LinkRepresentation upLink = collectionRepr.getLinkWithRel(Rel.UP);
+ assertThat(upLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("http://localhost:39393/objects/BSRL/73"))
+ .returning(HttpStatusCode.OK)
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
+ .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/73/collections/visibleAndEditableCollection"))
+ .build());
+
+ assertThat(addtoLink.getArguments(), is(not(nullValue())));
+ assertThat(addtoLink.getArguments().isArray(), is(false));
+ assertThat(addtoLink.getArguments().size(), is(1));
+
+ //remove-from link
+ final LinkRepresentation removeFromLink = collectionRepr.getLinkWithRel(Rel.REMOVE_FROM);
+ assertThat(removeFromLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.DELETE)
+ .type(RepresentationType.OBJECT_COLLECTION.getMediaType())
+ .href(endsWith("/objects/BSRL/73/collections/visibleAndEditableCollection"))
+ .build());
+
+ assertThat(removeFromLink.getArguments(), is(not(nullValue())));
+ assertThat(removeFromLink.getArguments().isArray(), is(false));
+ assertThat(removeFromLink.getArguments().size(), is(1));
+
+ // described by link
+ final LinkRepresentation describedByLink = collectionRepr.getLinkWithRel(Rel.DESCRIBEDBY);
+ assertThat(describedByLink, isLink(client)
+ .returning(HttpStatusCode.OK)
+ .responseEntityWithSelfHref(describedByLink.getHref())
+ .build());
+
+ assertThat(collectionRepr.getArray("value").isArray(),is(true));
+
+ assertThat(collectionRepr.getExtensions(), isMap());
+ assertThat(collectionRepr.getExtensions().getString("collectionSemantics"), is("list"));
+ assertThat(collectionRepr.getExtensions().getArray("changed").isArray(), is(true));
+ assertThat(collectionRepr.getExtensions().getArray("disposed").isArray(), is(true));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..a64d32f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..d43dcb4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Test
+ public void collectionDetails() throws Exception {
+
+ // when
+ final Response collectionResp = domainObjectResource.accessCollection("BSRL", "73", "visibleAndEditableCollection");
+ final RestfulResponse<ObjectPropertyRepresentation> collectionJsonResp = RestfulResponse.ofT(collectionResp);
+ assertThat(collectionJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..7b0801c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ // TODO: should also assert on the x-ro-element-type, using RestfulMatchers#hasxRoElementType(...)
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..e91e6a3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Get_thenResponseHeaders_eTag_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java
new file mode 100644
index 0000000..b56ee79
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_then_200_ok {
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+
+ @Test
+ public void collectionDetails() throws Exception {
+
+ // when
+ final Response collectionResp = domainObjectResource.accessCollection("BSRL", "73", "visibleAndEditableCollection");
+ final RestfulResponse<ObjectPropertyRepresentation> collectionJsonResp = RestfulResponse.ofT(collectionResp);
+ assertThat(collectionJsonResp.getStatus(), is(HttpStatusCode.OK));
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java
new file mode 100644
index 0000000..d60d84a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Get_whenArg_then_405_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java
new file mode 100644
index 0000000..5b12b63
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenDoesntExistColl_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void returns404() throws Exception {
+
+ // given
+ RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/collections/nonExistentCollection");
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java
new file mode 100644
index 0000000..986c431
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.jboss.resteasy.client.core.executors.URLConnectionClientExecutor;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenDoesntExistOid_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient(new URLConnectionClientExecutor());
+ }
+
+ @Test
+ public void returns404() throws Exception {
+
+ givenWhenThen("73", RestfulResponse.HttpStatusCode.OK);
+ givenWhenThen("nonExistentOid", RestfulResponse.HttpStatusCode.NOT_FOUND);
+
+ }
+
+ private void givenWhenThen(String oid, RestfulResponse.HttpStatusCode statusCode1) {
+ // given
+ RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/" +
+ oid +
+ "/collections/visibleAndEditableCollection");
+
+ // when
+ RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(statusCode1));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java
new file mode 100644
index 0000000..cdce258
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenHiddenColl_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void returns404() throws Exception {
+
+ // given
+ RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/collections/invisibleCollection");
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..2d12768
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectCollectionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ request = client.createRequest(RestfulHttpMethod.GET, "/objects/BSRL/73/collections/visibleAndEditableCollection");
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<ObjectCollectionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<ObjectCollectionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
new file mode 100644
index 0000000..1b5a8d8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java
new file mode 100644
index 0000000..a55e08d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import javax.ws.rs.core.MediaType;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenRequestHeaders_Accept_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/73/collections/visibleAndEditableCollection");
+ }
+
+ @Test
+ public void applicationJson_noProfile_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+
+ @Test
+ public void applicationJson_profileObjectProperty_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.OBJECT_COLLECTION.getMediaType());
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+ @Test
+ public void missingHeader_returns200() throws Exception {
+
+ final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
+
+ assertThat(restfulResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
new file mode 100644
index 0000000..3837da0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Get_whenRequestHeaders_Accept_whenInvalid_406_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java
new file mode 100644
index 0000000..e7bede1
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_givenDisabled_then_203_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java
new file mode 100644
index 0000000..3ec986d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
new file mode 100644
index 0000000..2fe8390
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
new file mode 100644
index 0000000..79010b5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java
new file mode 100644
index 0000000..29a16b2
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_givenHidden_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
new file mode 100644
index 0000000..9899f62
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..77c69e0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..d780a11
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Post_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..6551aa6
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Post_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..21566aa
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Post_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..67bc9be
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_thenResponseHeaders_eTag_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java
new file mode 100644
index 0000000..66bf63a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_then_200_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
new file mode 100644
index 0000000..93c27cf
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
new file mode 100644
index 0000000..e1974f2
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java
new file mode 100644
index 0000000..16f0d3a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenArgIsMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java
new file mode 100644
index 0000000..d1e4624
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenArgMandatoryButMissing_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
new file mode 100644
index 0000000..d30224c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Post_whenArgValid_thenEntityAddedToCollection_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
new file mode 100644
index 0000000..faea0f9
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java
new file mode 100644
index 0000000..20393a3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Post_whenArgValueIsInvalid_bad_TODO {
+
+}
[14/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java
deleted file mode 100644
index ed5977e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok.java
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenEntityWithPrimitiveProperties_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void thenMembers() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
- domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
-
- // then members (types)
- DomainObjectMemberRepresentation property;
- ScalarValueRepresentation scalarRepr;
-
- property = domainObjectRepr.getProperty("booleanProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is(nullValue()));
- assertThat(property.getXIsisFormat(), is("boolean"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isBoolean(), is(true));
- Boolean booleanValue = scalarRepr.asBoolean();
- assertThat(booleanValue, is(equalTo(Boolean.TRUE)));
-
- property = domainObjectRepr.getProperty("byteProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("byte"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isIntegralNumber(), is(true));
- Byte byteValue = scalarRepr.asByte();
- assertThat(byteValue, is((byte)123));
-
- property = domainObjectRepr.getProperty("shortProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("short"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isIntegralNumber(), is(true));
- Short shortValue = scalarRepr.asShort();
- assertThat(shortValue, is((short)32123));
-
- property = domainObjectRepr.getProperty("intProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("int"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isInt(), is(true));
- Integer intValue = scalarRepr.asInt();
- assertThat(intValue, is(987654321));
-
- property = domainObjectRepr.getProperty("longProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("long"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isLong(), is(true));
- Long longValue = scalarRepr.asLong();
- assertThat(longValue, is(2345678901234567890L));
-
- property = domainObjectRepr.getProperty("charProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is(nullValue()));
- assertThat(property.getXIsisFormat(), is("char"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- Character charValue = scalarRepr.asChar();
- assertThat(charValue, is('a'));
-
- property = domainObjectRepr.getProperty("floatProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("decimal"));
- assertThat(property.getXIsisFormat(), is("float"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isNumber(), is(true));
- assertThat(scalarRepr.isIntegralNumber(), is(false));
- Float floatValue = scalarRepr.asFloat();
- assertThat(floatValue, is(12345678901234567890.1234567890F));
-
- property = domainObjectRepr.getProperty("doubleProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("decimal"));
- assertThat(property.getXIsisFormat(), is("double"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isDouble(), is(true));
- Double doubleValue = scalarRepr.asDouble();
- assertThat(doubleValue, is(12345678901234567890.1234567890));
-
-
-
- // and then member types have links to details (selected ones inspected only)
- property = domainObjectRepr.getProperty("booleanProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/booleanProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
-
- property = domainObjectRepr.getProperty("byteProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/byteProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
-
- property = domainObjectRepr.getProperty("shortProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/shortProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
-
- // can navigate using fully qualified form of Rel
- property = domainObjectRepr.getProperty("booleanProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS.andParam("property", "booleanProperty")),
- isLink()
- .href(matches(".+\\/objects\\/PRMV\\/\\d+\\/properties\\/booleanProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
-
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java
deleted file mode 100644
index b7cb2be..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntityWithWrapperProperties_thenRepresentation_ok.java
+++ /dev/null
@@ -1,168 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenEntityWithWrapperProperties_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void thenMembers() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "WrapperValuedEntities");
- domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
-
-
- // and then members (types)
- DomainObjectMemberRepresentation property;
- ScalarValueRepresentation scalarRepr;
-
- property = domainObjectRepr.getProperty("booleanProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is(nullValue()));
- assertThat(property.getXIsisFormat(), is("boolean"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isBoolean(), is(true));
- Boolean booleanValue = scalarRepr.asBoolean();
- assertThat(booleanValue, is(true));
-
- property = domainObjectRepr.getProperty("byteProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("byte"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isIntegralNumber(), is(true));
- Byte byteValue = scalarRepr.asByte();
- assertThat(byteValue, is((byte)123));
-
- property = domainObjectRepr.getProperty("shortProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("short"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isIntegralNumber(), is(true));
- Short shortValue = scalarRepr.asShort();
- assertThat(shortValue, is((short)32123));
-
- property = domainObjectRepr.getProperty("integerProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("int"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isInt(), is(true));
- Integer intValue = scalarRepr.asInt();
- assertThat(intValue, is(987654321));
-
- property = domainObjectRepr.getProperty("longProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("int"));
- assertThat(property.getXIsisFormat(), is("long"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isLong(), is(true));
- Long longValue = scalarRepr.asLong();
- assertThat(longValue, is(2345678901234567890L));
-
- property = domainObjectRepr.getProperty("characterProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is(nullValue()));
- assertThat(property.getXIsisFormat(), is("char"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isString(), is(true));
- Character charValue = scalarRepr.asChar();
- assertThat(charValue, is('a'));
-
- property = domainObjectRepr.getProperty("floatProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("decimal"));
- assertThat(property.getXIsisFormat(), is("float"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isNumber(), is(true));
- assertThat(scalarRepr.isIntegralNumber(), is(false));
- Float floatValue = scalarRepr.asFloat();
- assertThat(floatValue, is(12345678901234567890.1234567890F));
-
- property = domainObjectRepr.getProperty("doubleProperty");
- assertThat(property.getMemberType(), is("property"));
- assertThat(property.getFormat(), is("decimal"));
- assertThat(property.getXIsisFormat(), is("double"));
- scalarRepr = property.getRepresentation("value").as(ScalarValueRepresentation.class);
- assertThat(scalarRepr.isDouble(), is(true));
- Double doubleValue = scalarRepr.asDouble();
- assertThat(doubleValue, is(12345678901234567890.1234567890));
-
-
- // and then member types have links to details (selected ones inspected only)
- property = domainObjectRepr.getProperty("booleanProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/WRPV\\/\\d+\\/properties\\/booleanProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
-
- property = domainObjectRepr.getProperty("byteProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/WRPV\\/\\d+\\/properties\\/byteProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
-
- property = domainObjectRepr.getProperty("shortProperty");
- assertThat(property.getLinkWithRel(Rel.DETAILS),
- isLink()
- .href(matches(".+\\/objects\\/WRPV\\/\\d+\\/properties\\/shortProperty"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.OBJECT_PROPERTY.getMediaType()));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java
deleted file mode 100644
index 2a7529a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenEntity_thenRepresentation_ofTitleIdLinksEtc_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectRepresentation domainObjectRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void thenTitle_andExtensions_andLinks() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
- domainObjectRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
-
- // then has domain type, instanceId, title
- assertThat(domainObjectRepr, is(not(nullValue())));
-
- assertThat(domainObjectRepr.getTitle(), is("Primitive Valued Entity #0")); // running in-memory
- assertThat(domainObjectRepr.getDomainType(), is("PRMV"));
- assertThat(domainObjectRepr.getInstanceId(), is(not(nullValue())));
-
- // and then extensions
- assertThat(domainObjectRepr.getExtensions().getString("oid"), IsisMatchers.startsWith("PRMV:" + domainObjectRepr.getInstanceId()));
- assertThat(domainObjectRepr.getExtensions().getBoolean("isService"), is(false));
- assertThat(domainObjectRepr.getExtensions().getBoolean("isPersistent"), is(true));
-
- // and then has links
- final LinkRepresentation self = domainObjectRepr.getSelf();
- assertThat(self, isLink()
- .rel(Rel.SELF)
- .href(matches(".+\\/objects\\/PRMV\\/\\d+"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType()));
- assertThat(domainObjectRepr.getLinkWithRel(Rel.DESCRIBEDBY),
- isLink()
- .href(matches(".+\\/domain-types\\/PRMV"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.DOMAIN_TYPE.getMediaType()));
- assertThat(domainObjectRepr.getLinkWithRel(Rel.UPDATE),
- isLink()
- .href(matches(".+\\/objects\\/PRMV\\/\\d+"))
- .httpMethod(RestfulHttpMethod.PUT)
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType()));
- assertThat(domainObjectRepr.getLinkWithRel(Rel.ICON),
- is(nullValue()));
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java
deleted file mode 100644
index a3faec4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHasIcon_thenRepresentation_ok_TOFIX.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenHasIcon_thenRepresentation_ok_TOFIX {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Ignore("TODO")
- @Test
- public void domainObjectWithIcon() throws Exception {
-
- // given, when
- final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("OID","xxx");
-
- // icon
- final LinkRepresentation selfIcon = domainObjectRepr.getLinkWithRel(Rel.ICON);
- assertThat(selfIcon, isLink().href(matches(".+" + "/images/" + "null\\.png")).httpMethod(RestfulHttpMethod.GET));
-
- }
-
-
- private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
-
- final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
- final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
- return domainObjectRepr;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java
deleted file mode 100644
index ff0358e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenHiddenMembers_thenRepresentation_ok.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenHiddenMembers_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
- @Test
- public void domainObjectWithHiddenMembers() throws Exception {
-
- // given, when
- final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("BSRL","74");
-
- // property ('invisibleProperty')
- final JsonRepresentation properties = domainObjectRepr.getProperties();
- final JsonRepresentation nameProperty = properties.getRepresentation("invisibleProperty");
- assertThat(nameProperty, is(nullValue()));
- }
-
-
- private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
- final DomainObjectResource domainObjectResource = client.getDomainObjectResource();
-
- final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
- final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Response.Status.Family.SUCCESSFUL));
-
- return domainObjectJsonResp.getEntity();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java
deleted file mode 100644
index 78ea63c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenTransient_thenRepresentation_ok_TOFIX.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenTransient_thenRepresentation_ok_TOFIX {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @SuppressWarnings("unused")
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
-
- @Ignore("to fix")
- @Test
- public void domainObjectRepresentationForTransient_hasNoSelf_andHasNoOid() throws Exception {
-
- // given, when
- final RestfulRequest request = this.client.createRequest(RestfulHttpMethod.POST, "services/simples/actions/newTransientEntity/invoke");
- final RestfulResponse<ActionResultRepresentation> response = request.executeT();
- final ActionResultRepresentation actionResultRepr = response.getEntity();
- assertThat(actionResultRepr.getResultType(), is(ResultType.DOMAIN_OBJECT));
- assertThat(actionResultRepr.getResult(), is(not(nullValue())));
-
- final DomainObjectRepresentation domainObjectRepr = actionResultRepr.getResult().as(DomainObjectRepresentation.class);
-
- // then
- final LinkRepresentation self = domainObjectRepr.getSelf();
- assertThat(self, is(nullValue()));
-
- assertThat(domainObjectRepr.getOid(), is(nullValue()));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 46bc674..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_givenViewModel_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenViewModel_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
-
- @Ignore("TODO")
- @Test
- public void xxx() throws Exception {
-
- // given, when
- final DomainObjectRepresentation domainObjectRepr = givenDomainObjectRepresentationFor("OID","xxx");
-
- // property ('name')
- final JsonRepresentation properties = domainObjectRepr.getProperties();
- final JsonRepresentation nameProperty = properties.getRepresentation("name");
- assertThat(nameProperty.getString("disabledReason"), is(not(nullValue())));
- }
-
-
-
-
- private DomainObjectRepresentation givenDomainObjectRepresentationFor(final String domainType, String instanceId) throws IOException {
- final DomainObjectResource domainObjectResource = client.getDomainObjectResource();
-
- final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
- final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
- return domainObjectRepr;
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java
deleted file mode 100644
index 7984a64..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseCode_andContentType_andContentLength_ok.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeXRoDomainType;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.Matchers.greaterThan;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-public class Get_thenResponseCode_andContentType_andContentLength_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
- final DomainObjectRepresentation objRepr = client.follow(link).getEntity().as(DomainObjectRepresentation.class);
- final String domainType = objRepr.getDomainType();
- final String instanceId = objRepr.getInstanceId();
-
- final Response jaxrsResponse = domainObjectResource.object(domainType,instanceId);
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(jaxrsResponse);
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
-
- // then
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
-
- assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(greaterThan(6000)));
-
- final MediaType actualHeader = restfulResponse.getHeader(Header.CONTENT_TYPE);
- assertThat(actualHeader, hasMediaType(MediaType.APPLICATION_JSON));
- assertThat(actualHeader, hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_OBJECT));
- assertThat(actualHeader, hasMediaTypeXRoDomainType("domain-types/PRMV"));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java
deleted file mode 100644
index 5d39aa9..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_CacheControl_ok.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.CacheControl;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.CacheControlMatcherBuilder;
-
-public class Get_thenResponseHeaders_CacheControl_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Test
- public void givenNotCached_whenUsingResourceProxy() throws Exception {
-
- // when
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = Util.domainObjectJaxrsResponse(client, "PrimitiveValuedEntities");
-
- // then
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
-
- final CacheControl expected = new CacheControl();
- expected.setNoCache(true);
- assertThat(restfulResponse.getHeader(Header.CACHE_CONTROL), isCacheControl().withNoCache().build());
- }
-
-
- @Ignore("Isis does not define any short-term cached semantics (use @Immutable, or (re)introduce @Cached?)")
- @Test
- public void givenShortTermCached_whenUsingResourceProxy() throws Exception {
-
- }
-
-
- @Ignore("TODO - Isis does not define any long-term cached semantics (use @Immutable, or (re)introduce @Cached?)")
- @Test
- public void givenLongTermCached_whenUsingResourceProxy() throws Exception {
- }
-
-
- private CacheControlMatcherBuilder isCacheControl() {
- return new RestfulMatchers.CacheControlMatcherBuilder();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index fbb88a6..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Get_thenResponseHeaders_eTag_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java
deleted file mode 100644
index 1df66bb..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenDoesntExistOid_then_404.java
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-public class Get_whenDoesntExistOid_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void usingClientFollow() throws Exception {
-
- // given
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
- link.withHref("http://localhost:39393/objects/PRMV/nonExistent");
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResp = client.follow(link);
-
- // then
- then(restfulResp);
-
- }
-
- @Test
- public void usingResourceProxy() throws Exception {
-
- // when
- final DomainObjectResource objectResource = client.getDomainObjectResource();
-
- final Response response = objectResource.object("PRMV", "nonExistent");
- RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(response);
-
- then(restfulResp);
-
- }
-
- private void then(final RestfulResponse<JsonRepresentation> restfulResp) {
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index fa68219..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- request = client.createRequest(RestfulHttpMethod.GET, "/objects/BSRL/74");
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
deleted file mode 100644
index 6fcd2cd..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java
deleted file mode 100644
index d950b10..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_ok.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import javax.ws.rs.core.MediaType;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/74");
- }
-
- @Test
- public void applicationJson_noProfile_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
-
- @Test
- public void applicationJson_profileVersion_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.DOMAIN_OBJECT.getMediaType());
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
- @Test
- public void missingHeader_returns200() throws Exception {
-
- final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
-
- assertThat(restfulResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java
deleted file mode 100644
index 22eb8c5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Get_whenRequestHeaders_Accept_whenInvalid_406.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import javax.ws.rs.core.MediaType;
-import org.jboss.resteasy.client.ClientRequest;
-import org.jboss.resteasy.client.ClientResponse;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_whenInvalid_406 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void applicationJson_profileIncorrect_returns406() throws Exception {
-
- // given
- RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64");
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.USER.getMediaType());
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
- @Test
- public void incorrectMediaType_returnsNotAcceptable() throws Exception {
-
- // given
- final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("objects/BSRL/64");
- clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
-
- // when
- final ClientResponse<?> resp = clientRequest.get();
- final RestfulResponse<JsonRepresentation> restfulResponse = RestfulResponse.of(resp);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_ACCEPTABLE));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java
deleted file mode 100644
index 2fa7c42..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Post_then_405_bad.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.errors.ErrorRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private ErrorRepresentation errorRepresentation;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void followLink() throws Exception {
-
- // when
- final LinkRepresentation link = Util.serviceActionListInvokeFirstReference(client, "PrimitiveValuedEntities");
- final LinkRepresentation deleteLink = link.withMethod(RestfulHttpMethod.POST);
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to object resource is not allowed."));
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java
deleted file mode 100644
index 6ce4b38..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenDisabled_then_203_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_givenDisabled_then_203_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
deleted file mode 100644
index 9bdb8b8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
deleted file mode 100644
index 9755e95..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-public class Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java
deleted file mode 100644
index 34a9e89..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_givenViewModel_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_givenViewModel_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
- @Ignore
- @Test
- public void usingClientFollow() throws Exception {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java
deleted file mode 100644
index c812638..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Ignore
- @Test
- public void usingClientFollow() throws Exception {
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index f59788e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
[36/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..f59788e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..139fcde
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..1696b4c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..2980202
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_thenResponseHeaders_eTag_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java
new file mode 100644
index 0000000..398996b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_then_200_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_then_200_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
new file mode 100644
index 0000000..2758a45
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java
new file mode 100644
index 0000000..63aa13f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_whenArgIsInvalid_andQueryArg_XRoValidateOnly_then_4xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java
new file mode 100644
index 0000000..e161f75
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_whenArgIsValid_andQueryArg_XRoValidateOnly_then_2xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java
new file mode 100644
index 0000000..1ee3764
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgMandatoryButMissing_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_whenArgMandatoryButMissing_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java
new file mode 100644
index 0000000..642f1ad
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgValueIsInvalid_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_whenArgValueIsInvalid_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
new file mode 100644
index 0000000..25122a7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenArgsValid_thenMultiplePropertyUpdate.java
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.joda.time.format.ISODateTimeFormat;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_whenArgsValid_thenMultiplePropertyUpdate {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+ @Test
+ public void primitivePropertiesUpdated() throws Exception {
+
+ final DomainObjectRepresentation domainObjectRepr = getObjectRepr("PRMV", "43");
+
+ final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
+
+ final JsonRepresentation argRepr = updateLink.getArguments();
+
+ final byte b = (byte)99;
+ final char c = 'b';
+ final double d = 12345.678;
+ final float f = 54321.123F;
+ final int i = 999999;
+ final long l = 99999999999L;
+ final short s = (short)999;
+ final boolean z = false;
+ argRepr.mapPut("byteProperty.value", b);
+ argRepr.mapPut("charProperty.value", c);
+ argRepr.mapPut("doubleProperty.value", d);
+ argRepr.mapPut("floatProperty.value", f);
+ argRepr.mapPut("intProperty.value", i);
+ argRepr.mapPut("longProperty.value", l);
+ argRepr.mapPut("shortProperty.value", s);
+ argRepr.mapPut("booleanProperty.value", z);
+ RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
+ assertThat(result.getStatus(), is(HttpStatusCode.OK));
+
+ final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
+ assertThat(afterResp.getProperty("byteProperty").getByte("value"), is(b));
+ assertThat(afterResp.getProperty("charProperty").getChar("value"), is(c));
+ assertThat(afterResp.getProperty("doubleProperty").getDouble("value"), is(d));
+ assertThat(afterResp.getProperty("floatProperty").getFloat("value"), is(f));
+ assertThat(afterResp.getProperty("intProperty").getInt("value"), is(i));
+ assertThat(afterResp.getProperty("longProperty").getLong("value"), is(l));
+ assertThat(afterResp.getProperty("shortProperty").getShort("value"), is(s));
+ assertThat(afterResp.getProperty("booleanProperty").getBoolean("value"), is(z));
+ }
+
+ @Test
+ public void jdkPropertiesUpdated() throws Exception {
+
+ final DomainObjectRepresentation domainObjectRepr = getObjectRepr("JDKV", "38");
+ final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
+ final JsonRepresentation argRepr = updateLink.getArguments();
+
+ final BigDecimal bd = new BigDecimal("12345678901234567.789");
+ final BigInteger bi = new BigInteger("123456789012345678");
+ final java.sql.Date sqld = new java.sql.Date(new DateTime(2014,5,1, 0,0, DateTimeZone.UTC).getMillis());
+ final java.sql.Time sqlt = new java.sql.Time(13,0,0);
+ final java.sql.Timestamp sqlts = new java.sql.Timestamp(114,4,1,13,0,0,0);
+ final java.util.Date d = new DateTime(2014,5,1, 11,45, DateTimeZone.UTC).toDate();
+ final String e = "ORANGE";
+ final String s = "Tangerine";
+
+ argRepr.mapPut("bigDecimalProperty.value", bd);
+ argRepr.mapPut("bigIntegerProperty.value", bi);
+ argRepr.mapPut("javaSqlDateProperty.value", asIsoNoT(sqld)); // 1-may-2014
+ argRepr.mapPut("javaSqlTimeProperty.value", asIsoOnlyT(sqlt)); // 1 pm
+ argRepr.mapPut("javaSqlTimestampProperty.value", sqlts.getTime());
+ argRepr.mapPut("javaUtilDateProperty.value", asIso(d));
+ argRepr.mapPut("myEnum.value", e);
+ argRepr.mapPut("stringProperty.value", s);
+
+ final RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
+ assertThat(result.getStatus(), is(HttpStatusCode.OK));
+
+ final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
+
+ assertThat(afterResp.getProperty("bigDecimalProperty").getBigDecimal("value"), is(new BigDecimal("12345678901234567.7890000000"))); // big-decimal(30,10)
+ assertThat(afterResp.getProperty("bigIntegerProperty").getBigInteger("value"), is(bi));
+ assertThat(afterResp.getProperty("javaSqlDateProperty").getDate("value"), is((java.util.Date)sqld));
+ assertThat(afterResp.getProperty("javaSqlTimeProperty").getTime("value"), is((java.util.Date)sqlt));
+ assertThat(afterResp.getProperty("javaSqlTimestampProperty").getLong("value"), is(sqlts.getTime()));
+ assertThat(afterResp.getProperty("javaUtilDateProperty").getDateTime("value"), is(d));
+ assertThat(afterResp.getProperty("myEnum").getString("value"), is(e));
+ assertThat(afterResp.getProperty("stringProperty").getString("value"), is(s));
+
+ }
+
+ @Test
+ public void jodaPropertiesUpdated() throws Exception {
+
+ final DomainObjectRepresentation domainObjectRepr = getObjectRepr("JODA", "83");
+
+ final LinkRepresentation updateLink = domainObjectRepr.getLinkWithRel(Rel.UPDATE);
+
+ final JsonRepresentation argRepr = updateLink.getArguments();
+
+ final LocalDate ld = new LocalDate(2013,5,1);
+ final LocalDateTime ldt = new LocalDateTime(2013,2,1,14,15,0);
+ final DateTime dt = new DateTime(2013,2,1,14,15,0, DateTimeZone.UTC);
+ final String s = "New string";
+
+ argRepr.mapPut("localDateProperty.value", "2013-05-01");
+ argRepr.mapPut("localDateTimeProperty.value", "2013-02-01T14:15:00Z");
+ argRepr.mapPut("dateTimeProperty.value", asIso(dt.toDate()));
+ argRepr.mapPut("stringProperty.value", s);
+
+ final RestfulResponse<JsonRepresentation> result = client.follow(updateLink, argRepr);
+ assertThat(result.getStatus(), is(HttpStatusCode.OK));
+
+ final DomainObjectRepresentation afterResp = result.getEntity().as(DomainObjectRepresentation.class);
+
+ assertThat(afterResp.getProperty("localDateProperty").getString("value"), is("2013-05-01")); // being a bit hacky here...
+ assertThat(afterResp.getProperty("localDateTimeProperty").getDateTime("value"), is(ldt.toDate()));
+ assertThat(afterResp.getProperty("dateTimeProperty").getDateTime("value"), is(dt.toDate()));
+ assertThat(afterResp.getProperty("stringProperty").getString("value"), is(s));
+ }
+
+ private static String asIso(final java.util.Date d) {
+ final org.joda.time.DateTime dt = new org.joda.time.DateTime(d.getTime());
+ return asIso(dt);
+ }
+
+ private static String asIso(final org.joda.time.DateTime dt) {
+ return ISODateTimeFormat.dateTimeNoMillis().withZoneUTC().print(dt);
+ }
+
+ private static String asIsoNoT(final java.util.Date d) {
+ final org.joda.time.DateTime dt = new org.joda.time.DateTime(d.getTime());
+ return asIsoNoT(dt);
+ }
+
+ private static String asIsoNoT(final org.joda.time.DateTime dt) {
+ return ISODateTimeFormat.date().withZoneUTC().print(dt);
+ }
+
+ private static String asIsoOnlyT(final java.util.Date d) {
+ final org.joda.time.DateTime dt = new org.joda.time.DateTime(d.getTime());
+ return asIsoOnlyT(dt);
+ }
+
+ private static String asIsoOnlyT(final org.joda.time.DateTime dt) {
+ return ISODateTimeFormat.timeNoMillis().withZoneUTC().print(dt);
+ }
+
+ private DomainObjectRepresentation getObjectRepr(final String domainType, final String instanceId) throws IOException {
+ final Response domainObjectResp = domainObjectResource.object(domainType, instanceId);
+ final RestfulResponse<DomainObjectRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ final DomainObjectRepresentation domainObjectRepr = domainObjectJsonResp.getEntity();
+ return domainObjectRepr;
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java
new file mode 100644
index 0000000..d91b823
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/Put_whenDoesntExistOid_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid;
+
+public class Put_whenDoesntExistOid_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java
new file mode 100644
index 0000000..1e2b140
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenDisabled_then_203_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_givenDisabled_then_203_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
new file mode 100644
index 0000000..8f2c4d8
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
new file mode 100644
index 0000000..e8bad14
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java
new file mode 100644
index 0000000..86de341
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_givenHidden_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_givenHidden_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..2f140c5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenRepresentation_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..e286ba7
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Delete_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..95cd503
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Delete_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..0a499f4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Delete_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..43496bc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_thenResponseHeaders_eTag_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java
new file mode 100644
index 0000000..519deaf
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_then_200_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_then_200_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java
new file mode 100644
index 0000000..03d051a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgHrefAndLinksToEntityOfWrongType_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java
new file mode 100644
index 0000000..03e066b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgHrefAndLinksToEntityThatExistsButIsNotInCollection_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java
new file mode 100644
index 0000000..807da6e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgHrefAndLinksToNonExistentEntity_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java
new file mode 100644
index 0000000..fb9b144
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgIsMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgIsMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java
new file mode 100644
index 0000000..7ae5e98
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgMandatoryButMissing_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgMandatoryButMissing_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java
new file mode 100644
index 0000000..a047a82
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Delete_whenArgValid_thenEntityRemovedFromCollection_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
new file mode 100644
index 0000000..a16014b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java
new file mode 100644
index 0000000..f8ac216
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsInvalid_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgValueIsInvalid_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
new file mode 100644
index 0000000..9bdea41
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java
new file mode 100644
index 0000000..b86b9ac
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistColl_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenDoesntExistColl_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java
new file mode 100644
index 0000000..2a486b2
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Delete_whenDoesntExistOid_then_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+public class Delete_whenDoesntExistOid_then_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
new file mode 100644
index 0000000..6160a3d
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Ignore
+ @Test
+ public void collectionDetails() throws Exception {
+
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
new file mode 100644
index 0000000..ce343d0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Ignore
+ @Test
+ public void collectionDetails() throws Exception {
+
+
+ }
+}
[18/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java
deleted file mode 100644
index 7bb2795..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.service;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-
-@Named("Customers")
-public class CustomerRepository extends AbstractFactoryAndRepository {
-
- // use ctrl+space to bring up the NO templates.
-
- // also, use CoffeeBytes code folding with
- // user-defined regions of {{ and }}
-
- // {{ Logger
- @SuppressWarnings("unused")
- private final static Logger LOGGER = LoggerFactory.getLogger(CustomerRepository.class);
-
- // }}
-
- /**
- * Lists all customers in the repository.
- */
- public List<Customer> showAll() {
- return allInstances(Customer.class);
- }
-
- // {{ findAllByName, findByName
- /**
- * Returns a list of Customers with given last name.
- */
- public List<Customer> findAllByName(@Named("Last name") final String lastName) {
- return allMatches(Customer.class, new FilterLastName(lastName));
- }
-
- /**
- * Returns the first Customer with given last name.
- */
- public Customer findByName(@Named("Last name") final String lastName) {
- final Customer firstMatch = firstMatch(Customer.class, new FilterLastName(lastName));
- return firstMatch;
- }
-
- private final class FilterLastName implements Filter<Customer> {
- private final String name;
-
- private FilterLastName(final String name) {
- this.name = name;
- }
-
- @Override
- public boolean accept(final Customer customer) {
- return customer.getLastName().toLowerCase().contains(name.toLowerCase());
- }
- }
-
- // }}
-
- /**
- * Creates a new (still-transient) customer.
- *
- * @return
- */
- public Customer newCustomer() {
- final Customer customer = newTransientInstance(Customer.class);
- return customer;
- }
-
- /**
- * Creates a new (already persisted) customer.
- *
- * <p>
- * For use by fixtures only.
- *
- * @return
- */
- @Hidden
- public Customer newCustomer(final String firstName, final String lastName, final int customerNumber, final Country countryOfBirth) {
-
- final Customer customer = newCustomer();
- customer.setFirstName(firstName);
- customer.setLastName(lastName);
- customer.setCustomerNumber(customerNumber);
- customer.modifyCountryOfBirth(countryOfBirth);
-
- persist(customer);
- return customer;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java
deleted file mode 100644
index e70c442..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.service;
-
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Order;
-
-@Named("Orders")
-public class OrderRepository extends AbstractFactoryAndRepository {
-
- // use ctrl+space to bring up the NO templates.
-
- // also, use CoffeeBytes code folding with
- // user-defined regions of {{ and }}
-
- @SuppressWarnings("unused")
- private final static Logger LOGGER = LoggerFactory.getLogger(OrderRepository.class);
-
- // {{ findRecentOrders
- public List<Order> findRecentOrders(final Customer customer, @Named("Number of Orders") final Integer numberOfOrders) {
- final List<Order> orders = customer.getOrders();
- Collections.sort(orders, new Comparator<Order>() {
- @Override
- public int compare(final Order o1, final Order o2) {
- final long time1 = o1.getOrderDate().getTime();
- final long time2 = o2.getOrderDate().getTime();
- return (int) (time2 - time1);
- }
- });
- if (orders.size() < numberOfOrders) {
- return orders;
- } else {
- return orders.subList(0, numberOfOrders);
- }
- }
-
- public Integer default1FindRecentOrders() {
- return 3;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java
deleted file mode 100644
index 4049b99..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.legacy.sample.service;
-
-import java.util.List;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.filter.Filter;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
-import org.apache.isis.core.integtestsupport.legacy.sample.domain.Product;
-
-@Named("Products")
-public class ProductRepository extends AbstractFactoryAndRepository {
-
- // use ctrl+space to bring up the NO templates.
-
- // also, use CoffeeBytes code folding with
- // user-defined regions of {{ and }}
-
- // {{ Logger
- @SuppressWarnings("unused")
- private final static Logger LOGGER = LoggerFactory.getLogger(ProductRepository.class);
-
- // }}
-
- /**
- * Lists all products in the repository.
- */
- public List<Product> showAll() {
- return allInstances(Product.class);
- }
-
- // {{ findByCode
- /**
- * Returns the Product with given code
- */
- public Product findByCode(@Named("Code") final String code) {
- return firstMatch(Product.class, new Filter<Product>() {
- @Override
- public boolean accept(final Product product) {
- return code.equals(product.getCode());
- }
- });
- }
-
- // }}
-
- /**
- * Creates a new product.
- *
- * <p>
- * For use by fixtures only.
- *
- * @return
- */
- @Hidden
- public Product newProduct(final String code, final String description, final int priceInPence) {
- final Product product = newTransientInstance(Product.class);
- product.setCode(code);
- product.setDescription(description);
- product.setPrice(new Double(priceInPence / 100));
- persist(product);
- return product;
- }
-
- /**
- * Creates a new still transient product.
- *
- * <p>
- * For use by tests only. Using this rather than {@link Customer} since
- * {@link Product} has a {@link Product#validate()} method.
- *
- * @return
- */
- @Hidden
- public Product newProduct() {
- return newTransientInstance(Product.class);
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java
deleted file mode 100644
index acd9793..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/PersistorSessionHydratorTest.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.persistence;
-
-import org.jmock.Expectations;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures.Fixtures.Initialization;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ResolveState;
-import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
-import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault;
-import org.apache.isis.core.metamodel.spec.ObjectSpecId;
-import org.apache.isis.core.objectstore.InMemoryPersistenceMechanismInstaller;
-import org.apache.isis.core.runtime.system.persistence.IdentifierGenerator;
-import org.apache.isis.core.tck.dom.refs.ParentEntityRepository;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-public class PersistorSessionHydratorTest {
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- private RootOid epvTransientOid = RootOidDefault.deString("!SMPL:-999", new OidMarshaller());
-
- private IdentifierGenerator mockIdentifierGenerator = context.mock(IdentifierGenerator.class);
- {
- context.checking(new Expectations() {
- {
- final ObjectSpecId docdSpecId = ObjectSpecId.of(DomainObjectContainerDefault.class.getName());
- allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(docdSpecId)), with(an(DomainObjectContainerDefault.class)));
- will(returnValue("1"));
- allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(docdSpecId)), with(an(DomainObjectContainerDefault.class)), with(any(RootOid.class)));
- will(returnValue("1"));
-
- final ObjectSpecId peSpecId = ObjectSpecId.of("ParentEntities");
- allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(peSpecId)), with(an(ParentEntityRepository.class)));
- will(returnValue("1"));
- allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(peSpecId)), with(an(ParentEntityRepository.class)), with(any(RootOid.class)));
- will(returnValue("1"));
-
- final ObjectSpecId smplSpecId = ObjectSpecId.of("SMPL");
- allowing(mockIdentifierGenerator).createTransientIdentifierFor(with(equalTo(smplSpecId)), with(an(SimpleEntity.class)));
- will(returnValue("-999"));
-
- allowing(mockIdentifierGenerator).createPersistentIdentifierFor(with(equalTo(smplSpecId)), with(an(SimpleEntity.class)), with(any(RootOid.class)));
- will(returnValue("1"));
- }
- });
- }
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
- .with(Initialization.NO_INIT)
- .with(new InMemoryPersistenceMechanismInstaller())
- .build();
-
-
- @Test
- public void adaptorFor_whenTransient() {
- // given
- iswf.fixtures.smpl1 = iswf.container.newTransientInstance(SimpleEntity.class);
-
- // when
- final ObjectAdapter adapter = iswf.adapterFor(iswf.fixtures.smpl1);
-
- // then
- assertEquals(epvTransientOid, adapter.getOid());
- assertEquals(iswf.fixtures.smpl1, adapter.getObject());
- assertEquals(ResolveState.TRANSIENT, adapter.getResolveState());
- assertEquals(null, adapter.getVersion());
- }
-
- @Test
- public void recreateAdapter_whenPersistent() throws Exception {
-
- // given persisted object
- iswf.fixtures.smpl1 = iswf.container.newTransientInstance(SimpleEntity.class);
- iswf.fixtures.smpl1.setName("Fred");
- iswf.persist(iswf.fixtures.smpl1);
- iswf.tearDownSystem();
- iswf.setUpSystem();
-
- // when
- final RootOidDefault oid = RootOidDefault.deString("SMPL:1", new OidMarshaller());
- final ObjectAdapter adapter = iswf.recreateAdapter(oid);
-
- // then
- assertEquals(oid, adapter.getOid());
- assertEquals(ResolveState.GHOST, adapter.getResolveState());
-
- final SimpleEntity epv = (SimpleEntity)adapter.getObject();
- assertEquals("Fred", epv.getName());
- assertNotNull(adapter.getVersion());
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java
deleted file mode 100644
index 9b570a0..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/persistence/RuntimeTestPojo.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.integtestsupport.persistence;
-
-public class RuntimeTestPojo {
-
- private static int nextId;
- private final int id = nextId++;
- private final String state = "pojo" + id;
-
- @Override
- public String toString() {
- return "Pojo#" + id;
- }
-
- @Override
- public boolean equals(final Object other) {
- if (other == null) {
- return false;
- }
- if (other == this) {
- return true;
- }
- if (other.getClass() == getClass()) {
- final RuntimeTestPojo otherTestPojo = (RuntimeTestPojo) other;
- return otherTestPojo.state.equals(state);
- }
- return false;
- }
-
- @Override
- public int hashCode() {
- return state.hashCode();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java
deleted file mode 100644
index 933b6d6..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/tck/ObjectStoreContractTest_persist.java
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.integtestsupport.tck;
-
-import java.util.Date;
-import java.util.List;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.RootOid;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
-import org.apache.isis.core.runtime.persistence.query.PersistenceQueryFindByTitle;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.ObjectStore;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-
-import static org.junit.Assert.*;
-
-public abstract class ObjectStoreContractTest_persist {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
- .with(createPersistenceMechanismInstaller())
- .with(iswfListener()).build();
-
-
- /**
- * Mandatory hook.
- */
- protected abstract PersistenceMechanismInstaller createPersistenceMechanismInstaller();
-
- protected IsisSystemWithFixtures.Listener iswfListener() {
- return null;
- }
-
- /**
- * hook method
- */
- protected void resetPersistenceStore() {
- }
-
- protected ObjectAdapter epv2Adapter;
- protected ObjectSpecification epvSpecification;
-
- protected ObjectStore getStore() {
- PersistenceSession psos = IsisContext.getPersistenceSession();
- return psos.getObjectStore();
- }
-
-
- @Before
- public void setUpFixtures() throws Exception {
- epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
- epvSpecification = iswf.loadSpecification(SimpleEntity.class);
- }
-
-
- @Test
- public void getInstances_usingFindByTitle() throws Exception {
-
- // given nothing in DB
- resetPersistenceStore();
-
- // when search for any object
- boolean hasInstances = getStore().hasInstances(epvSpecification);
-
- // then find none
- assertFalse(hasInstances);
-
- // given now persisted
- final SimpleEntity epv2 = iswf.fixtures.smpl2;
- epv2.setName("foo");
- epv2.setDate(new Date());
- epv2.setNullable(1234567890L);
- epv2.setSize(123);
-
- iswf.persist(epv2);
-
- iswf.bounceSystem();
-
- // when search for object
- List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
-
- // then find
- assertEquals(1, retrievedInstance.size());
- final ObjectAdapter retrievedAdapter = retrievedInstance.get(0);
-
- assertNotSame(epv2Adapter, retrievedAdapter);
- assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
- assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
-
- // and when search for some other title
- retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, "some other title"));
-
- // then don't find
- assertEquals(0, retrievedInstance.size());
- }
-
-
- @Test
- public void updateInstance() throws Exception {
-
- // given persisted
- resetPersistenceStore();
- ObjectAdapter adapter = iswf.persist(iswf.fixtures.smpl2);
- final RootOid oid = (RootOid) adapter.getOid();
- iswf.bounceSystem();
-
- // when change
- adapter = iswf.reload(oid);
-
- SimpleEntity epv = (SimpleEntity) adapter.getObject();
- epv.setName("changed");
-
- iswf.bounceSystem();
-
- // then found
- List<ObjectAdapter> retrievedInstance = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, adapter.titleString()));
- assertEquals(1, retrievedInstance.size());
-
- final ObjectAdapter retrievedAdapter = retrievedInstance.get(0);
- assertNotSame(adapter, retrievedAdapter);
- assertEquals(((SimpleEntity)adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
- assertEquals(adapter.getOid(), retrievedAdapter.getOid());
- }
-
- @Test
- public void removeInstance() throws Exception {
-
- // given persisted
- iswf.beginTran();
- resetPersistenceStore();
- ObjectAdapter adapter = iswf.persist(iswf.fixtures.smpl2);
- final RootOid oid = (RootOid) adapter.getOid();
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- // when destroy
- iswf.beginTran();
- adapter = iswf.reload(oid);
-
- SimpleEntity epv = (SimpleEntity) adapter.getObject();
- iswf.destroy(epv);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- // then not found
- iswf.beginTran();
- assertEquals(false, getStore().hasInstances(epvSpecification));
- iswf.commitTran();
- }
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java
deleted file mode 100644
index 0ca1be6..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_debug.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.debug.DebugString;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class InMemoryObjectStoreTest_debug {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- private static InMemoryObjectStore getStore() {
- return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
- }
-
- @Test
- public void debugTitle() throws Exception {
-
- // when
- final String debugTitle = getStore().debugTitle();
-
- // then
- assertThat(debugTitle, is("In-Memory Object Store"));
- }
-
-
- @Test
- public void debugXxx_whenHasObject() throws Exception {
-
- // given
- iswf.persist(iswf.fixtures.smpl1);
-
- // when
- final DebugString debug = new DebugString();
- getStore().debugData(debug);
-
-
- // then
- assertThat(debug.toString(), IsisMatchers.containsStripNewLines("SMPL:3"));
- }
-
-
- @Test
- public void testEmpty() throws Exception {
-
- // when
- final DebugString debug = new DebugString();
- getStore().debugData(debug);
-
- // then
- assertThat(debug.toString(), is("\nDomain Objects\n--------------\n\n"));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java
deleted file mode 100644
index d5ebf6a..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_init.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import static org.junit.Assert.assertFalse;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-
-public class InMemoryObjectStoreTest_init {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- private static InMemoryObjectStore getStore() {
- return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
- }
-
- @Test
- public void testStartsUpInUnitializedSate() throws Exception {
- assertFalse(getStore().isFixturesInstalled());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java
deleted file mode 100644
index 6bf7c36..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_name.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Test;
-
-public class InMemoryObjectStoreTest_name {
-
- private InMemoryObjectStore store;
-
- @Before
- public void setUp() throws Exception {
- store = new InMemoryObjectStore();
- }
-
- @Test
- public void testName() throws Exception {
- assertEquals("In-Memory Object Store", store.name());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java
deleted file mode 100644
index 241a5ae..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_openAndClose.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import org.jmock.Expectations;
-import org.jmock.auto.Mock;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.objectstore.internal.ObjectStorePersistedObjects;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-/**
- * Tested in style of <i>Working Effectively with Legacy Code</i> (Feathers) and
- * <i>Growing Object-Oriented Software</i> (Freeman & Pryce).
- */
-public class InMemoryObjectStoreTest_openAndClose {
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- @Mock
- private InMemoryPersistenceSessionFactory mockInMemoryPersistenceSessionFactory;
- @Mock
- private PersistenceSession mockPersistenceSession;
- @Mock
- private ObjectStorePersistedObjects mockObjectStorePersistedObjects;
-
- private boolean recreatedAdapters = false;
-
- private InMemoryObjectStore objectStore;
-
- @Before
- public void setUp() throws Exception {
- objectStore = new InMemoryObjectStore() {
- @Override
- protected InMemoryPersistenceSessionFactory getInMemoryPersistenceSessionFactory() {
- return mockInMemoryPersistenceSessionFactory;
- }
-
- @Override
- protected PersistenceSession getPersistenceSession() {
- return mockPersistenceSession;
- }
-
- @Override
- protected void recreateAdapters() {
- recreatedAdapters = true;
- }
- };
- }
-
- @Test
- public void whenOpenForFirstTimeThenCreatesPersistedObjects() throws Exception {
- context.never(mockPersistenceSession);
- context.checking(new Expectations() {
- {
- one(mockInMemoryPersistenceSessionFactory).getPersistedObjects();
- will(returnValue(null));
-
- one(mockInMemoryPersistenceSessionFactory).createPersistedObjects();
- will(returnValue(mockObjectStorePersistedObjects));
- }
- });
- objectStore.open();
- }
-
- @Test
- public void whenOpenSubsequentlyThenObtainsPersistedObjectsFromObjectStoreFactoryAndRecreatesAdapters() throws Exception {
- context.never(mockPersistenceSession);
- context.checking(new Expectations() {
- {
- one(mockInMemoryPersistenceSessionFactory).getPersistedObjects();
- will(returnValue(mockObjectStorePersistedObjects));
- }
- });
-
- assertThat(recreatedAdapters, is(false));
- objectStore.open();
- assertThat(recreatedAdapters, is(true));
- }
-
- @Test
- public void whenCloseThenGivesObjectsBackToObjectStoreFactory() throws Exception {
- context.never(mockPersistenceSession);
- whenOpenSubsequentlyThenObtainsPersistedObjectsFromObjectStoreFactoryAndRecreatesAdapters();
-
- context.checking(new Expectations() {
- {
- one(mockInMemoryPersistenceSessionFactory).attach(with(mockPersistenceSession), with(mockObjectStorePersistedObjects));
- never(mockPersistenceSession);
- }
- });
- objectStore.close();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java
deleted file mode 100644
index e88b477..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persist.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures.Listener;
-import org.apache.isis.core.integtestsupport.tck.ObjectStoreContractTest_persist;
-import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
-
-public class InMemoryObjectStoreTest_persist extends ObjectStoreContractTest_persist {
-
- @Override
- protected PersistenceMechanismInstaller createPersistenceMechanismInstaller() {
- return new InMemoryPersistenceMechanismInstaller();
- }
-
- @Override
- protected Listener iswfListener() {
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java
deleted file mode 100644
index b07bbf3..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_persistAggregated.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
-import org.apache.isis.core.tck.dom.refs.ReferencingEntity;
-
-public class InMemoryObjectStoreTest_persistAggregated {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
- .with(createPersistenceMechanismInstaller())
- .build();
-
- protected PersistenceMechanismInstaller createPersistenceMechanismInstaller() {
- return new InMemoryPersistenceMechanismInstaller();
- }
-
- @Test
- public void persistAggregatedEntityWithinCollection() throws Exception {
- final ReferencingEntity referencingEntity = iswf.fixtures.rfcg2;
- referencingEntity.addAggregatedEntityToCollection().setName("Aggregated Entity #1");
- iswf.persist(referencingEntity);
- }
-
-
- @Test
- public void persistAggregatedEntityWithinProperty() throws Exception {
- final ReferencingEntity referencingEntity = iswf.fixtures.rfcg2;
- referencingEntity.addAggregatedReference().setName("Aggregated Entity #1");
- iswf.persist(referencingEntity);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java
deleted file mode 100644
index 357a512..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_reset.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.runtime.system.persistence.PersistenceSession;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-
-/**
- * This is really just a test of the test infrastructure, not a real test per se.
- */
-public class InMemoryObjectStoreTest_reset {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- protected ObjectAdapter epv2Adapter;
- protected ObjectSpecification epvSpecification;
-
- protected InMemoryObjectStore getStore() {
- return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
- }
-
- @Before
- public void setUpFixtures() throws Exception {
- epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
- epvSpecification = iswf.loadSpecification(SimpleEntity.class);
- }
-
- @Test
- public void reset_clearsAdapterFromLoader() throws Exception {
-
- iswf.persist(iswf.fixtures.smpl2);
- iswf.bounceSystem();
-
- assertNotNull(getAdapterManager().getAdapterFor(epv2Adapter.getObject()));
-
- IsisContext.getPersistenceSession().testReset();
-
- assertNull(getAdapterManager().getAdapterFor(epv2Adapter.getObject()));
- }
-
-
- private PersistenceSession getPersistenceSession() {
- return IsisContext.getPersistenceSession();
- }
-
- private AdapterManager getAdapterManager() {
- return getPersistenceSession().getAdapterManager();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java
deleted file mode 100644
index 2725e81..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_retrieve.java
+++ /dev/null
@@ -1,166 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import java.util.List;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.adapter.oid.TypedOid;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.persistence.ObjectNotFoundException;
-import org.apache.isis.core.runtime.persistence.query.PersistenceQueryFindAllInstances;
-import org.apache.isis.core.runtime.persistence.query.PersistenceQueryFindByTitle;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-
-import static org.junit.Assert.*;
-
-public class InMemoryObjectStoreTest_retrieve {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- protected ObjectAdapter epv2Adapter;
- protected ObjectAdapter epv3Adapter;
- protected ObjectAdapter epv4Adapter;
- protected ObjectSpecification epvSpecification;
-
- protected InMemoryObjectStore getStore() {
- return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
- }
-
- @Before
- public void setUpFixtures() throws Exception {
- epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
- epv3Adapter = iswf.adapterFor(iswf.fixtures.smpl3);
- epv4Adapter = iswf.adapterFor(iswf.fixtures.smpl4);
- epvSpecification = iswf.loadSpecification(SimpleEntity.class);
- }
-
- @Test
- public void getObject_whenDoesNotExist() {
- final TypedOid oid = RootOidDefault.deString("SMPL:10", new OidMarshaller());
- try {
- getStore().loadInstanceAndAdapt(oid);
- fail();
- } catch (final ObjectNotFoundException expected) {
- }
- }
-
- @Test
- public void getObject_whenExists_returnsAdapter() throws Exception {
-
- // given
- iswf.persist(iswf.fixtures.smpl2);
- iswf.bounceSystem();
-
- final ObjectAdapter retrievedAdapter = getStore().loadInstanceAndAdapt((TypedOid) epv2Adapter.getOid());
-
- assertNotSame(epv2Adapter, retrievedAdapter);
- assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
- assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
- }
-
- @Test
- public void getInstances_whenDoesNotExist() throws Exception {
- final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
- assertEquals(0, retrievedAdapters.size());
- }
-
- @Test
- public void getInstances_findByTitle() throws Exception {
- // given
- iswf.persist(iswf.fixtures.smpl2);
- iswf.bounceSystem();
-
- // when
- final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindByTitle(epvSpecification, epv2Adapter.titleString()));
-
- // then
- assertEquals(1, retrievedAdapters.size());
- final ObjectAdapter retrievedAdapter = retrievedAdapters.get(0);
-
- assertNotSame(epv2Adapter, retrievedAdapter);
- assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
- assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
- }
-
- @Test
- public void getInstances_findAll() throws Exception {
- // given
- iswf.persist(iswf.fixtures.smpl2);
- iswf.bounceSystem();
-
- // when
- final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindAllInstances(epvSpecification));
-
- // then
- assertEquals(1, retrievedAdapters.size());
- final ObjectAdapter retrievedAdapter = retrievedAdapters.get(0);
-
- assertNotSame(epv2Adapter, retrievedAdapter);
- assertEquals(((SimpleEntity)epv2Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
- assertEquals(epv2Adapter.getOid(), retrievedAdapter.getOid());
- }
-
- @Ignore // gonna retire soon anyway...
- @Test
- public void getInstances_findRange() throws Exception {
- // given
- iswf.persist(iswf.fixtures.smpl1); // 0
- iswf.persist(iswf.fixtures.smpl2); // 1
- iswf.persist(iswf.fixtures.smpl3); // 2 <- this one
- iswf.persist(iswf.fixtures.smpl4); // 3 <- this one
- iswf.bounceSystem();
-
- // when
- final List<ObjectAdapter> retrievedAdapters = getStore().loadInstancesAndAdapt(new PersistenceQueryFindAllInstances(epvSpecification, 2, 2));
-
- // then
- assertEquals(2, retrievedAdapters.size());
- final ObjectAdapter retrievedAdapter = retrievedAdapters.get(0);
-
- assertNotSame(epv4Adapter, retrievedAdapter);
- assertEquals(((SimpleEntity)epv4Adapter.getObject()).getName(), ((SimpleEntity)retrievedAdapter.getObject()).getName());
- assertEquals(epv4Adapter.getOid(), retrievedAdapter.getOid());
- }
-
-
- @Test
- public void hasInstances_whenEmpty() throws Exception {
- assertEquals(false, getStore().hasInstances(epvSpecification));
- }
-
- @Test
- public void hasInstances_whenHasSome() throws Exception {
- iswf.persist(iswf.fixtures.smpl2);
- iswf.bounceSystem();
-
- assertEquals(true, getStore().hasInstances(epvSpecification));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java
deleted file mode 100644
index f9b3f2e..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/objectstore/InMemoryObjectStoreTest_serviceRegistry.java
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.objectstore;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.oid.Oid;
-import org.apache.isis.core.metamodel.adapter.oid.RootOidDefault;
-import org.apache.isis.core.metamodel.spec.ObjectSpecId;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.tck.dom.refs.ParentEntityRepository;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-
-import static org.junit.Assert.assertEquals;
-
-public class InMemoryObjectStoreTest_serviceRegistry {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- protected ObjectAdapter epv2Adapter;
- protected ObjectSpecification epvSpecification;
-
- protected InMemoryObjectStore getStore() {
- return (InMemoryObjectStore) IsisContext.getPersistenceSession().getObjectStore();
- }
-
- @Before
- public void setUpFixtures() throws Exception {
- epv2Adapter = iswf.adapterFor(iswf.fixtures.smpl2);
- epvSpecification = iswf.loadSpecification(SimpleEntity.class);
- }
-
- @Test
- public void getOidForServices() throws Exception {
- final Oid oidForService = getStore().getOidForService(iswf.loadSpecification(ParentEntityRepository.class));
- assertEquals(RootOidDefault.create(ObjectSpecId.of("ParentEntities"), "2"), oidForService);
- }
-
-
-// @Test
-// public void registerService_canBeRetrieved() throws Exception {
-// registerService14();
-//
-// final Oid oidForService = store.getOidForService(serviceSpecification);
-// assertEquals(oid14, oidForService);
-// }
-//
-// @Test
-// public void testCantRegisterServiceMoreThanOnce() throws Exception {
-// registerService14();
-// try {
-// registerService14();
-// fail();
-// } catch (final IsisException expected) {
-// }
-// }
-//
-// @Test
-// public void testCanRegisterMoreThanOneService() throws Exception {
-// registerService14();
-// registerService15();
-// }
-//
-//
-// private void resetIdentityMap() {
-// IsisContext.getPersistenceSession().testReset();
-// }
-//
-// protected void addObjectToStore(final ObjectAdapter object) {
-// final PersistenceCommand command = store.createCreateObjectCommand(object);
-// assertEquals(object, command.onObject());
-// store.execute(Collections.<PersistenceCommand> singletonList(command));
-// }
-//
-// private RootOidDefault registerService14() {
-// return oid14 = registerService(""+14);
-// }
-//
-// private RootOidDefault registerService15() {
-// return registerService(""+15);
-// }
-//
-// private RootOidDefault registerService(final String id) {
-// final RootOidDefault oid = RootOidDefault.createPersistent("SVC", id);
-// store.registerService(oid);
-// resetIdentityMap();
-// return oid;
-// }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java
deleted file mode 100644
index 5ec351c..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureFilePersistorTest.java
+++ /dev/null
@@ -1,222 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.runtime.fixturedomainservice;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assume.assumeThat;
-
-import java.io.StringReader;
-import java.io.StringWriter;
-import java.text.SimpleDateFormat;
-import java.util.HashSet;
-import java.util.Locale;
-import java.util.Set;
-import java.util.TimeZone;
-
-import junit.framework.Assert;
-
-import com.google.common.collect.Sets;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.config.IsisConfigurationDefault;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.ParentEntity;
-import org.apache.isis.core.tck.dom.refs.ReferencingEntity;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-
-public class ObjectFixtureFilePersistorTest {
-
- private static final String DATEFORMAT_PATTERN = "dd-MMM-yyyy HH:mm z";
-
- private static final SimpleDateFormat dateFormat = new SimpleDateFormat(DATEFORMAT_PATTERN, Locale.US);
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
- .with(configuration()).build();
-
- private static IsisConfiguration configuration() {
- final IsisConfigurationDefault config = new IsisConfigurationDefault();
- config.add("isis.value.format.datetime", DATEFORMAT_PATTERN);
- return config;
- }
-
- private ObjectFixtureFilePersistor persistor;
-
- @Before
- public void setup() throws Exception {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
-
- Locale.setDefault(Locale.UK);
-
- persistor = new ObjectFixtureFilePersistor();
-
- iswf.fixtures.smpl1.setName("Fred Smith");
- iswf.fixtures.smpl1.setDate(dateFormat.parse("08-Mar-2010 01:00 UTC"));
-
- iswf.fixtures.smpl2.setName("Joe Bloggs");
- iswf.fixtures.smpl2.setDate(dateFormat.parse("09-Apr-2011 02:10 UTC"));
-
- assumeThat(TimeZone.getDefault().getDisplayName(), is("Greenwich Mean Time"));
- }
-
-
- @Test
- public void loadInstance() throws Exception {
-
- final StringReader reader = new StringReader(SimpleEntity.class.getName() + "#1\n name: Fred Smith\n date: 08-Mar-2010 01:00 UTC");
- final Set<Object> objects = persistor.loadData(reader);
-
- assertEquals(1, objects.size());
- final Object object = objects.toArray()[0];
- assertThat(object instanceof SimpleEntity, is(true));
- final SimpleEntity epv = (SimpleEntity) object;
- assertEquals("Fred Smith", epv.getName());
-
- assertEquals(dateFormat.parse("08-Mar-2010 01:00 GMT"), epv.getDate());
- }
-
- @Test
- public void invalidFieldLine() throws Exception {
- try {
- final StringReader reader = new StringReader(SimpleEntity.class.getName() + "#1\n name Fred Smith");
- persistor.loadData(reader);
- Assert.fail();
- } catch (final FixtureException e) {
- Assert.assertEquals("failed to load data at line 2", e.getMessage());
- Assert.assertEquals("no colon (:) in: name Fred Smith", e.getCause().getMessage());
- }
- }
-
- @Test
- public void oldFieldNameSkipped() throws Exception {
- final StringReader reader = new StringReader(SimpleEntity.class.getName() + "#1\n xname: Fred Smith");
- final Set<Object> objects = persistor.loadData(reader);
- final Object object = objects.toArray()[0];
- Assert.assertNull(((SimpleEntity) object).getName());
-
- }
-
- @Test
- public void saveNoObjects() throws Exception {
- // Person person = new Person();
- final Set<Object> objects = new HashSet<Object>();
- final StringWriter out = new StringWriter();
- persistor.save(objects, out);
- Assert.assertEquals("", out.toString());
- }
-
- @Test
- public void saveOneObject() throws Exception {
- final Set<Object> objects = Sets.newLinkedHashSet();
- objects.add(iswf.fixtures.smpl1);
-
- final StringWriter out = new StringWriter();
- persistor.save(objects, out);
- final String actual = canonicalize(out);
-
- final String expected = SimpleEntity.class.getName() + "#2\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
-
- assertThat(actual, IsisMatchers.startsWith(expected));
- }
-
- @Test
- public void saveTwoObjects() throws Exception {
- final Set<Object> objects = Sets.newLinkedHashSet();
- objects.add(iswf.fixtures.smpl1);
- objects.add(iswf.fixtures.smpl3);
-
- final StringWriter out = new StringWriter();
- persistor.save(objects, out);
- final String actual = canonicalize(out);
-
- final String expected1 = SimpleEntity.class.getName() + "#2\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
- final String expected2 = SimpleEntity.class.getName() + "#3\n date: \n name: 3\n";
- assertThat(actual, IsisMatchers.contains(expected1));
- assertThat(actual, IsisMatchers.contains(expected2));
- }
-
-
- private String canonicalize(final String out) {
- return out.replaceAll("\r\n", "\n");
- }
-
- private String canonicalize(final StringWriter out) {
- return canonicalize(out.toString());
- }
-
- @Test
- public void saveReferencedObject() throws Exception {
-
- final Set<Object> objects = Sets.newLinkedHashSet();
-
- iswf.fixtures.rfcg1.setReference(iswf.fixtures.smpl1);
- objects.add(iswf.fixtures.rfcg1);
- objects.add(iswf.fixtures.smpl1);
-
- final StringWriter out = new StringWriter();
- persistor.save(objects, out);
- final String actual = canonicalize(out);
-
- final String expected1 = ReferencingEntity.class.getName() + "#2\n aggregatedEntities: \n aggregatedReference: \n reference: " + SimpleEntity.class.getName() + "#3";
- final String expected2 = SimpleEntity.class.getName() + "#3\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
- assertThat(actual, IsisMatchers.contains(expected1));
- assertThat(actual, IsisMatchers.contains(expected2));
- }
-
-
- @Test
- public void saveObjectAndAssociatedCollection() throws Exception {
-
- final Set<Object> objects = Sets.newLinkedHashSet();
-
- iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl1);
- iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl2);
- objects.add(iswf.fixtures.prnt1);
-
- objects.add(iswf.fixtures.smpl1);
- objects.add(iswf.fixtures.smpl2);
-
- final StringWriter out = new StringWriter();
- persistor.save(objects, out);
- final String actual = canonicalize(out);
-
- final String expected1a = ParentEntity.class.getName() + "#2\n";
- final String expected1b = "heterogeneousCollection: \n homogeneousCollection: " + SimpleEntity.class.getName() + "#3 " + SimpleEntity.class.getName() + "#4 " + "\n";
- final String expected2 = SimpleEntity.class.getName() + "#3\n date: 08-Mar-2010 01:00 UTC\n name: Fred Smith\n";
- final String expected3 = SimpleEntity.class.getName() + "#4\n date: 09-Apr-2011 02:10 UTC\n name: Joe Bloggs\n";
- assertThat(actual.replaceAll("\n", "###"), IsisMatchers.contains(expected1a.replaceAll("\n", "###")));
- assertThat(actual.replaceAll("\n", "###"), IsisMatchers.contains(expected1b.replaceAll("\n", "###")));
- assertThat(actual, IsisMatchers.contains(expected2));
- assertThat(actual, IsisMatchers.contains(expected3));
- }
-
-}
-
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java
deleted file mode 100644
index b0fe6db..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.runtime.fixturedomainservice;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.Date;
-import java.util.Locale;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.config.ConfigurationConstants;
-import org.apache.isis.core.commons.config.IsisConfiguration;
-import org.apache.isis.core.commons.config.IsisConfigurationDefault;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-
-public class ObjectFixtureServiceTest_loadFile {
-
- private static IsisConfiguration configuration() {
- IsisConfigurationDefault configuration = new IsisConfigurationDefault();
- configuration.add(ConfigurationConstants.ROOT + "exploration-objects.file", "test.data");
- return configuration;
- }
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().with(configuration()).build();
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- private ObjectFixtureService service;
-
-
- @Before
- public void setup() {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
- Locale.setDefault(Locale.UK);
-
- service = new ObjectFixtureService();
- }
-
-
- @Test
- public void loadFile() throws Exception {
-
- // when
- service.loadFile();
-
- // then
- final Set<Object> objects = service.allSavedObjects();
- Assert.assertEquals(1, objects.size());
- final Object object = objects.toArray()[0];
- assertThat(object instanceof SimpleEntity, is(true));
- Assert.assertEquals("Fred Smith", ((SimpleEntity) object).getName());
- Assert.assertEquals(new Date(110, 2, 8, 13, 32), ((SimpleEntity) object).getDate());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java
deleted file mode 100644
index 1087b67..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_loadFile_nothingExists.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.runtime.fixturedomainservice;
-
-import java.io.File;
-import java.util.Locale;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-
-public class ObjectFixtureServiceTest_loadFile_nothingExists {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- private ObjectFixtureService service;
-
-
- @Before
- public void setup() {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
- Locale.setDefault(Locale.UK);
-
- service = new ObjectFixtureService();
- deleteFixtureData();
- }
-
-
- private static void deleteFixtureData() {
- new File("fixture-data").delete();
- }
-
- @Test
- public void loadNothingIfNoFileExists() throws Exception {
- service.loadFile();
-
- final Set<Object> objects = service.allSavedObjects();
- Assert.assertEquals(0, objects.size());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java
deleted file mode 100644
index fbb3b69..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/fixturedomainservice/ObjectFixtureServiceTest_save.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.runtime.fixturedomainservice;
-
-import java.io.File;
-import java.util.Date;
-import java.util.Locale;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.refs.ParentEntity;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2;
-import org.apache.isis.core.unittestsupport.jmocking.JUnitRuleMockery2.Mode;
-
-public class ObjectFixtureServiceTest_save {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- @Rule
- public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
-
- private ObjectFixtureService service;
-
-
- @Before
- public void setup() {
- org.apache.log4j.Logger.getRootLogger().setLevel(org.apache.log4j.Level.OFF);
- Locale.setDefault(Locale.UK);
-
- service = new ObjectFixtureService();
- deleteFixtureData();
- }
-
-
- private static void deleteFixtureData() {
- new File("fixture-data").delete();
- }
-
-
- @Test
- public void saveObjectAddedToList() throws Exception {
-
- final SimpleEntity epv = iswf.fixtures.smpl1;
- epv.setName("Fred Smith");
- epv.setDate(new Date(110, 2, 8, 13, 32));
-
- final ParentEntity epc = iswf.fixtures.prnt1;
- epc.getHomogeneousCollection().add(iswf.fixtures.smpl1);
- epc.getHomogeneousCollection().add(iswf.fixtures.smpl2);
- service.save(epc);
-
- final Set<Object> savedObjects = service.allSavedObjects();
- Assert.assertEquals(3, savedObjects.size());
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java b/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
deleted file mode 100644
index 6787e43..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
+++ /dev/null
@@ -1,221 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.runtime.memento;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertThat;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.commons.encoding.DataInputStreamExtended;
-import org.apache.isis.core.commons.encoding.DataOutputStreamExtended;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.spec.ObjectSpecification;
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.tck.dom.refs.BaseEntity;
-import org.apache.isis.core.tck.dom.refs.ParentEntity;
-import org.apache.isis.core.tck.dom.refs.ReferencingEntity;
-import org.apache.isis.core.tck.dom.refs.SimpleEntity;
-
-public class MementoTest {
-
- @Rule
- public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder().build();
-
- private ObjectAdapter originalAdapterForEpv1;
- private ObjectAdapter originalAdapterForEpr1;
- private ObjectAdapter originalAdapterForEpc1;
-
- private ObjectAdapter recreatedAdapter;
-
- private Memento mementoForEpv1;
- private Memento mementoForEpr1;
- private Memento mementoForEpc1;
-
- private byte[] bytesForEpv1;
- private byte[] bytesForEpr1;
- private byte[] bytesForEpc1;
-
- private ByteArrayInputStream bais;
-
-
- @Before
- public void setUpSystem() throws Exception {
-
-// final Logger logger = LoggerFactory.getLogger(FieldType.class);
-// logger.setLevel(Level.DEBUG);
-// logger.addAppender(new ConsoleAppender());
-// BasicConfigurator.configure();
-
- iswf.fixtures.smpl1.setName("Fred");
- iswf.fixtures.smpl2.setName("Harry");
-
- iswf.fixtures.rfcg1_a1.setName("Tom");
-
- iswf.fixtures.rfcg1.setReference(iswf.fixtures.smpl1);
- iswf.fixtures.rfcg1.setAggregatedReference(iswf.fixtures.rfcg1_a1);
-
- iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl1);
- iswf.fixtures.prnt1.getHomogeneousCollection().add(iswf.fixtures.smpl2);
-
- iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.smpl1);
- iswf.fixtures.prnt1.getHeterogeneousCollection().add(iswf.fixtures.rfcg1);
-
- originalAdapterForEpv1 = iswf.adapterFor(iswf.fixtures.smpl1);
- originalAdapterForEpr1 = iswf.adapterFor(iswf.fixtures.rfcg1);
- originalAdapterForEpc1 = iswf.adapterFor(iswf.fixtures.prnt1);
-
- mementoForEpv1 = new Memento(originalAdapterForEpv1);
- mementoForEpr1 = new Memento(originalAdapterForEpr1);
- mementoForEpc1 = new Memento(originalAdapterForEpc1);
-
- bytesForEpv1 = toBytes(mementoForEpv1);
- bytesForEpr1 = toBytes(mementoForEpr1);
- bytesForEpc1 = toBytes(mementoForEpc1);
-
- iswf.tearDownSystem();
-
-// logger.debug("*************************************");
-
- iswf.setUpSystem();
-
- mementoForEpv1 = fromBytes(bytesForEpv1);
- mementoForEpr1 = fromBytes(bytesForEpr1);
- mementoForEpc1 = fromBytes(bytesForEpc1);
-
- IsisContext.getTransactionManager().startTransaction();
- }
-
-
- @After
- public void tearDown() throws Exception {
- IsisContext.getTransactionManager().endTransaction();
- }
-
- private Memento fromBytes(final byte[] bytes) throws IOException {
- bais = new ByteArrayInputStream(bytes);
- DataInputStreamExtended input = new DataInputStreamExtended(bais);
- final Memento recreate = Memento.recreateFrom(input);
- return recreate;
- }
-
-
- private static byte[] toBytes(final Memento memento) throws IOException {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- DataOutputStreamExtended output = new DataOutputStreamExtended(baos);
- memento.encodedData(output);
- return baos.toByteArray();
- }
-
-
- @Test
- public void recreateObject_adaptersAreNotSame() throws Exception {
-
- recreatedAdapter = mementoForEpv1.recreateObject();
-
- assertNotSame(originalAdapterForEpv1, recreatedAdapter);
- }
-
- @Test
- public void recreateObject_getOid_areEquals() throws Exception {
- recreatedAdapter = mementoForEpv1.recreateObject();
-
- assertEquals(originalAdapterForEpv1.getOid(), recreatedAdapter.getOid());
- }
-
- @Test
- public void recreateObject_getSpecification_isSame() throws Exception {
- recreatedAdapter = mementoForEpv1.recreateObject();
-
- final ObjectSpecification specification = originalAdapterForEpv1.getSpecification();
- final ObjectSpecification recreatedSpecification = recreatedAdapter.getSpecification();
- assertSame(specification, recreatedSpecification);
- }
-
- @Test
- public void recreateObject_valuePreserved() throws Exception {
- recreatedAdapter = mementoForEpv1.recreateObject();
- final SimpleEntity recreatedObject = (SimpleEntity)recreatedAdapter.getObject();
- assertEquals("Fred", recreatedObject.getName());
- }
-
- @Test
- public void recreateObject_referencePreserved() throws Exception {
- recreatedAdapter = mementoForEpr1.recreateObject();
- final ReferencingEntity recreatedObject = (ReferencingEntity)recreatedAdapter.getObject();
- final SimpleEntity reference1 = recreatedObject.getReference();
- assertNotNull(reference1);
-
- assertThat("Fred", equalTo(reference1.getName()));
- }
-
- @Test
- public void recreateObject_homogeneousCollectionPreserved() throws Exception {
- recreatedAdapter = mementoForEpc1.recreateObject();
- final ParentEntity recreatedObject = (ParentEntity)recreatedAdapter.getObject();
- final List<SimpleEntity> homogenousCollection = recreatedObject.getHomogeneousCollection();
- assertNotNull(homogenousCollection);
-
- assertThat(homogenousCollection.size(), is(2));
- assertThat(homogenousCollection.get(0).getName(), is("Fred"));
- assertThat(homogenousCollection.get(1).getName(), is("Harry"));
- }
-
- @Test
- public void recreateObject_heterogeneousCollectionPreserved() throws Exception {
- recreatedAdapter = mementoForEpc1.recreateObject();
- final ParentEntity recreatedObject = (ParentEntity)recreatedAdapter.getObject();
- final List<BaseEntity> hetrogenousCollection = recreatedObject.getHeterogeneousCollection();
- assertNotNull(hetrogenousCollection);
-
- assertThat(hetrogenousCollection.size(), is(2));
- final SimpleEntity firstObj = (SimpleEntity)hetrogenousCollection.get(0);
- assertThat(firstObj.getName(), is("Fred"));
-
- final ReferencingEntity secondObj = (ReferencingEntity)hetrogenousCollection.get(1);
- final SimpleEntity reference1 = secondObj.getReference();
- assertThat(reference1.getName(), is("Fred"));
-
- assertSame(firstObj, reference1);
- }
-
- @Test
- public void recreateObject_whenNull() throws Exception {
- final Memento memento = new Memento(null);
- ObjectAdapter returnedAdapter = memento.recreateObject();
- assertNull(returnedAdapter);
- }
-
-
-}
[42/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java
new file mode 100644
index 0000000..36662fa
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ObjectImmutableTest.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import org.junit.Test;
+
+import org.apache.isis.applib.services.wrapper.DisabledException;
+import org.apache.isis.core.metamodel.facets.collections.disabled.fromimmutable.DisabledFacetOnCollectionDerivedFromImmutable;
+import org.apache.isis.core.metamodel.facets.properties.disabled.fromimmutable.DisabledFacetOnPropertyDerivedFromImmutable;
+
+public class ObjectImmutableTest extends AbstractTest {
+
+ @Test
+ public void settingValueOnImmutableObjectThrowsException() {
+ try {
+ product355WO.setDescription("Changed");
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnPropertyDerivedFromImmutable.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Description"));
+ }
+ }
+
+ @Test
+ public void settingAssociationOnImmutableObjectThrowsException() {
+ try {
+ product355WO.setPlaceOfManufacture(countryUsaDO);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnPropertyDerivedFromImmutable.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Place Of Manufacture"));
+ }
+ }
+
+ @Test
+ public void addingToCollectionOnImmutableObjectThrowsException() {
+ try {
+ product355WO.addToSimilarProducts(product850DO);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnCollectionDerivedFromImmutable.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Similar Products"));
+ }
+ }
+
+ @Test
+ public void removingFromCollectionOnImmutableObjectThrowsException() {
+ product355DO.addToSimilarProducts(product850DO); // TODO: can't setup,
+ // throws
+ // ObjectPersistenceException
+ try {
+ product355WO.removeFromSimilarProducts(product850DO);
+ fail("Should have thrown exception");
+ } catch (final DisabledException ex) {
+ assertThat(ex.getAdvisorClass(), classEqualTo(DisabledFacetOnCollectionDerivedFromImmutable.class));
+ assertThat(ex.getIdentifier().getMemberNaturalName(), equalTo("Similar Products"));
+ }
+ }
+
+ @Test
+ public void canInvokingOnImmutableObject() {
+ product355WO.foobar();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java
new file mode 100644
index 0000000..bd1d7db
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/SaveObjectsTest.java
@@ -0,0 +1,113 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.classEqualTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+import static org.junit.Assert.fail;
+
+import org.hamcrest.Matchers;
+import org.junit.Test;
+
+import org.apache.isis.applib.services.wrapper.InvalidException;
+import org.apache.isis.applib.services.wrapper.WrapperObject;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+import org.apache.isis.core.metamodel.facets.object.validating.validateobject.method.ValidateObjectFacetMethod;
+
+public class SaveObjectsTest extends AbstractTest {
+
+ private WrapperObject asWrapperObject(final Customer proxiedNewCustomer) {
+ return (WrapperObject) proxiedNewCustomer;
+ }
+
+ @Test
+ public void invokingSaveThroughProxyMakesTransientObjectPersistent() {
+ final Customer newCustomer = getDomainObjectContainer().newTransientInstance(Customer.class);
+ assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false));
+ final Customer newCustomerVO = getWrapperFactory().wrap(newCustomer);
+ newCustomerVO.setCustomerNumber(123);
+ newCustomerVO.setFirstNameMandatory("Joe");
+ newCustomerVO.setLastName("Smith");
+ newCustomerVO.setMandatoryAssociation(countryGbrDO);
+ newCustomerVO.setCountryOfBirthMandatory(countryGbrDO);
+ newCustomerVO.setMandatoryValue("foo");
+ newCustomerVO.setMaxLengthField("abc");
+ newCustomerVO.setRegExCaseInsensitiveField("ABCd");
+ newCustomerVO.setRegExCaseSensitiveField("abcd");
+ final WrapperObject proxyNewCustomer = asWrapperObject(newCustomerVO);
+ proxyNewCustomer.save();
+ assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(true));
+ }
+
+ @Test
+ public void invokingSaveOnThroughProxyOnAlreadyPersistedObjectJustUpdatesIt() {
+ // just to get into valid state
+ custJsDO.setCustomerNumber(123);
+ custJsDO.setFirstNameMandatory("Joe");
+ custJsDO.setLastName("Smith");
+ custJsDO.setMandatoryAssociation(countryGbrDO);
+ custJsDO.setCountryOfBirthMandatory(countryGbrDO);
+ custJsDO.setMandatoryValue("foo");
+ custJsDO.setMaxLengthField("abc");
+ custJsDO.setRegExCaseInsensitiveField("ABCd");
+ custJsDO.setRegExCaseSensitiveField("abcd");
+
+ assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
+
+ final WrapperObject newCustomerWO = asWrapperObject(custJsWO);
+ newCustomerWO.save();
+
+ assertThat(getDomainObjectContainer().isPersistent(custJsDO), is(true));
+ }
+
+ @Test
+ public void whenValidateMethodThenCanVetoSave() {
+ final Customer newCustomer = getDomainObjectContainer().newTransientInstance(Customer.class);
+
+ // just to get into valid state
+ newCustomer.setCustomerNumber(123);
+ newCustomer.setFirstNameMandatory("Joe");
+ newCustomer.setLastName("Smith");
+ newCustomer.setCountryOfBirthMandatory(countryGbrDO);
+ newCustomer.setMandatoryAssociation(countryGbrDO);
+ newCustomer.setMandatoryValue("foo");
+ newCustomer.setMaxLengthField("abc");
+ newCustomer.setRegExCaseInsensitiveField("ABCd");
+ newCustomer.setRegExCaseSensitiveField("abcd");
+
+ final Customer newCustomerWO = getWrapperFactory().wrap(newCustomer);
+ newCustomer.validate = "No shakes";
+
+ final WrapperObject newCustomerWrapper = asWrapperObject(newCustomerWO);
+ try {
+ assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false));
+ newCustomerWrapper.save();
+ fail("An InvalidImperativelyException should have been thrown");
+ } catch (final InvalidException ex) {
+
+ assertThat(ex.getAdvisorClass(), classEqualTo(ValidateObjectFacetMethod.class));
+ assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false)); // not
+ // saved
+ assertThat(ex.getMessage(), Matchers.containsString("No shakes"));
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java
new file mode 100644
index 0000000..4586751
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/TitleTest.java
@@ -0,0 +1,33 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+public class TitleTest extends AbstractTest {
+
+ @Test
+ public void shouldAppendToDocumentor() {
+ assertThat(custJsWO.title(), equalTo("Richard Pawson"));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java
new file mode 100644
index 0000000..492522f
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/ViewObjectTest.java
@@ -0,0 +1,91 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.util.List;
+
+import org.junit.Test;
+
+import org.apache.isis.applib.services.wrapper.WrapperObject;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+
+public class ViewObjectTest extends AbstractTest {
+
+ private WrapperObject asWrapperObject() {
+ return (WrapperObject) custJsWO;
+ }
+
+ @Test
+ public void canCastViewsToViewObject() {
+ @SuppressWarnings("unused")
+ final WrapperObject custRpVOAsViewObject = asWrapperObject();
+ }
+
+ @Test
+ public void shouldBeAbleToCreateAView() {
+ final Customer custRpVO = getWrapperFactory().wrap(custJsDO);
+ assertThat(custRpVO, instanceOf(Customer.class));
+ custRpVO.setFirstName("Dick");
+
+ assertThat("Dick", equalTo(custRpVO.getFirstName()));
+ }
+
+ @Test
+ public void viewShouldPassesThroughSetterToUnderlyingDomainObject() {
+ final Customer custRpVO = getWrapperFactory().wrap(custJsDO);
+ custRpVO.setFirstName("Dick");
+
+ assertThat("Dick", equalTo(custRpVO.getFirstName()));
+ }
+
+ @Test
+ public void objectIsViewShouldReturnTrueWhenDealingWithView() {
+ final Customer custRpVO = getWrapperFactory().wrap(custJsDO);
+ assertThat(getWrapperFactory().isWrapper(custRpVO), is(true));
+ }
+
+ @Test
+ public void objectIsViewShouldReturnFalseWhenDealingWithUnderlying() {
+ assertThat(getWrapperFactory().isWrapper(custJsDO), is(false));
+ }
+
+ @Test
+ public void collectionInstanceOfViewObjectShouldReturnTrueWhenDealingWithView() {
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ custJsDO.addToVisitedCountries(countryUsaDO);
+ final List<Country> visitedCountries = custJsWO.getVisitedCountries();
+ assertThat(visitedCountries instanceof WrapperObject, is(true));
+ }
+
+ @Test
+ public void containsOnViewedCollectionShouldIntercept() {
+ custJsDO.addToVisitedCountries(countryGbrDO);
+ custJsDO.addToVisitedCountries(countryUsaDO);
+ final List<Country> visitedCountries = custJsWO.getVisitedCountries();
+ assertThat(visitedCountries.contains(countryGbrDO), is(true));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java
new file mode 100644
index 0000000..629f986
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Country.java
@@ -0,0 +1,155 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Bounded;
+import org.apache.isis.applib.annotation.MaxLength;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.TypicalLength;
+import org.apache.isis.applib.util.TitleBuffer;
+
+@Bounded
+public class Country extends AbstractDomainObject {
+
+ // {{ Logger
+ @SuppressWarnings("unused")
+ private final static Logger LOGGER = LoggerFactory.getLogger(Country.class);
+
+ // }}
+
+ // {{ Identification Methods
+ /**
+ * Defines the title that will be displayed on the user interface in order
+ * to identity this object.
+ */
+ public String title() {
+ final TitleBuffer t = new TitleBuffer();
+ t.append(getName());
+ return t.toString();
+ }
+
+ // }}
+
+ // {{ Code
+ private String code;
+
+ @TypicalLength(3)
+ @MaxLength(3)
+ public String getCode() {
+ return this.code;
+ }
+
+ public void setCode(final String code) {
+ this.code = code;
+ }
+
+ // }}
+
+ // {{ Name
+ private String name;
+
+ @TypicalLength(50)
+ @MaxLength(255)
+ public String getName() {
+ return this.name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+ // {{ FavouriteHolidayDestination
+ private Country favouriteHolidayDestination;
+
+ @Optional
+ public Country getFavouriteHolidayDestination() {
+ return favouriteHolidayDestination;
+ }
+
+ public void setFavouriteHolidayDestination(final Country favouriteHolidayDestination) {
+ this.favouriteHolidayDestination = favouriteHolidayDestination;
+ }
+
+ // }}
+
+ // {{ Colonies
+ private List<Country> colonies = new ArrayList<Country>();
+
+ public List<Country> getColonies() {
+ return this.colonies;
+ }
+
+ @SuppressWarnings("unused")
+ private void setColonies(final List<Country> colonies) {
+ this.colonies = colonies;
+ }
+
+ public void addToColonies(final Country country) {
+ getColonies().add(country);
+ }
+
+ public void removeFromColonies(final Country country) {
+ getColonies().remove(country);
+ }
+
+ public String validateAddToColonies;
+
+ public String validateAddToColonies(final Country country) {
+ return validateAddToColonies;
+ }
+
+ public String validateRemoveFromColonies;
+
+ public String validateRemoveFromColonies(final Country country) {
+ return validateRemoveFromColonies;
+ }
+
+ public String disableColonies;
+
+ public String disableColonies() {
+ return this.disableColonies;
+ }
+
+ public boolean hideColonies;
+
+ public boolean hideColonies() {
+ return this.hideColonies;
+ }
+
+ // }}
+
+ // {{
+ /**
+ * An action to invoke
+ */
+ public void foobar() {
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java
new file mode 100644
index 0000000..fbdf27a
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Customer.java
@@ -0,0 +1,889 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.domain;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.DescribedAs;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.MaxLength;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.RegEx;
+import org.apache.isis.applib.annotation.TypicalLength;
+import org.apache.isis.applib.annotation.When;
+import org.apache.isis.applib.clock.Clock;
+import org.apache.isis.applib.security.UserMemento;
+import org.apache.isis.applib.util.TitleBuffer;
+
+public class Customer extends AbstractDomainObject {
+
+ // {{ Identification Methods
+ /**
+ * Defines the title that will be displayed on the user interface in order
+ * to identity this object.
+ */
+ public String title() {
+ final TitleBuffer t = new TitleBuffer();
+ t.append(getFirstName()).append(getLastName());
+ return t.toString();
+ }
+ // }}
+
+
+ // {{ FirstName
+ private String firstName;
+
+ @DescribedAs("Given or christian name")
+ @TypicalLength(20)
+ @MaxLength(100)
+ @Optional
+ public String getFirstName() {
+ return this.firstName;
+ }
+
+ public void setFirstName(final String firstName) {
+ this.firstName = firstName;
+ }
+
+ public boolean modifyFirstNameCalled = false;
+
+ public void modifyFirstName(final String firstName) {
+ setFirstName(firstName);
+ this.modifyFirstNameCalled = true;
+ }
+
+ public boolean clearFirstNameCalled = false;
+
+ public void clearFirstName() {
+ setFirstName(null);
+ this.clearFirstNameCalled = true;
+ }
+
+ public String validateFirstName;
+ public String validateFirstNameExpectedArg;
+
+ public String validateFirstName(final String firstName) {
+ if (validateFirstNameExpectedArg != null && !validateFirstNameExpectedArg.equals(firstName)) {
+ return "argument provided by XAT framework was incorrect";
+ }
+ return validateFirstName;
+ }
+
+ public String disableFirstName;
+
+ public String disableFirstName() {
+ return this.disableFirstName;
+ }
+
+ public boolean hideFirstName;
+
+ public boolean hideFirstName() {
+ return this.hideFirstName;
+ }
+
+ // }}
+
+
+
+ // {{ FirstNameMandatory
+ private String firstNameMandatory;
+
+ @DescribedAs("Given or christian name")
+ @TypicalLength(20)
+ @MaxLength(100)
+ public String getFirstNameMandatory() {
+ return this.firstNameMandatory;
+ }
+
+ public void setFirstNameMandatory(final String firstNameMandatory) {
+ this.firstNameMandatory = firstNameMandatory;
+ }
+
+ public boolean modifyFirstNameMandatoryCalled = false;
+
+ public void modifyFirstNameMandatory(final String firstNameMandatory) {
+ setFirstNameMandatory(firstNameMandatory);
+ this.modifyFirstNameMandatoryCalled = true;
+ }
+
+ public boolean clearFirstNameMandatoryCalled = false;
+
+ public void clearFirstNameMandatory() {
+ setFirstNameMandatory(null);
+ this.clearFirstNameMandatoryCalled = true;
+ }
+
+ public String validateFirstNameMandatory;
+ public String validateFirstNameMandatoryExpectedArg;
+
+ public String validateFirstNameMandatory(final String firstNameMandatory) {
+ if (validateFirstNameMandatoryExpectedArg != null && !validateFirstNameMandatoryExpectedArg.equals(firstNameMandatory)) {
+ return "argument provided by XAT framework was incorrect";
+ }
+ return validateFirstNameMandatory;
+ }
+
+ public String disableFirstNameMandatory;
+
+ public String disableFirstNameMandatory() {
+ return this.disableFirstNameMandatory;
+ }
+
+ public boolean hideFirstNameMandatory;
+
+ public boolean hideFirstNameMandatory() {
+ return this.hideFirstNameMandatory;
+ }
+
+ // }}
+
+
+
+
+
+
+ // {{ CountryOfBirth
+ private Country countryOfBirth;
+
+ @Optional
+ public Country getCountryOfBirth() {
+ return countryOfBirth;
+ }
+
+ public void setCountryOfBirth(final Country countryOfBirth) {
+ this.countryOfBirth = countryOfBirth;
+ }
+
+ public boolean modifyCountryOfBirthCalled = false;
+
+ public void modifyCountryOfBirth(final Country countryOfBirth) {
+ setCountryOfBirth(countryOfBirth);
+ this.modifyCountryOfBirthCalled = true;
+ }
+
+ public boolean clearCountryOfBirthCalled = false;
+
+ public void clearCountryOfBirth() {
+ setCountryOfBirth(null);
+ this.clearCountryOfBirthCalled = true;
+ }
+
+ public String validateCountryOfBirth;
+
+ public String validateCountryOfBirth(final Country countryOfBirth) {
+ return validateCountryOfBirth;
+ }
+
+ public String disableCountryOfBirth;
+
+ public String disableCountryOfBirth() {
+ return this.disableCountryOfBirth;
+ }
+
+ public boolean hideCountryOfBirth;
+
+ public boolean hideCountryOfBirth() {
+ return this.hideCountryOfBirth;
+ }
+
+ // }}
+
+
+
+
+ // {{ CountryOfBirthMandatory
+ private Country countryOfBirthMandatory;
+
+ public Country getCountryOfBirthMandatory() {
+ return countryOfBirthMandatory;
+ }
+
+ public void setCountryOfBirthMandatory(final Country countryOfBirthMandatory) {
+ this.countryOfBirthMandatory = countryOfBirthMandatory;
+ }
+
+ public boolean modifyCountryOfBirthMandatoryCalled = false;
+
+ public void modifyCountryOfBirthMandatory(final Country countryOfBirthMandatory) {
+ setCountryOfBirthMandatory(countryOfBirthMandatory);
+ this.modifyCountryOfBirthMandatoryCalled = true;
+ }
+
+ public boolean clearCountryOfBirthMandatoryCalled = false;
+
+ public void clearCountryOfBirthMandatory() {
+ setCountryOfBirthMandatory(null);
+ this.clearCountryOfBirthMandatoryCalled = true;
+ }
+
+ public String validateCountryOfBirthMandatory;
+
+ public String validateCountryOfBirthMandatory(final Country countryOfBirthMandatory) {
+ return validateCountryOfBirthMandatory;
+ }
+
+ public String disableCountryOfBirthMandatory;
+
+ public String disableCountryOfBirthMandatory() {
+ return this.disableCountryOfBirthMandatory;
+ }
+
+ public boolean hideCountryOfBirthMandatory;
+
+ public boolean hideCountryOfBirthMandatory() {
+ return this.hideCountryOfBirthMandatory;
+ }
+
+ // }}
+
+
+
+
+
+
+ // {{ VisitedCountries
+ private List<Country> visitedCountries = new ArrayList<Country>();
+
+ public List<Country> getVisitedCountries() {
+ return this.visitedCountries;
+ }
+
+ @SuppressWarnings("unused")
+ private void setVisitedCountries(final List<Country> visitedCountries) {
+ this.visitedCountries = visitedCountries;
+ }
+
+ public void addToVisitedCountries(final Country country) {
+ getVisitedCountries().add(country);
+ }
+
+ public void removeFromVisitedCountries(final Country country) {
+ getVisitedCountries().remove(country);
+ }
+
+ public String validateAddToVisitedCountries;
+
+ public String validateAddToVisitedCountries(final Country country) {
+ return validateAddToVisitedCountries;
+ }
+
+ public String validateRemoveFromVisitedCountries;
+
+ public String validateRemoveFromVisitedCountries(final Country country) {
+ return validateRemoveFromVisitedCountries;
+ }
+
+ public String disableVisitedCountries;
+
+ public String disableVisitedCountries() {
+ return this.disableVisitedCountries;
+ }
+
+ public boolean hideVisitedCountries;
+
+ public boolean hideVisitedCountries() {
+ return this.hideVisitedCountries;
+ }
+
+ // }}
+
+ // {{ AlwaysDisabledValue
+ private String alwaysDisabledValue;
+
+ @Disabled(when = When.ALWAYS)
+ public String getAlwaysDisabledValue() {
+ return this.alwaysDisabledValue;
+ }
+
+ public void setAlwaysDisabledValue(final String alwaysDisabled) {
+ this.alwaysDisabledValue = alwaysDisabled;
+ }
+
+ // }}
+
+ // {{ AlwaysDisabledAssociation
+ private Country alwaysDisabledAssociation;
+
+ @Disabled(when = When.ALWAYS)
+ public Country getAlwaysDisabledAssociation() {
+ return this.alwaysDisabledAssociation;
+ }
+
+ public void setAlwaysDisabledAssociation(final Country alwaysDisabled) {
+ this.alwaysDisabledAssociation = alwaysDisabled;
+ }
+
+ // }}
+
+ // {{ AlwaysDisabledCollection
+ private List<Country> alwaysDisabledCollection = new ArrayList<Country>();
+
+ @Disabled(when = When.ALWAYS)
+ public List<Country> getAlwaysDisabledCollection() {
+ return this.alwaysDisabledCollection;
+ }
+
+ @SuppressWarnings("unused")
+ private void setAlwaysDisabledCollection(final List<Country> alwaysDisabledCollection) {
+ this.alwaysDisabledCollection = alwaysDisabledCollection;
+ }
+
+ public void addToAlwaysDisabledCollection(final Country country) {
+ getAlwaysDisabledCollection().add(country);
+ }
+
+ public void removeFromAlwaysDisabledCollection(final Country country) {
+ getAlwaysDisabledCollection().remove(country);
+ }
+
+ // }}
+
+ // {{ AlwaysDisabledAction
+ @Disabled(when = When.ALWAYS)
+ public void alwaysDisabledAction() {
+ }
+
+ // }}
+
+ // {{ SessionDisabledValue
+ private String sessionDisabledValue;
+
+ public String getSessionDisabledValue() {
+ return this.sessionDisabledValue;
+ }
+
+ public void setSessionDisabledValue(final String sessionDisabled) {
+ this.sessionDisabledValue = sessionDisabled;
+ }
+
+ public static String disableSessionDisabledValue(final UserMemento user) {
+ return "disabled for this user";
+ }
+
+ // }}
+
+ // {{ SessionDisabledAssociation
+ private Country sessionDisabledAssociation;
+
+ public Country getSessionDisabledAssociation() {
+ return this.sessionDisabledAssociation;
+ }
+
+ public void setSessionDisabledAssociation(final Country sessionDisabled) {
+ this.sessionDisabledAssociation = sessionDisabled;
+ }
+
+ public static String disableSessionDisabledAssociation(final UserMemento user) {
+ return "disabled for this user";
+ }
+
+ // }}
+
+ // {{ SessionDisabledCollection
+ private List<Country> sessionDisabledCollection = new ArrayList<Country>();
+
+ public List<Country> getSessionDisabledCollection() {
+ return this.sessionDisabledCollection;
+ }
+
+ @SuppressWarnings("unused")
+ private void setSessionDisabledCollection(final List<Country> sessionDisabledCollection) {
+ this.sessionDisabledCollection = sessionDisabledCollection;
+ }
+
+ public void addToSessionDisabledCollection(final Country country) {
+ getSessionDisabledCollection().add(country);
+ }
+
+ public void removeFromSessionDisabledCollection(final Country country) {
+ getSessionDisabledCollection().remove(country);
+ }
+
+ public static String disableSessionDisabledCollection(final UserMemento user) {
+ return "disabled for this user";
+ }
+
+ // }}
+
+ // {{ SessionDisabledAction
+ public void sessionDisabledAction() {
+ }
+
+ public static String disableSessionDisabledAction(final UserMemento user) {
+ return "disabled for this user";
+ }
+
+ // }}
+
+ // {{ AlwaysHiddenValue
+ private String alwaysHiddenValue;
+
+ @Hidden(when=When.ALWAYS)
+ public String getAlwaysHiddenValue() {
+ return this.alwaysHiddenValue;
+ }
+
+ public void setAlwaysHiddenValue(final String alwaysHidden) {
+ this.alwaysHiddenValue = alwaysHidden;
+ }
+
+ // }}
+
+ // {{ AlwaysHiddenAssociation
+ private Country alwaysHiddenAssociation;
+
+ @Hidden(when=When.ALWAYS)
+ public Country getAlwaysHiddenAssociation() {
+ return this.alwaysHiddenAssociation;
+ }
+
+ public void setAlwaysHiddenAssociation(final Country alwaysHidden) {
+ this.alwaysHiddenAssociation = alwaysHidden;
+ }
+
+ // }}
+
+ // {{ AlwaysHiddenCollection
+ private List<Country> alwaysHiddenCollection = new ArrayList<Country>();
+
+ @Hidden(when=When.ALWAYS)
+ public List<Country> getAlwaysHiddenCollection() {
+ return this.alwaysHiddenCollection;
+ }
+
+ @SuppressWarnings("unused")
+ private void setAlwaysHiddenCollection(final List<Country> alwaysHiddenCollection) {
+ this.alwaysHiddenCollection = alwaysHiddenCollection;
+ }
+
+ public void addToAlwaysHiddenCollection(final Country country) {
+ getAlwaysHiddenCollection().add(country);
+ }
+
+ public void removeFromAlwaysHiddenCollection(final Country country) {
+ getAlwaysHiddenCollection().remove(country);
+ }
+
+ // }}
+
+ // {{ SessionDisabledAction
+ @Hidden(when=When.ALWAYS)
+ public void alwaysHiddenAction() {
+ }
+
+ // }}
+
+ // {{ SessionHiddenValue
+ private String sessionHiddenValue;
+
+ public String getSessionHiddenValue() {
+ return this.sessionHiddenValue;
+ }
+
+ public void setSessionHiddenValue(final String sessionHidden) {
+ this.sessionHiddenValue = sessionHidden;
+ }
+
+ public static boolean hideSessionHiddenValue(final UserMemento user) {
+ return true;
+ }
+
+ // }}
+
+ // {{ SessionHiddenAssociation
+ private Country sessionHiddenAssociation;
+
+ public Country getSessionHiddenAssociation() {
+ return this.sessionHiddenAssociation;
+ }
+
+ public void setSessionHiddenAssociation(final Country sessionHidden) {
+ this.sessionHiddenAssociation = sessionHidden;
+ }
+
+ public static boolean hideSessionHiddenAssociation(final UserMemento user) {
+ return true;
+ }
+
+ // }}
+
+ // {{ SessionHiddenCollection
+ private List<Country> sessionHiddenCollection = new ArrayList<Country>();
+
+ public List<Country> getSessionHiddenCollection() {
+ return this.sessionHiddenCollection;
+ }
+
+ @SuppressWarnings("unused")
+ private void setSessionHiddenCollection(final List<Country> sessionHiddenCollection) {
+ this.sessionHiddenCollection = sessionHiddenCollection;
+ }
+
+ public void addToSessionHiddenCollection(final Country country) {
+ getSessionHiddenCollection().add(country);
+ }
+
+ public void removeFromSessionHiddenCollection(final Country country) {
+ getSessionHiddenCollection().remove(country);
+ }
+
+ public static boolean hideSessionHiddenCollection(final UserMemento user) {
+ return true;
+ }
+
+ // }}
+
+ // {{ SessionHiddenAction
+ public void sessionHiddenAction() {
+ }
+
+ public static boolean hideSessionHiddenAction(final UserMemento user) {
+ return true;
+ }
+
+ // }}
+
+ // {{ Mandatory
+ private String mandatoryValue;
+
+ public String getMandatoryValue() {
+ return this.mandatoryValue;
+ }
+
+ public void setMandatoryValue(final String mandatory) {
+ this.mandatoryValue = mandatory;
+ }
+
+ // }}
+
+ // {{ Mandatory
+ private Country mandatoryAssociation;
+
+ public Country getMandatoryAssociation() {
+ return this.mandatoryAssociation;
+ }
+
+ public void setMandatoryAssociation(final Country mandatory) {
+ this.mandatoryAssociation = mandatory;
+ }
+
+ // }}
+
+ // {{ Optional
+ private String optionalValue;
+
+ @Optional
+ public String getOptionalValue() {
+ return this.optionalValue;
+ }
+
+ public void setOptionalValue(final String optional) {
+ this.optionalValue = optional;
+ }
+
+ // }}
+
+ // {{ OptionalAssociation
+ private Country optionalAssociation;
+
+ @Optional
+ public Country getOptionalAssociation() {
+ return this.optionalAssociation;
+ }
+
+ public void setOptionalAssociation(final Country optional) {
+ this.optionalAssociation = optional;
+ }
+
+ // }}
+
+ // {{ OptionalCollection
+ private List<Country> optionalCollection = new ArrayList<Country>();
+
+ @Optional
+ public List<Country> getOptionalCollection() {
+ return this.optionalCollection;
+ }
+
+ @SuppressWarnings("unused")
+ private void setOptionalCollection(final List<Country> optionalCollection) {
+ this.optionalCollection = optionalCollection;
+ }
+
+ public void addToOptionalCollection(final Country country) {
+ getOptionalCollection().add(country);
+ }
+
+ public void removeFromOptionalCollection(final Country country) {
+ getOptionalCollection().remove(country);
+ }
+
+ // }}
+
+ // {{ MaxLength
+ private String maxLengthField;
+
+ @MaxLength(10)
+ public String getMaxLengthField() {
+ return this.maxLengthField;
+ }
+
+ public void setMaxLengthField(final String maxLength) {
+ this.maxLengthField = maxLength;
+ }
+
+ // }}
+
+ // {{ RegExCaseSensitive
+ private String regExCaseSensitiveField;
+
+ @RegEx(validation = "abc.+", caseSensitive = true)
+ public String getRegExCaseSensitiveField() {
+ return this.regExCaseSensitiveField;
+ }
+
+ public void setRegExCaseSensitiveField(final String regEx) {
+ this.regExCaseSensitiveField = regEx;
+ }
+
+ // }}
+
+ // {{ RegExCaseInsensitive
+ private String regExCaseInsensitiveField;
+
+ @RegEx(validation = "abc.+", caseSensitive = false)
+ public String getRegExCaseInsensitiveField() {
+ return this.regExCaseInsensitiveField;
+ }
+
+ public void setRegExCaseInsensitiveField(final String regExCaseInsensitive) {
+ this.regExCaseInsensitiveField = regExCaseInsensitive;
+ }
+
+ // }}
+
+ // {{ LastName
+ private String lastName;
+
+ @DescribedAs("Family name or surname")
+ @MaxLength(100)
+ @TypicalLength(30)
+ @Named("Surname")
+ public String getLastName() {
+ return this.lastName;
+ }
+
+ public void setLastName(final String lastName) {
+ this.lastName = lastName;
+ }
+
+ public void modifyLastName(final String lastName) {
+ this.lastName = lastName;
+ }
+
+ // }}
+
+ // {{ CustomerNumber
+ private Integer customerNumber;
+
+ @Disabled(when = When.ONCE_PERSISTED)
+ public Integer getCustomerNumber() {
+ return this.customerNumber;
+ }
+
+ public void setCustomerNumber(final Integer customerNumber) {
+ this.customerNumber = customerNumber;
+ }
+
+ public String validateCustomerNumber(final Integer customerNumber) {
+ return null;
+ }
+
+ // }}
+
+ // {{ Orders
+ private List<Order> orders = new ArrayList<Order>();
+
+ public List<Order> getOrders() {
+ return this.orders;
+ }
+
+ @SuppressWarnings("unused")
+ private void setOrders(final List<Order> orders) {
+ this.orders = orders;
+ }
+
+ public void addToOrders(final Order order) {
+ getOrders().add(order);
+ }
+
+ public void removeFromOrders(final Order order) {
+ getOrders().remove(order);
+ }
+
+ // }}
+
+ // {{ LastOrder
+ private Order lastOrder;
+
+ @Disabled
+ public Order getLastOrder() {
+ return this.lastOrder;
+ }
+
+ public void setLastOrder(final Order lastOrder) {
+ this.lastOrder = lastOrder;
+ }
+
+ public void modifyLastOrder(final Order lastOrder) {
+ setLastOrder(lastOrder);
+ }
+
+ public void clearLastOrder() {
+ setLastOrder(null);
+ }
+
+ // }}
+
+ // {{ PlaceOrder
+ public void placeOrder(final Product p, @Named("Quantity") final Integer quantity) {
+ final Order order = getContainer().newTransientInstance(Order.class);
+ order.modifyCustomer(this);
+ order.modifyProduct(p);
+ order.setOrderDate(new Date(Clock.getTime()));
+ order.setQuantity(quantity);
+ addToOrders(order);
+ modifyLastOrder(order);
+ order.makePersistent();
+ }
+
+ public String validatePlaceOrder;
+
+ public String validatePlaceOrder(final Product p, final Integer quantity) {
+ return validatePlaceOrder;
+ }
+
+ public String disablePlaceOrder;
+
+ public String disablePlaceOrder(final Product p, final Integer quantity) {
+ return disablePlaceOrder;
+ }
+
+ public boolean hidePlaceOrder;
+
+ public boolean hidePlaceOrder() {
+ return hidePlaceOrder;
+ }
+
+ public Object[] defaultPlaceOrder() {
+ Product lastProductOrdered = null;
+ if (getLastOrder() != null) {
+ lastProductOrdered = getLastOrder().getProduct();
+ }
+ return new Object[] { lastProductOrdered, new Integer(1) };
+ }
+
+ // }}
+
+ // {{ MoreOrders
+ private List<Order> moreOrders = new ArrayList<Order>();
+
+ @Disabled
+ public List<Order> getMoreOrders() {
+ return this.moreOrders;
+ }
+
+ @SuppressWarnings("unused")
+ private void setMoreOrders(final List<Order> moreOrders) {
+ this.moreOrders = moreOrders;
+ }
+
+ public void addToMoreOrders(final Order order) {
+ getMoreOrders().add(order);
+ }
+
+ public void removeFromMoreOrders(final Order order) {
+ getMoreOrders().remove(order);
+ }
+
+ // }}
+
+ public String validate;
+ public boolean validateCalled = false;
+
+ public String validate() {
+ validateCalled = true;
+ return validate;
+ }
+
+ public Long actionWithOptionalValueParameterArgument = Long.MAX_VALUE;
+
+ public void actionWithOptionalValueParameter(@Optional @Named("Amount") final Long val) {
+ actionWithOptionalValueParameterArgument = val;
+ }
+
+ public Long actionWithMandatoryValueParameterArgument = Long.MAX_VALUE;
+
+ public void actionWithMandatoryValueParameter(@Named("Amount") final Long val) {
+ actionWithMandatoryValueParameterArgument = val;
+ }
+
+ public Product actionWithMandatoryReferenceParameterArgument = new Product();
+
+ public void actionWithMandatoryReferenceParameter(final Product product) {
+ actionWithMandatoryReferenceParameterArgument = product;
+ }
+
+ public Product actionWithOptionalReferenceParameterArgument = new Product();
+
+ public void actionWithOptionalReferenceParameter(@Optional final Product product) {
+ actionWithOptionalReferenceParameterArgument = product;
+ }
+
+ public String actionWithOptionalStringParameterArgument = "original value";
+
+ public void actionWithOptionalStringParameter(@Optional @Named("Amount") final String val) {
+ actionWithOptionalStringParameterArgument = val;
+ }
+
+ public String actionWithMandatoryStringParameterArgument = "original value";
+
+ public void actionWithMandatoryStringParameter(@Named("Amount") final String val) {
+ actionWithMandatoryStringParameterArgument = val;
+ }
+
+ public String actionWithMaxLengthStringParameterArgument = "1234";
+
+ public void actionWithMaxLengthStringParameter(@Named("Amount") @MaxLength(4) final String val) {
+ actionWithMaxLengthStringParameterArgument = val;
+ }
+
+ public String actionWithRegExStringParameterArgument = "1234";
+
+ public void actionWithRegExStringParameter(@Named("Amount") @RegEx(validation = "[0-9]{4}") final String val) {
+ actionWithRegExStringParameterArgument = val;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java
new file mode 100644
index 0000000..2408a43
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Order.java
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.domain;
+
+import java.util.Date;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.util.TitleBuffer;
+
+public class Order extends AbstractDomainObject {
+
+ // use ctrl+space to bring up the NO templates.
+ // if you do not wish to subclass AbstractDomainObject,
+ // then use the "injc - Inject Container" template.
+
+ // also, use CoffeeBytes code folding with
+ // user-defined regions of {{ and }}
+
+ // {{ Logger
+ @SuppressWarnings("unused")
+ private final static Logger LOGGER = LoggerFactory.getLogger(Order.class);
+
+ // }}
+
+ // {{ Identification Methods
+ /**
+ * Defines the title that will be displayed on the user interface in order
+ * to identity this object.
+ */
+ public String title() {
+ final TitleBuffer t = new TitleBuffer();
+ // null guard because NOF may call title while still setting
+ // up the object
+ final Product product = getProduct();
+ if (product != null) {
+ t.append(product.getCode());
+ } else {
+ t.append("???");
+ }
+ t.append("x", getQuantity());
+ return t.toString();
+ }
+
+ // }}
+
+ // {{ OrderDate
+ private Date orderDate;
+
+ @Disabled
+ public Date getOrderDate() {
+ return this.orderDate;
+ }
+
+ public void setOrderDate(final Date orderDate) {
+ this.orderDate = orderDate;
+ }
+
+ // }}
+
+ // {{ Quantity
+ private Integer quantity;
+
+ public Integer getQuantity() {
+ return this.quantity;
+ }
+
+ public void setQuantity(final Integer quantity) {
+ this.quantity = quantity;
+ }
+
+ public String validateQuantity(final Integer quantity) {
+ return quantity.intValue() <= 0 ? "Quantity must be a positive value" : null;
+ }
+
+ public String disableQuantity() {
+ return isPersistent() ? "Already saved" : null;
+ }
+
+ public Integer defaultQuantity() {
+ return new Integer(1);
+ }
+
+ // }}
+
+ // {{ Customer
+ private Customer customer;
+
+ @Disabled
+ public Customer getCustomer() {
+ return this.customer;
+ }
+
+ public void setCustomer(final Customer customer) {
+ this.customer = customer;
+ }
+
+ public void modifyCustomer(final Customer customer) {
+ setCustomer(customer);
+ }
+
+ public void clearCustomer() {
+ setCustomer(null);
+ }
+
+ // }}
+
+ // {{ Product
+ private Product product;
+
+ @Disabled
+ public Product getProduct() {
+ return this.product;
+ }
+
+ public void setProduct(final Product product) {
+ this.product = product;
+ }
+
+ /**
+ * Capture price from product at time the order is taken.
+ *
+ * @param product
+ */
+ public void modifyProduct(final Product product) {
+ setProduct(product);
+ setPrice(product.getPrice());
+ }
+
+ /**
+ * Never called.
+ *
+ * @param product
+ */
+ public void clearProduct() {
+ setProduct(null);
+ }
+
+ // }}
+
+ // {{ Price
+ private Double price;
+
+ @Disabled
+ public Double getPrice() {
+ return this.price;
+ }
+
+ public void setPrice(final Double price) {
+ this.price = price;
+ }
+
+ // }}
+
+ // {{ makePersistent
+ /**
+ * Raise visibility so can be invoked by other classes.
+ */
+ @Override
+ public void makePersistent() {
+ persist(this);
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java
new file mode 100644
index 0000000..39a0fe7
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/domain/Product.java
@@ -0,0 +1,186 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.domain;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Immutable;
+import org.apache.isis.applib.annotation.MaxLength;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.TypicalLength;
+import org.apache.isis.applib.annotation.When;
+import org.apache.isis.applib.util.TitleBuffer;
+
+@Immutable
+public class Product extends AbstractDomainObject {
+
+ // use ctrl+space to bring up the NO templates.
+ // if you do not wish to subclass AbstractDomainObject,
+ // then use the "injc - Inject Container" template.
+
+ // also, use CoffeeBytes code folding with
+ // user-defined regions of {{ and }}
+
+ // {{ Logger
+ @SuppressWarnings("unused")
+ private final static Logger LOGGER = LoggerFactory.getLogger(Product.class);
+
+ // }}
+
+ // {{ Identification Methods
+ /**
+ * Defines the title that will be displayed on the user interface in order
+ * to identity this object.
+ */
+ public String title() {
+ final TitleBuffer t = new TitleBuffer();
+ t.append(getCode());
+ t.append(":", getDescription());
+ return t.toString();
+ }
+
+ // }}
+
+ // {{ Code
+ private String code;
+
+ @TypicalLength(9)
+ @MaxLength(9)
+ @Disabled(when = When.ONCE_PERSISTED)
+ public String getCode() {
+ return this.code;
+ }
+
+ public void setCode(final String code) {
+ this.code = code;
+ }
+
+ // }}
+
+ // {{ Description
+ private String description;
+
+ @TypicalLength(50)
+ @MaxLength(255)
+ public String getDescription() {
+ return this.description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ // }}
+
+ // {{ PlaceOfManufacture
+ private Country placeOfManufacture;
+
+ @Optional
+ public Country getPlaceOfManufacture() {
+ return placeOfManufacture;
+ }
+
+ public void setPlaceOfManufacture(final Country placeOfManufacture) {
+ this.placeOfManufacture = placeOfManufacture;
+ }
+
+ // }}
+
+ // {{ Price
+ private Double price;
+
+ public Double getPrice() {
+ return this.price;
+ }
+
+ public void setPrice(final Double price) {
+ this.price = price;
+ }
+
+ public String validatePrice(final Double price) {
+ if (price.doubleValue() <= 0) {
+ return "Price must be positive";
+ }
+ return null;
+ }
+
+ // }}
+
+ // {{ SimilarProducts
+ private List<Product> similarProducts = new ArrayList<Product>();
+
+ public List<Product> getSimilarProducts() {
+ return this.similarProducts;
+ }
+
+ @SuppressWarnings("unused")
+ private void setSimilarProducts(final List<Product> similarProducts) {
+ this.similarProducts = similarProducts;
+ }
+
+ public void addToSimilarProducts(final Product country) {
+ getSimilarProducts().add(country);
+ }
+
+ public void removeFromSimilarProducts(final Product country) {
+ getSimilarProducts().remove(country);
+ }
+
+ public String validateAddToSimilarProducts;
+
+ public String validateAddToSimilarProducts(final Product country) {
+ return validateAddToSimilarProducts;
+ }
+
+ public String validateRemoveFromSimilarProducts;
+
+ public String validateRemoveFromSimilarProducts(final Product country) {
+ return validateRemoveFromSimilarProducts;
+ }
+
+ public String disableSimilarProducts;
+
+ public String disableSimilarProducts() {
+ return this.disableSimilarProducts;
+ }
+
+ public boolean hideSimilarProducts;
+
+ public boolean hideSimilarProducts() {
+ return this.hideSimilarProducts;
+ }
+
+ // }}
+
+ // {{
+ /**
+ * An action to invoke
+ */
+ public void foobar() {
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java
new file mode 100644
index 0000000..b681bdc
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CountriesFixture.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.CountryRepository;
+
+public class CountriesFixture extends AbstractFixture {
+
+ // {{ Logger
+ private final static Logger LOGGER = LoggerFactory.getLogger(CountriesFixture.class);
+
+ public Logger getLOGGER() {
+ return LOGGER;
+ }
+
+ // }}
+
+ @Override
+ public void install() {
+ getLOGGER().debug("installing");
+ getCountryRepository().newCountry("AUS", "Australia");
+ getCountryRepository().newCountry("GBR", "United Kingdom of Great Britain & N. Ireland");
+ getCountryRepository().newCountry("USA", "United States of America");
+ }
+
+ // {{ Injected: CountryRepository
+ private CountryRepository countryRepository;
+
+ /**
+ * This field is not persisted, nor displayed to the user.
+ */
+ protected CountryRepository getCountryRepository() {
+ return this.countryRepository;
+ }
+
+ /**
+ * Injected by the application container.
+ */
+ public void setCountryRepository(final CountryRepository countryRepository) {
+ this.countryRepository = countryRepository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java
new file mode 100644
index 0000000..caf2f1e
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomerOrdersFixture.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Product;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.CustomerRepository;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.ProductRepository;
+
+public class CustomerOrdersFixture extends AbstractFixture {
+
+ // use ctrl+space to bring up the NO templates.
+
+ // also, use CoffeeBytes code folding with
+ // user-defined regions of {{ and }}
+
+ // {{ Logger
+ private final static Logger LOGGER = LoggerFactory.getLogger(CustomerOrdersFixture.class);
+
+ public Logger getLOGGER() {
+ return LOGGER;
+ }
+
+ // }}
+
+ @Override
+ public void install() {
+ getLOGGER().debug("installing");
+ final Customer richard = getCustomerRepository().findByName("Pawson");
+ final Product foldingTable = getProductRepository().findByCode("820-72721");
+ final Product foldingChair = getProductRepository().findByCode("820-72725");
+ final Product waspCatcher = getProductRepository().findByCode("850-18003");
+ final Product coolbox = getProductRepository().findByCode("845-01020");
+
+ setDate(2007, 4, 11);
+ setTime(10, 15);
+ richard.placeOrder(foldingTable, 1);
+ setDate(2007, 4, 12);
+ setTime(9, 35);
+ richard.placeOrder(foldingChair, 6);
+ setDate(2007, 4, 13);
+ setTime(14, 20);
+ richard.placeOrder(waspCatcher, 1);
+ setDate(2007, 4, 14);
+ setTime(11, 10);
+ richard.placeOrder(coolbox, 1);
+ }
+
+ // {{ Injected: CustomerRepository
+ private CustomerRepository customerRepository;
+
+ /**
+ * This field is not persisted, nor displayed to the user.
+ */
+ protected CustomerRepository getCustomerRepository() {
+ return this.customerRepository;
+ }
+
+ /**
+ * Injected by the application container.
+ */
+ public void setCustomerRepository(final CustomerRepository customerRepository) {
+ this.customerRepository = customerRepository;
+ }
+
+ // }}
+
+ // {{ Injected: ProductRepository
+ private ProductRepository productRepository;
+
+ /**
+ * This field is not persisted, nor displayed to the user.
+ */
+ protected ProductRepository getProductRepository() {
+ return this.productRepository;
+ }
+
+ /**
+ * Injected by the application container.
+ */
+ public void setProductRepository(final ProductRepository productRepository) {
+ this.productRepository = productRepository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java
new file mode 100644
index 0000000..b3af720
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/CustomersFixture.java
@@ -0,0 +1,89 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.CountryRepository;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.CustomerRepository;
+
+public class CustomersFixture extends AbstractFixture {
+
+ // {{ Logger
+ private final static Logger LOGGER = LoggerFactory.getLogger(CustomersFixture.class);
+
+ public Logger getLOGGER() {
+ return LOGGER;
+ }
+
+ // }}
+
+ @Override
+ public void install() {
+ getLOGGER().debug("installing");
+ final Country countryGBR = getCountryRepository().findByCode("GBR");
+ getCustomerRepository().newCustomer("Richard", "Pawson", 1, countryGBR);
+ getCustomerRepository().newCustomer("Robert", "Matthews", 2, countryGBR);
+ getCustomerRepository().newCustomer("Dan", "Haywood", 3, countryGBR);
+ getCustomerRepository().newCustomer("Stef", "Cascarini", 4, countryGBR);
+ getCustomerRepository().newCustomer("Dave", "Slaughter", 5, countryGBR);
+ }
+
+ // {{ Injected: CustomerRepository
+ private CustomerRepository customerRepository;
+
+ /**
+ * This field is not persisted, nor displayed to the user.
+ */
+ protected CustomerRepository getCustomerRepository() {
+ return this.customerRepository;
+ }
+
+ /**
+ * Injected by the application container.
+ */
+ public void setCustomerRepository(final CustomerRepository customerRepository) {
+ this.customerRepository = customerRepository;
+ }
+
+ // }}
+
+ // {{ Injected: CountryRepository
+ private CountryRepository countryRepository;
+
+ /**
+ * This field is not persisted, nor displayed to the user.
+ */
+ protected CountryRepository getCountryRepository() {
+ return this.countryRepository;
+ }
+
+ /**
+ * Injected by the application container.
+ */
+ public void setCountryRepository(final CountryRepository countryRepository) {
+ this.countryRepository = countryRepository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java
new file mode 100644
index 0000000..76bf757
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/JoeBloggsFixture.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
+
+import org.apache.isis.applib.fixtures.LogonFixture;
+
+public class JoeBloggsFixture extends LogonFixture {
+
+ public JoeBloggsFixture() {
+ super("jbloggs");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java
new file mode 100644
index 0000000..06b846d
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/fixtures/ProductsFixture.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.fixtures;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.integtestsupport.legacy.sample.service.ProductRepository;
+
+public class ProductsFixture extends AbstractFixture {
+
+ // use ctrl+space to bring up the NO templates.
+
+ // also, use CoffeeBytes code folding with
+ // user-defined regions of {{ and }}
+
+ // {{ Logger
+ private final static Logger LOGGER = LoggerFactory.getLogger(ProductsFixture.class);
+
+ public Logger getLOGGER() {
+ return LOGGER;
+ }
+
+ // }}
+
+ @Override
+ public void install() {
+ getLOGGER().debug("installing");
+ getProductRepository().newProduct("355-40311", "Weekend camping pack", 5000);
+ getProductRepository().newProduct("850-18003", "Stripy Wasp Catcher", 695);
+ getProductRepository().newProduct("845-06203", "Combi Backpack Hamper", 5900);
+ getProductRepository().newProduct("820-72721", "Folding Table", 4000);
+ getProductRepository().newProduct("820-72725", "Folding Chair", 2500);
+ getProductRepository().newProduct("845-01020", "Isotherm Cool Box", 2500);
+ }
+
+ // {{ Injected: ProductRepository
+ private ProductRepository productRepository;
+
+ /**
+ * This field is not persisted, nor displayed to the user.
+ */
+ protected ProductRepository getProductRepository() {
+ return this.productRepository;
+ }
+
+ /**
+ * Injected by the application container.
+ */
+ public void setProductRepository(final ProductRepository productRepository) {
+ this.productRepository = productRepository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java
new file mode 100644
index 0000000..e0e88e5
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CountryRepository.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.service;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.filter.Filter;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+
+@Named("Countries")
+public class CountryRepository extends AbstractFactoryAndRepository {
+
+ // {{ Logger
+ @SuppressWarnings("unused")
+ private final static Logger LOGGER = LoggerFactory.getLogger(CountryRepository.class);
+
+ // }}
+
+ /**
+ * Lists all countries in the repository.
+ */
+ public List<Country> showAll() {
+ return allInstances(Country.class);
+ }
+
+ // {{ findByCode
+ /**
+ * Returns the Country with given code
+ */
+ public Country findByCode(@Named("Code") final String code) {
+ return firstMatch(Country.class, new Filter<Country>() {
+ @Override
+ public boolean accept(final Country country) {
+ return code.equals(country.getCode());
+ }
+ });
+ }
+
+ // }}
+
+ /**
+ * Creates a new countryGBR.
+ *
+ * <p>
+ * For use by fixtures only.
+ *
+ * @return
+ */
+ @Hidden
+ public Country newCountry(final String code, final String name) {
+ final Country country = newTransientInstance(Country.class);
+ country.setCode(code);
+ country.setName(name);
+ persist(country);
+ return country;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java
new file mode 100644
index 0000000..7bb2795
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/CustomerRepository.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.service;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.filter.Filter;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Country;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+
+@Named("Customers")
+public class CustomerRepository extends AbstractFactoryAndRepository {
+
+ // use ctrl+space to bring up the NO templates.
+
+ // also, use CoffeeBytes code folding with
+ // user-defined regions of {{ and }}
+
+ // {{ Logger
+ @SuppressWarnings("unused")
+ private final static Logger LOGGER = LoggerFactory.getLogger(CustomerRepository.class);
+
+ // }}
+
+ /**
+ * Lists all customers in the repository.
+ */
+ public List<Customer> showAll() {
+ return allInstances(Customer.class);
+ }
+
+ // {{ findAllByName, findByName
+ /**
+ * Returns a list of Customers with given last name.
+ */
+ public List<Customer> findAllByName(@Named("Last name") final String lastName) {
+ return allMatches(Customer.class, new FilterLastName(lastName));
+ }
+
+ /**
+ * Returns the first Customer with given last name.
+ */
+ public Customer findByName(@Named("Last name") final String lastName) {
+ final Customer firstMatch = firstMatch(Customer.class, new FilterLastName(lastName));
+ return firstMatch;
+ }
+
+ private final class FilterLastName implements Filter<Customer> {
+ private final String name;
+
+ private FilterLastName(final String name) {
+ this.name = name;
+ }
+
+ @Override
+ public boolean accept(final Customer customer) {
+ return customer.getLastName().toLowerCase().contains(name.toLowerCase());
+ }
+ }
+
+ // }}
+
+ /**
+ * Creates a new (still-transient) customer.
+ *
+ * @return
+ */
+ public Customer newCustomer() {
+ final Customer customer = newTransientInstance(Customer.class);
+ return customer;
+ }
+
+ /**
+ * Creates a new (already persisted) customer.
+ *
+ * <p>
+ * For use by fixtures only.
+ *
+ * @return
+ */
+ @Hidden
+ public Customer newCustomer(final String firstName, final String lastName, final int customerNumber, final Country countryOfBirth) {
+
+ final Customer customer = newCustomer();
+ customer.setFirstName(firstName);
+ customer.setLastName(lastName);
+ customer.setCustomerNumber(customerNumber);
+ customer.modifyCountryOfBirth(countryOfBirth);
+
+ persist(customer);
+ return customer;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java
new file mode 100644
index 0000000..e70c442
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/OrderRepository.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.service;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Order;
+
+@Named("Orders")
+public class OrderRepository extends AbstractFactoryAndRepository {
+
+ // use ctrl+space to bring up the NO templates.
+
+ // also, use CoffeeBytes code folding with
+ // user-defined regions of {{ and }}
+
+ @SuppressWarnings("unused")
+ private final static Logger LOGGER = LoggerFactory.getLogger(OrderRepository.class);
+
+ // {{ findRecentOrders
+ public List<Order> findRecentOrders(final Customer customer, @Named("Number of Orders") final Integer numberOfOrders) {
+ final List<Order> orders = customer.getOrders();
+ Collections.sort(orders, new Comparator<Order>() {
+ @Override
+ public int compare(final Order o1, final Order o2) {
+ final long time1 = o1.getOrderDate().getTime();
+ final long time2 = o2.getOrderDate().getTime();
+ return (int) (time2 - time1);
+ }
+ });
+ if (orders.size() < numberOfOrders) {
+ return orders;
+ } else {
+ return orders.subList(0, numberOfOrders);
+ }
+ }
+
+ public Integer default1FindRecentOrders() {
+ return 3;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java
new file mode 100644
index 0000000..4049b99
--- /dev/null
+++ b/mothballed/tck/tck-integtests/src/test/java/org/apache/isis/core/integtestsupport/legacy/sample/service/ProductRepository.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.integtestsupport.legacy.sample.service;
+
+import java.util.List;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.filter.Filter;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Customer;
+import org.apache.isis.core.integtestsupport.legacy.sample.domain.Product;
+
+@Named("Products")
+public class ProductRepository extends AbstractFactoryAndRepository {
+
+ // use ctrl+space to bring up the NO templates.
+
+ // also, use CoffeeBytes code folding with
+ // user-defined regions of {{ and }}
+
+ // {{ Logger
+ @SuppressWarnings("unused")
+ private final static Logger LOGGER = LoggerFactory.getLogger(ProductRepository.class);
+
+ // }}
+
+ /**
+ * Lists all products in the repository.
+ */
+ public List<Product> showAll() {
+ return allInstances(Product.class);
+ }
+
+ // {{ findByCode
+ /**
+ * Returns the Product with given code
+ */
+ public Product findByCode(@Named("Code") final String code) {
+ return firstMatch(Product.class, new Filter<Product>() {
+ @Override
+ public boolean accept(final Product product) {
+ return code.equals(product.getCode());
+ }
+ });
+ }
+
+ // }}
+
+ /**
+ * Creates a new product.
+ *
+ * <p>
+ * For use by fixtures only.
+ *
+ * @return
+ */
+ @Hidden
+ public Product newProduct(final String code, final String description, final int priceInPence) {
+ final Product product = newTransientInstance(Product.class);
+ product.setCode(code);
+ product.setDescription(description);
+ product.setPrice(new Double(priceInPence / 100));
+ persist(product);
+ return product;
+ }
+
+ /**
+ * Creates a new still transient product.
+ *
+ * <p>
+ * For use by tests only. Using this rather than {@link Customer} since
+ * {@link Product} has a {@link Product#validate()} method.
+ *
+ * @return
+ */
+ @Hidden
+ public Product newProduct() {
+ return newTransientInstance(Product.class);
+ }
+
+
+
+}
[09/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index 13b950f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_thenResponseHeaders_eTag_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
deleted file mode 100644
index d8bf6b9..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import javax.ws.rs.core.Response;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_then_200_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- private LinkRepresentation modifyLink;
- private JsonRepresentation argRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
-
- }
-
- @Test
- public void propertyDetails() throws Exception {
-
- // given
- final Response idPropertyResp = domainObjectResource.propertyDetails("JDKV","38", "stringProperty");
- final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
- assertThat(idPropertyJsonResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
-
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
- @Test
- public void primitivePropertiesUpdated() throws Exception {
-
- // given
- final int i = 999999;
- final Response domainObjectResp = domainObjectResource.propertyDetails("PRMV", "43", "intProperty");
- final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Response.Status.Family.SUCCESSFUL));
-
- ObjectPropertyRepresentation objectPropertyRepr = domainObjectJsonResp.getEntity();
-
- // when
- modifyLink = objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
- argRepr = modifyLink.getArguments().mapPut("value", i);
- RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
-
- // then
- assertThat(result.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
-
- // then also
- final JsonRepresentation jsonRepresentation = result.getEntity().as(ObjectPropertyRepresentation.class);
- assertThat(jsonRepresentation.getInt("value"), is(i));
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
deleted file mode 100644
index 9017c7e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
deleted file mode 100644
index e2464a3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java
deleted file mode 100644
index 8974372..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_whenArgIsMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java
deleted file mode 100644
index 753d8ae..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_whenArgMandatoryButMissing_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java
deleted file mode 100644
index 34a3e80..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-// for ISIS-797
-public class Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- private LinkRepresentation modifyLink;
- private JsonRepresentation argRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
- @Test
- public void jdkPropertiesUpdated() throws Exception {
-
- // String
- final String s = "foo+bar";
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "stringProperty");
- argRepr = modifyLink.getArguments().mapPut("value", s);
- assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(s));
-
- }
-
-
- private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
- final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
- final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
- return repr;
- }
-
- private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
- ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
- return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
- }
-
- private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
- RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
- assertThat(result.getStatus(), is(HttpStatusCode.OK));
- return result.getEntity().as(ObjectPropertyRepresentation.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java
deleted file mode 100644
index 84d06f4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.joda.time.DateTime;
-import org.joda.time.DateTimeZone;
-import org.joda.time.format.ISODateTimeFormat;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_whenArgValid_thenJdkPropertyUpdated_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- private LinkRepresentation modifyLink;
- private JsonRepresentation argRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
- @Test
- public void jdkPropertiesUpdated() throws Exception {
-
- // big decimal
- final BigDecimal bd = new BigDecimal("12345678901234567.789");
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "bigDecimalProperty");
- argRepr = modifyLink.getArguments().mapPut("value", bd);
- assertThat(followedRepr(modifyLink,argRepr).getBigDecimal("value"), is(new BigDecimal("12345678901234567.7890000000"))); // big-decimal(30,10)
-
- // big integer
- final BigInteger bi = new BigInteger("123456789012345678");
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "bigIntegerProperty");
- argRepr = modifyLink.getArguments().mapPut("value", bi);
- assertThat(followedRepr(modifyLink,argRepr).getBigInteger("value"), is(bi));
-
- // java.sql.Date
- final java.sql.Date sqld = new java.sql.Date(new DateTime(2014,5,1, 0,0, DateTimeZone.UTC).getMillis());
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaSqlDateProperty");
- argRepr = modifyLink.getArguments().mapPut("value", asIsoNoT(sqld));
- assertThat(followedRepr(modifyLink,argRepr).getDate("value"), is((java.util.Date)sqld));
-
- // java.sql.Time
- final java.sql.Time sqlt = new java.sql.Time(13,0,0);
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaSqlTimeProperty");
- argRepr = modifyLink.getArguments().mapPut("value", asIsoOnlyT(sqlt));
- assertThat(followedRepr(modifyLink,argRepr).getTime("value"), is((java.util.Date)sqlt));
-
- // java.sql.Timestamp
- final java.sql.Timestamp sqlts = new java.sql.Timestamp(114,4,1,13,0,0,0);
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaSqlTimestampProperty");
- argRepr = modifyLink.getArguments().mapPut("value", sqlts.getTime());
- assertThat(followedRepr(modifyLink,argRepr).getLong("value"), is(sqlts.getTime()));
-
- // java.util.Date
- final java.util.Date d = new java.util.Date(114,4,1,13,0,0);
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaUtilDateProperty");
- argRepr = modifyLink.getArguments().mapPut("value", asIso(d));
- assertThat(followedRepr(modifyLink,argRepr).getDateTime("value"), is(d));
-
- // enum
- final String e = "ORANGE";
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "myEnum");
- argRepr = modifyLink.getArguments().mapPut("value", e);
- assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(e));
-
- // String
- final String s = "Tangerine";
- modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "stringProperty");
- argRepr = modifyLink.getArguments().mapPut("value", s);
- assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(s));
-
- }
-
-
- private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
- final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
- final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
- return repr;
- }
-
- private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
- ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
- return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
- }
-
- private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
- RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
- assertThat(result.getStatus(), is(HttpStatusCode.OK));
- return result.getEntity().as(ObjectPropertyRepresentation.class);
- }
-
-
- private static String asIso(final java.util.Date d) {
- final DateTime dt = new DateTime(d.getTime());
- return asIso(dt);
- }
-
- private static String asIso(final DateTime dt) {
- return ISODateTimeFormat.basicDateTimeNoMillis().withZoneUTC().print(dt);
- }
-
- private static String asIsoNoT(final java.util.Date d) {
- final DateTime dt = new DateTime(d.getTime());
- return asIsoNoT(dt);
- }
-
- private static String asIsoNoT(final DateTime dt) {
- return ISODateTimeFormat.basicDate().withZoneUTC().print(dt);
- }
-
- private static String asIsoOnlyT(final java.util.Date d) {
- final DateTime dt = new DateTime(d.getTime());
- return asIsoOnlyT(dt);
- }
-
- private static String asIsoOnlyT(final DateTime dt) {
- return ISODateTimeFormat.basicTime().withZoneUTC().print(dt);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java
deleted file mode 100644
index 72c4173..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.joda.time.DateTime;
-import org.joda.time.LocalDate;
-import org.joda.time.LocalDateTime;
-import org.joda.time.format.ISODateTimeFormat;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- private LinkRepresentation modifyLink;
- private JsonRepresentation argRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Ignore("breaking in CET")
- @Test
- public void jodaPropertiesUpdated() throws Exception {
-
- // LocalDate
- final LocalDate ld = new LocalDate(2013,5,1);
- modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "localDateProperty");
- argRepr = modifyLink.getArguments().mapPut("value", "2013-05-01");
- assertThat(followedRepr(modifyLink,argRepr).getString("value"), is("2013-05-01")); // hacky
-
- // LocalDateTime
- final LocalDateTime ldt = new LocalDateTime(2013,2,1,14,15,0);
- modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "localDateTimeProperty");
- argRepr = modifyLink.getArguments().mapPut("value", asIso(ldt.toDate()));
- assertThat(followedRepr(modifyLink,argRepr).getDateTime("value"), is(ldt.toDate()));
-
- // DateTime
- final DateTime dt = new DateTime(2013,2,1,14,15,0);
- modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "dateTimeProperty");
- argRepr = modifyLink.getArguments().mapPut("value", asIso(dt.toDate()));
- assertThat(followedRepr(modifyLink,argRepr).getDateTime("value"), is(dt.toDate()));
-
- // String
- final String s = "New string";
- modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "stringProperty");
- argRepr = modifyLink.getArguments().mapPut("value", s);
- assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(s));
- }
-
- private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
- final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
- final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
- return repr;
- }
-
- private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
- ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
- return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
- }
-
- private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
- RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
- assertThat(result.getStatus(), is(HttpStatusCode.OK));
- return result.getEntity().as(ObjectPropertyRepresentation.class);
- }
-
-
- private static String asIso(final java.util.Date d) {
- final DateTime dt = new DateTime(d.getTime());
- return asIso(dt);
- }
-
- private static String asIso(final DateTime dt) {
- return ISODateTimeFormat.basicDateTimeNoMillis().withZoneUTC().print(dt);
- }
-
-
- private static String asIsoNoT(final java.util.Date d) {
- final DateTime dt = new DateTime(d.getTime());
- return asIsoNoT(dt);
- }
-
- private static String asIsoNoT(final DateTime dt) {
- return ISODateTimeFormat.basicDate().withZoneUTC().print(dt);
- }
-
- private static String asIsoOnlyT(final java.util.Date d) {
- final DateTime dt = new DateTime(d.getTime());
- return asIsoOnlyT(dt);
- }
-
- private static String asIsoOnlyT(final DateTime dt) {
- return ISODateTimeFormat.basicTime().withZoneUTC().print(dt);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
deleted file mode 100644
index 8d81f31..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import java.io.IOException;
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_whenArgValid_thenPrimitivePropertyUpdated_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- private DomainObjectResource domainObjectResource;
-
- private LinkRepresentation modifyLink;
- private JsonRepresentation argRepr;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
- @Test
- public void primitivePropertiesUpdated() throws Exception {
-
- // byte
- final byte b = (byte)99;
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "byteProperty");
- argRepr = modifyLink.getArguments().mapPut("value", b);
- assertThat(followedRepr(modifyLink,argRepr).getByte("value"), is(b));
-
- // char
- final char c = 'b';
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "charProperty");
- argRepr = modifyLink.getArguments().mapPut("value", c);
- assertThat(followedRepr(modifyLink,argRepr).getChar("value"), is(c));
-
- // double
- final double d = 12345.678;
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "doubleProperty");
- argRepr = modifyLink.getArguments().mapPut("value", d);
- assertThat(followedRepr(modifyLink,argRepr).getDouble("value"), is(d));
-
- // float
- final float f = 54321.123F;
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "floatProperty");
- argRepr = modifyLink.getArguments().mapPut("value", f);
- assertThat(followedRepr(modifyLink,argRepr).getFloat("value"), is(f));
-
- // int
- final int i = 999999;
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "intProperty");
- argRepr = modifyLink.getArguments().mapPut("value", i);
- assertThat(followedRepr(modifyLink,argRepr).getInt("value"), is(i));
-
- // long
- final long l = 99999999999L;
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "longProperty");
- argRepr = modifyLink.getArguments().mapPut("value", l);
- assertThat(followedRepr(modifyLink,argRepr).getLong("value"), is(l));
-
- // short
- final short s = (short)999;
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "shortProperty");
- argRepr = modifyLink.getArguments().mapPut("value", s);
- assertThat(followedRepr(modifyLink,argRepr).getShort("value"), is(s));
-
- // boolean
- final boolean z = false;
- modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "booleanProperty");
- argRepr = modifyLink.getArguments().mapPut("value", z);
- assertThat(followedRepr(modifyLink,argRepr).getBoolean("value"), is(z));
-
- }
-
-
- private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
- final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
- final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
- assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
- return repr;
- }
-
- private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
- ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
- return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
- }
-
- private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
- RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
- assertThat(result.getStatus(), is(HttpStatusCode.OK));
- return result.getEntity().as(ObjectPropertyRepresentation.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java
deleted file mode 100644
index b7e4f66..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_whenDoesntExistOid_thenResponseCode_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java
deleted file mode 100644
index ddbb64f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Put_whenDoesntExistProp_thenResponseCode_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java
deleted file mode 100644
index 44f460f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_givenObjectResource_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
- final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting action prompt resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java
deleted file mode 100644
index 0131d9b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_givenServiceResource_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource serviceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- serviceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response actionPromptResp = serviceResource.actionPrompt("ActionsEntities", "subListWithOptionalRange");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
- final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting action prompt resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java
deleted file mode 100644
index e2cb570..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-public class Get_givenDisabled_then_403_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
deleted file mode 100644
index 656a330..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
deleted file mode 100644
index 48e0d36..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java
deleted file mode 100644
index 6d153d0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenHidden_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void returns404() throws Exception {
-
- // given
- RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/actions/invisibleAction");
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 22dd6be..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_givenViewModel_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java
deleted file mode 100644
index b08c954..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java
+++ /dev/null
@@ -1,107 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // when
- final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- assertThat(actionPromptJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- // then
- final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
-
- assertThat(actionPromptRepr.getString("memberType"), is("action"));
-
- // self link
- final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
- assertThat(selfLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/objects/RTNE/78/actions/contains"))
- .returning(HttpStatusCode.OK));
-
- // up link
- final LinkRepresentation upLink = actionPromptRepr.getLinkWithRel(Rel.UP);
- assertThat(upLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/objects/RTNE/78"))
- .returning(HttpStatusCode.OK)
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
- .title("Untitled Actions Entity"));
-
- //invoke link
- final LinkRepresentation invokeLink = actionPromptRepr.getLinkWithRel(Rel.INVOKE);
- assertThat(invokeLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/objects/RTNE/78/actions/contains/invoke")));
-
- assertThat(invokeLink.getArguments(), is(not(nullValue())));
- assertThat(invokeLink.getArguments().isArray(), is(false));
- assertThat(invokeLink.getArguments().size(), is(2));
-
- // described by link
- final LinkRepresentation describedByLink = actionPromptRepr.getLinkWithRel(Rel.DESCRIBEDBY);
- assertThat(describedByLink, isLink(client)
- .returning(HttpStatusCode.OK)
- .responseEntityWithSelfHref(describedByLink.getHref()));
-
- assertThat(actionPromptRepr.getExtensions().getString("actionType"), is("user"));
- assertThat(actionPromptRepr.getExtensions().getString("actionSemantics"), is("safe"));
- assertThat(actionPromptRepr.getMap("parameters").size(), is(2));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java
deleted file mode 100644
index cf51675..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenResponseCode_200_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Test
- public void actionPrompt() throws Exception {
-
- // when
- final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
- assertThat(actionPromptJsonResp.getStatus(), is(HttpStatusCode.OK));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index 5735936..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
deleted file mode 100644
index 1f9a112..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentLength_ok.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenResponseHeaders_ContentLength_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
- @Test
- public void ok() throws Exception {
- // given
- final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
-
- // when
- final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
-
- // then
- assertThat(actionPromptJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index dc9bbc5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
[32/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java
new file mode 100644
index 0000000..b1caf6a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentLength_ok_TODO.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_ContentLength_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java
new file mode 100644
index 0000000..33870ce
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_ContentType_ok_TODO.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Put_thenResponseHeaders_ContentType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java
new file mode 100644
index 0000000..13b950f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_thenResponseHeaders_eTag_ok_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Put_thenResponseHeaders_eTag_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
new file mode 100644
index 0000000..d8bf6b9
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_then_200_ok.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import javax.ws.rs.core.Response;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_then_200_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ private LinkRepresentation modifyLink;
+ private JsonRepresentation argRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+
+ }
+
+ @Test
+ public void propertyDetails() throws Exception {
+
+ // given
+ final Response idPropertyResp = domainObjectResource.propertyDetails("JDKV","38", "stringProperty");
+ final RestfulResponse<ObjectPropertyRepresentation> idPropertyJsonResp = RestfulResponse.ofT(idPropertyResp);
+ assertThat(idPropertyJsonResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+ @Test
+ public void primitivePropertiesUpdated() throws Exception {
+
+ // given
+ final int i = 999999;
+ final Response domainObjectResp = domainObjectResource.propertyDetails("PRMV", "43", "intProperty");
+ final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Response.Status.Family.SUCCESSFUL));
+
+ ObjectPropertyRepresentation objectPropertyRepr = domainObjectJsonResp.getEntity();
+
+ // when
+ modifyLink = objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
+ argRepr = modifyLink.getArguments().mapPut("value", i);
+ RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
+
+ // then
+ assertThat(result.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
+
+ // then also
+ final JsonRepresentation jsonRepresentation = result.getEntity().as(ObjectPropertyRepresentation.class);
+ assertThat(jsonRepresentation.getInt("value"), is(i));
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
new file mode 100644
index 0000000..9017c7e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
new file mode 100644
index 0000000..e2464a3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java
new file mode 100644
index 0000000..8974372
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgIsMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_whenArgIsMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java
new file mode 100644
index 0000000..753d8ae
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgMandatoryButMissing_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_whenArgMandatoryButMissing_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java
new file mode 100644
index 0000000..34a3e80
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+// for ISIS-797
+public class Put_whenArgValidContainsPlus_thenStringPropertyUpdated_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ private LinkRepresentation modifyLink;
+ private JsonRepresentation argRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+ @Test
+ public void jdkPropertiesUpdated() throws Exception {
+
+ // String
+ final String s = "foo+bar";
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "stringProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", s);
+ assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(s));
+
+ }
+
+
+ private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
+ final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
+ final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
+ return repr;
+ }
+
+ private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
+ ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
+ return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
+ }
+
+ private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
+ RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
+ assertThat(result.getStatus(), is(HttpStatusCode.OK));
+ return result.getEntity().as(ObjectPropertyRepresentation.class);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java
new file mode 100644
index 0000000..84d06f4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJdkPropertyUpdated_ok.java
@@ -0,0 +1,177 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import java.io.IOException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
+import org.joda.time.format.ISODateTimeFormat;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_whenArgValid_thenJdkPropertyUpdated_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ private LinkRepresentation modifyLink;
+ private JsonRepresentation argRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+
+ @Test
+ public void jdkPropertiesUpdated() throws Exception {
+
+ // big decimal
+ final BigDecimal bd = new BigDecimal("12345678901234567.789");
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "bigDecimalProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", bd);
+ assertThat(followedRepr(modifyLink,argRepr).getBigDecimal("value"), is(new BigDecimal("12345678901234567.7890000000"))); // big-decimal(30,10)
+
+ // big integer
+ final BigInteger bi = new BigInteger("123456789012345678");
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "bigIntegerProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", bi);
+ assertThat(followedRepr(modifyLink,argRepr).getBigInteger("value"), is(bi));
+
+ // java.sql.Date
+ final java.sql.Date sqld = new java.sql.Date(new DateTime(2014,5,1, 0,0, DateTimeZone.UTC).getMillis());
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaSqlDateProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", asIsoNoT(sqld));
+ assertThat(followedRepr(modifyLink,argRepr).getDate("value"), is((java.util.Date)sqld));
+
+ // java.sql.Time
+ final java.sql.Time sqlt = new java.sql.Time(13,0,0);
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaSqlTimeProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", asIsoOnlyT(sqlt));
+ assertThat(followedRepr(modifyLink,argRepr).getTime("value"), is((java.util.Date)sqlt));
+
+ // java.sql.Timestamp
+ final java.sql.Timestamp sqlts = new java.sql.Timestamp(114,4,1,13,0,0,0);
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaSqlTimestampProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", sqlts.getTime());
+ assertThat(followedRepr(modifyLink,argRepr).getLong("value"), is(sqlts.getTime()));
+
+ // java.util.Date
+ final java.util.Date d = new java.util.Date(114,4,1,13,0,0);
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "javaUtilDateProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", asIso(d));
+ assertThat(followedRepr(modifyLink,argRepr).getDateTime("value"), is(d));
+
+ // enum
+ final String e = "ORANGE";
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "myEnum");
+ argRepr = modifyLink.getArguments().mapPut("value", e);
+ assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(e));
+
+ // String
+ final String s = "Tangerine";
+ modifyLink = getObjectPropertyReprModifyLink("JDKV", "38", "stringProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", s);
+ assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(s));
+
+ }
+
+
+ private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
+ final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
+ final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
+ return repr;
+ }
+
+ private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
+ ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
+ return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
+ }
+
+ private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
+ RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
+ assertThat(result.getStatus(), is(HttpStatusCode.OK));
+ return result.getEntity().as(ObjectPropertyRepresentation.class);
+ }
+
+
+ private static String asIso(final java.util.Date d) {
+ final DateTime dt = new DateTime(d.getTime());
+ return asIso(dt);
+ }
+
+ private static String asIso(final DateTime dt) {
+ return ISODateTimeFormat.basicDateTimeNoMillis().withZoneUTC().print(dt);
+ }
+
+ private static String asIsoNoT(final java.util.Date d) {
+ final DateTime dt = new DateTime(d.getTime());
+ return asIsoNoT(dt);
+ }
+
+ private static String asIsoNoT(final DateTime dt) {
+ return ISODateTimeFormat.basicDate().withZoneUTC().print(dt);
+ }
+
+ private static String asIsoOnlyT(final java.util.Date d) {
+ final DateTime dt = new DateTime(d.getTime());
+ return asIsoOnlyT(dt);
+ }
+
+ private static String asIsoOnlyT(final DateTime dt) {
+ return ISODateTimeFormat.basicTime().withZoneUTC().print(dt);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java
new file mode 100644
index 0000000..72c4173
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO.java
@@ -0,0 +1,152 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.joda.time.DateTime;
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.joda.time.format.ISODateTimeFormat;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_whenArgValid_thenJodaTimePropertyUpdated_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ private LinkRepresentation modifyLink;
+ private JsonRepresentation argRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Ignore("breaking in CET")
+ @Test
+ public void jodaPropertiesUpdated() throws Exception {
+
+ // LocalDate
+ final LocalDate ld = new LocalDate(2013,5,1);
+ modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "localDateProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", "2013-05-01");
+ assertThat(followedRepr(modifyLink,argRepr).getString("value"), is("2013-05-01")); // hacky
+
+ // LocalDateTime
+ final LocalDateTime ldt = new LocalDateTime(2013,2,1,14,15,0);
+ modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "localDateTimeProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", asIso(ldt.toDate()));
+ assertThat(followedRepr(modifyLink,argRepr).getDateTime("value"), is(ldt.toDate()));
+
+ // DateTime
+ final DateTime dt = new DateTime(2013,2,1,14,15,0);
+ modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "dateTimeProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", asIso(dt.toDate()));
+ assertThat(followedRepr(modifyLink,argRepr).getDateTime("value"), is(dt.toDate()));
+
+ // String
+ final String s = "New string";
+ modifyLink = getObjectPropertyReprModifyLink("JODA", "82", "stringProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", s);
+ assertThat(followedRepr(modifyLink,argRepr).getString("value"), is(s));
+ }
+
+ private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
+ final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
+ final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
+ return repr;
+ }
+
+ private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
+ ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
+ return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
+ }
+
+ private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
+ RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
+ assertThat(result.getStatus(), is(HttpStatusCode.OK));
+ return result.getEntity().as(ObjectPropertyRepresentation.class);
+ }
+
+
+ private static String asIso(final java.util.Date d) {
+ final DateTime dt = new DateTime(d.getTime());
+ return asIso(dt);
+ }
+
+ private static String asIso(final DateTime dt) {
+ return ISODateTimeFormat.basicDateTimeNoMillis().withZoneUTC().print(dt);
+ }
+
+
+ private static String asIsoNoT(final java.util.Date d) {
+ final DateTime dt = new DateTime(d.getTime());
+ return asIsoNoT(dt);
+ }
+
+ private static String asIsoNoT(final DateTime dt) {
+ return ISODateTimeFormat.basicDate().withZoneUTC().print(dt);
+ }
+
+ private static String asIsoOnlyT(final java.util.Date d) {
+ final DateTime dt = new DateTime(d.getTime());
+ return asIsoOnlyT(dt);
+ }
+
+ private static String asIsoOnlyT(final DateTime dt) {
+ return ISODateTimeFormat.basicTime().withZoneUTC().print(dt);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
new file mode 100644
index 0000000..8d81f31
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenArgValid_thenPrimitivePropertyUpdated_ok.java
@@ -0,0 +1,143 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_whenArgValid_thenPrimitivePropertyUpdated_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ private DomainObjectResource domainObjectResource;
+
+ private LinkRepresentation modifyLink;
+ private JsonRepresentation argRepr;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ /**
+ * Tests change state, so discard such that will be recreated by next test.
+ */
+ @After
+ public void tearDown() throws Exception {
+ webServerRule.discardWebApp();
+ }
+
+ @Test
+ public void primitivePropertiesUpdated() throws Exception {
+
+ // byte
+ final byte b = (byte)99;
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "byteProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", b);
+ assertThat(followedRepr(modifyLink,argRepr).getByte("value"), is(b));
+
+ // char
+ final char c = 'b';
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "charProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", c);
+ assertThat(followedRepr(modifyLink,argRepr).getChar("value"), is(c));
+
+ // double
+ final double d = 12345.678;
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "doubleProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", d);
+ assertThat(followedRepr(modifyLink,argRepr).getDouble("value"), is(d));
+
+ // float
+ final float f = 54321.123F;
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "floatProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", f);
+ assertThat(followedRepr(modifyLink,argRepr).getFloat("value"), is(f));
+
+ // int
+ final int i = 999999;
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "intProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", i);
+ assertThat(followedRepr(modifyLink,argRepr).getInt("value"), is(i));
+
+ // long
+ final long l = 99999999999L;
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "longProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", l);
+ assertThat(followedRepr(modifyLink,argRepr).getLong("value"), is(l));
+
+ // short
+ final short s = (short)999;
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "shortProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", s);
+ assertThat(followedRepr(modifyLink,argRepr).getShort("value"), is(s));
+
+ // boolean
+ final boolean z = false;
+ modifyLink = getObjectPropertyReprModifyLink("PRMV", "43", "booleanProperty");
+ argRepr = modifyLink.getArguments().mapPut("value", z);
+ assertThat(followedRepr(modifyLink,argRepr).getBoolean("value"), is(z));
+
+ }
+
+
+ private ObjectPropertyRepresentation getObjectPropertyRepr(final String domainType, final String instanceId, String propertyId) throws IOException {
+ final Response domainObjectResp = domainObjectResource.propertyDetails(domainType, instanceId, propertyId);
+ final RestfulResponse<ObjectPropertyRepresentation> domainObjectJsonResp = RestfulResponse.ofT(domainObjectResp);
+ assertThat(domainObjectJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ final ObjectPropertyRepresentation repr = domainObjectJsonResp.getEntity();
+ return repr;
+ }
+
+ private LinkRepresentation getObjectPropertyReprModifyLink(String domainType, String instanceId, String propertyId) throws IOException {
+ ObjectPropertyRepresentation objectPropertyRepr = getObjectPropertyRepr(domainType, instanceId, propertyId);
+ return objectPropertyRepr.getLinkWithRel(Rel.MODIFY);
+ }
+
+ private JsonRepresentation followedRepr(LinkRepresentation modifyLink, JsonRepresentation argRepr) throws Exception {
+ RestfulResponse<JsonRepresentation> result = client.follow(modifyLink, argRepr);
+ assertThat(result.getStatus(), is(HttpStatusCode.OK));
+ return result.getEntity().as(ObjectPropertyRepresentation.class);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java
new file mode 100644
index 0000000..b7e4f66
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistOid_thenResponseCode_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_whenDoesntExistOid_thenResponseCode_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java
new file mode 100644
index 0000000..ddbb64f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Put_whenDoesntExistProp_thenResponseCode_404_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
+
+public class Put_whenDoesntExistProp_thenResponseCode_404_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java
new file mode 100644
index 0000000..44f460f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenObjectResource_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_givenObjectResource_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
+ final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting action prompt resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java
new file mode 100644
index 0000000..0131d9b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Delete_givenServiceResource_then_405_bad.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_givenServiceResource_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response actionPromptResp = serviceResource.actionPrompt("ActionsEntities", "subListWithOptionalRange");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
+ final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting action prompt resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java
new file mode 100644
index 0000000..e2cb570
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDisabled_then_403_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+public class Get_givenDisabled_then_403_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
new file mode 100644
index 0000000..656a330
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
new file mode 100644
index 0000000..48e0d36
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java
new file mode 100644
index 0000000..6d153d0
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenHidden_then_404.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenHidden_then_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ }
+
+ @Test
+ public void returns404() throws Exception {
+
+ // given
+ RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/actions/invisibleAction");
+
+ // when
+ final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..22dd6be
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_givenViewModel_thenRepresentation_ok_TODO.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenViewModel_thenRepresentation_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java
new file mode 100644
index 0000000..b08c954
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenRepresentation_ok.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.Response.Status.Family;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // when
+ final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ assertThat(actionPromptJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
+
+ // then
+ final ObjectActionRepresentation actionPromptRepr = actionPromptJsonResp.getEntity();
+
+ assertThat(actionPromptRepr.getString("memberType"), is("action"));
+
+ // self link
+ final LinkRepresentation selfLink = actionPromptRepr.getLinkWithRel(Rel.SELF);
+ assertThat(selfLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/objects/RTNE/78/actions/contains"))
+ .returning(HttpStatusCode.OK));
+
+ // up link
+ final LinkRepresentation upLink = actionPromptRepr.getLinkWithRel(Rel.UP);
+ assertThat(upLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/objects/RTNE/78"))
+ .returning(HttpStatusCode.OK)
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
+ .title("Untitled Actions Entity"));
+
+ //invoke link
+ final LinkRepresentation invokeLink = actionPromptRepr.getLinkWithRel(Rel.INVOKE);
+ assertThat(invokeLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/objects/RTNE/78/actions/contains/invoke")));
+
+ assertThat(invokeLink.getArguments(), is(not(nullValue())));
+ assertThat(invokeLink.getArguments().isArray(), is(false));
+ assertThat(invokeLink.getArguments().size(), is(2));
+
+ // described by link
+ final LinkRepresentation describedByLink = actionPromptRepr.getLinkWithRel(Rel.DESCRIBEDBY);
+ assertThat(describedByLink, isLink(client)
+ .returning(HttpStatusCode.OK)
+ .responseEntityWithSelfHref(describedByLink.getHref()));
+
+ assertThat(actionPromptRepr.getExtensions().getString("actionType"), is("user"));
+ assertThat(actionPromptRepr.getExtensions().getString("actionSemantics"), is("safe"));
+ assertThat(actionPromptRepr.getMap("parameters").size(), is(2));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java
new file mode 100644
index 0000000..cf51675
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseCode_200_ok.java
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenResponseCode_200_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainObjectResource domainObjectResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainObjectResource = client.getDomainObjectResource();
+ }
+
+ @Test
+ public void actionPrompt() throws Exception {
+
+ // when
+ final Response actionPromptResp = domainObjectResource.actionPrompt("RTNE", "78", "contains");
+ final RestfulResponse<ObjectActionRepresentation> actionPromptJsonResp = RestfulResponse.ofT(actionPromptResp);
+ assertThat(actionPromptJsonResp.getStatus(), is(HttpStatusCode.OK));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java
new file mode 100644
index 0000000..5735936
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/Get_thenResponseHeaders_CacheControl_ok_TODO.java
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_CacheControl_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+
+}
[47/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
new file mode 100644
index 0000000..d6b6a24
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Programmatic;
+import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.query.Query;
+import org.apache.isis.applib.query.QueryDefault;
+
+public abstract class AbstractEntityRepository<T> extends AbstractFactoryAndRepository {
+
+ private final Class<T> entityClass;
+ private final String serviceId;
+
+ public AbstractEntityRepository(Class<T> entityClass, String serviceId) {
+ this.entityClass = entityClass;
+ this.serviceId = serviceId;
+ }
+
+ @Override
+ public final String getId() {
+ return serviceId;
+ }
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public List<T> list() {
+ return allInstances(entityClass);
+ }
+
+ @MemberOrder(sequence = "2")
+ public T newEntity() {
+ final T entity = newTransientInstance(entityClass);
+ persist(entity);
+ return entity;
+ }
+
+ @Programmatic
+ public T findByNamedQueryFirstOnly(String queryName, Map<String, Object> argumentByParameterName) {
+ final Query<T> query = new QueryDefault<T>(entityClass, queryName, argumentByParameterName);
+ return this.firstMatch(query);
+ }
+
+ @Programmatic
+ public List<T> findByNamedQueryAll(String queryName, Map<String, Object> argumentByParameterName) {
+ final Query<T> query = new QueryDefault<T>(entityClass, queryName, argumentByParameterName);
+ return this.allMatches(query);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
new file mode 100644
index 0000000..2f4ed64
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.actions;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("RTNE")
+@ObjectType("RTNE")
+public class ActionsEntity extends AbstractDomainObject {
+
+ // {{ Id (Integer)
+ private Integer id;
+
+ @javax.jdo.annotations.PrimaryKey // must be on the getter.
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(final Integer id) {
+ this.id = id;
+ }
+ // }}
+
+ // {{ Title
+ public String title() {
+ return null;
+ }
+ // }}
+
+
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public ActionsEntity visibleAndInvokableAction() {
+ return this;
+ }
+
+ @Disabled
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public ActionsEntity visibleButUninvokableAction() {
+ return this;
+ }
+
+ @Hidden
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public ActionsEntity invisibleAction() {
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
new file mode 100644
index 0000000..f53bca0
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
@@ -0,0 +1,126 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.actions;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.spec.Specification;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("ActionsEntities")
+@ObjectType("ActionsEntities")
+@DomainService
+public class ActionsEntityRepository extends AbstractEntityRepository<ActionsEntity> {
+
+ public ActionsEntityRepository() {
+ super(ActionsEntity.class, "ActionsEntities");
+ }
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public ActionsEntity findById(@Named("id") int id) {
+ return findByIdIfAny(id);
+ }
+
+ @ActionSemantics(Of.IDEMPOTENT)
+ @MemberOrder(sequence = "1")
+ public ActionsEntity findByIdIdempotent(@Named("id") int id) {
+ return findByIdIfAny(id);
+ }
+
+ @ActionSemantics(Of.NON_IDEMPOTENT)
+ @MemberOrder(sequence = "1")
+ public ActionsEntity findByIdNotIdempotent(@Named("id") int id) {
+ return findByIdIfAny(id);
+ }
+
+ private ActionsEntity findByIdIfAny(int id) {
+ List<ActionsEntity> subList = subList(id, id+1);
+ return subList.isEmpty()?null:subList.get(0);
+ }
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public List<ActionsEntity> subList(
+ @MustSatisfy(IntegerCannotBeNegative.class)
+ @Named("from") int from,
+ @MustSatisfy(IntegerCannotBeNegative.class)
+ @Named("to") int to) {
+ List<ActionsEntity> list = list();
+ int toChecked = Math.min(to, list.size());
+ int fromChecked = Math.min(from, toChecked);
+ return list.subList(fromChecked, toChecked);
+ }
+ public String validateSubList(final int from, final int to) {
+ if(from > to) {
+ return "'from' cannot be larger than 'to'";
+ }
+ return null;
+ }
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public boolean contains(@Named("searchFor") ActionsEntity entity, @Named("from") int from, @Named("to") int to) {
+ List<ActionsEntity> list = subList(from, to);
+ return list.contains(entity);
+ }
+
+ public static class IntegerCannotBeNegative implements Specification {
+ @Override
+ public String satisfies(Object obj) {
+ if(!(obj instanceof Integer)) {
+ return null;
+ }
+ Integer integer = (Integer) obj;
+ return integer.intValue() < 0? "Cannot be less than zero": null;
+ }
+ }
+
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public List<ActionsEntity> subListWithOptionalRange(
+ @Optional
+ @MustSatisfy(IntegerCannotBeNegative.class)
+ @Named("from") Integer from,
+ @Optional
+ @MustSatisfy(IntegerCannotBeNegative.class)
+ @Named("to") Integer to) {
+ return subList(valueElseDefault(from, 0), valueElseDefault(to, Integer.MAX_VALUE));
+ }
+
+ public String validateSubListWithOptionalRange(final Integer from, final Integer to) {
+ return validateSubList(valueElseDefault(from, 0), valueElseDefault(to, Integer.MAX_VALUE));
+ }
+
+ private static int valueElseDefault(Integer value, int i) {
+ return value != null? value: i;
+ }
+
+ @ActionSemantics(Of.IDEMPOTENT)
+ @MemberOrder(sequence = "90")
+ public String concatenate(@Named("str1") String str1, @Named("str2") String str2) {
+ return str1 + str2;
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
new file mode 100644
index 0000000..3894d1a
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.busrules;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.ActionSemantics;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.Hidden;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("BSRL")
+@javax.jdo.annotations.Query(
+ name="prmv_findByIntProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.busrules.BusRulesEntity WHERE intProperty == :i")
+@ObjectType("BSRL")
+public class BusRulesEntity extends AbstractDomainObject {
+
+ // {{ Id (Integer)
+ private Integer id;
+
+ @javax.jdo.annotations.PrimaryKey // must be on the getter.
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(final Integer id) {
+ this.id = id;
+ }
+ // }}
+
+ // {{ Title
+ public String title() {
+ return null;
+ }
+ // }}
+
+
+ // {{ visibleAndEditableProperty
+ private int visibleAndEditableProperty;
+
+ @MemberOrder(sequence = "1")
+ public int getVisibleAndEditableProperty() {
+ return visibleAndEditableProperty;
+ }
+
+ public void setVisibleAndEditableProperty(final int intProperty) {
+ this.visibleAndEditableProperty = intProperty;
+ }
+ // }}
+
+
+ // {{ visibleButNotEditableProperty
+ private int visibleButNotEditableProperty;
+
+ @Disabled
+ @MemberOrder(sequence = "2")
+ public int getVisibleButNotEditableProperty() {
+ return visibleButNotEditableProperty;
+ }
+
+ public void setVisibleButNotEditableProperty(final int intProperty) {
+ this.visibleButNotEditableProperty = intProperty;
+ }
+ // }}
+
+ // {{ invisibleProperty
+ private int invisibleProperty;
+
+ @Hidden
+ @MemberOrder(sequence = "3")
+ public int getInvisibleProperty() {
+ return invisibleProperty;
+ }
+
+ public void setInvisibleProperty(final int intProperty) {
+ this.invisibleProperty = intProperty;
+ }
+ // }}
+
+
+ // {{ VisibleAndEditableCollection (Collection)
+ private List<BusRulesEntityChild> editableCollection = new ArrayList<BusRulesEntityChild>();
+
+ @MemberOrder(sequence = "11")
+ public List<BusRulesEntityChild> getVisibleAndEditableCollection() {
+ return editableCollection;
+ }
+
+ public void setVisibleAndEditableCollection(final List<BusRulesEntityChild> children) {
+ this.editableCollection = children;
+ }
+ // }}
+
+
+ // {{ VisibleButNotEditableCollection (Collection)
+ private List<BusRulesEntityChild> notEditableCollection = new ArrayList<BusRulesEntityChild>();
+
+ @MemberOrder(sequence = "11")
+ public List<BusRulesEntityChild> getVisibleButNotEditableCollection() {
+ return notEditableCollection;
+ }
+
+ public void setVisibleButNotEditableCollection(final List<BusRulesEntityChild> children) {
+ this.notEditableCollection = children;
+ }
+ // }}
+
+ // {{ InvisibleCollection (Collection)
+ private List<BusRulesEntityChild> invisibleCollection = new ArrayList<BusRulesEntityChild>();
+
+ @Hidden
+ @MemberOrder(sequence = "11")
+ public List<BusRulesEntityChild> getInvisibleCollection() {
+ return invisibleCollection;
+ }
+
+ public void setInvisibleCollection(final List<BusRulesEntityChild> children) {
+ this.invisibleCollection = children;
+ }
+ // }}
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public BusRulesEntity visibleAndInvokableAction() {
+ return this;
+ }
+
+ @Disabled
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public BusRulesEntity visibleButUninvokableAction() {
+ return this;
+ }
+
+ @Hidden
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public BusRulesEntity invisibleAction() {
+ return this;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
new file mode 100644
index 0000000..5011c23
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.busrules;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("BSRC")
+@javax.jdo.annotations.Query(
+ name="prmv_findByIntProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.busrules.BusRulesEntityChild WHERE intProperty == :i")
+@ObjectType("BSRC")
+public class BusRulesEntityChild extends AbstractDomainObject {
+
+
+ // {{ Id (Integer)
+ private Integer id;
+
+ @javax.jdo.annotations.PrimaryKey // must be on the getter.
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(final Integer id) {
+ this.id = id;
+ }
+ // }}
+
+ // {{ Title
+ public String title() {
+ return null;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
new file mode 100644
index 0000000..e13664c
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.busrules;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.applib.annotation.ActionSemantics.Of;
+import org.apache.isis.applib.query.Query;
+import org.apache.isis.applib.query.QueryDefault;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("BusinessRulesEntities")
+@ObjectType("BusinessRulesEntities")
+@DomainService
+public class BusRulesEntityRepository extends AbstractEntityRepository<BusRulesEntity> {
+
+ public BusRulesEntityRepository() {
+ super(BusRulesEntity.class, "BusinessRulesEntities");
+ }
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public BusRulesEntity findById(int id) {
+ final Query<BusRulesEntity> query =
+ new QueryDefault<BusRulesEntity>(BusRulesEntity.class, BusRulesEntity.class.getName() + "#pk", "id", id);
+ return this.firstMatch(query);
+ }
+
+
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public BusRulesEntity visibleAndInvocableAction(@Named("id") int id) {
+ return this.findById(id);
+ }
+
+ @Disabled
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public BusRulesEntity visibleButNotInvocableAction(@Named("id") int id) {
+ return this.findById(id);
+ }
+
+ @Hidden
+ @ActionSemantics(Of.SAFE)
+ @MemberOrder(sequence = "1")
+ public BusRulesEntity invisibleAction(int id) {
+ return this.findById(id);
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
new file mode 100644
index 0000000..ac84e44
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.claims;
+
+public interface Approver {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
new file mode 100644
index 0000000..09af5eb
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
@@ -0,0 +1,239 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.claims;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.value.Color;
+import org.apache.isis.applib.value.Date;
+
+public class Claim extends AbstractDomainObject {
+
+ // {{ Title
+ public String title() {
+ return getStatus() + " - " + getDate();
+ }
+
+ // }}
+
+ // {{ Lifecycle
+ public void created() {
+ status = "New";
+ date = new Date();
+ }
+
+ // }}
+
+ // {{ Description
+ private String description;
+
+ @MemberOrder(sequence = "1")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ public String defaultDescription() {
+ return "enter a description here";
+ }
+
+ // }}
+
+ // {{ Date
+ private Date date;
+
+ @MemberOrder(sequence = "2")
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(final Date date) {
+ this.date = date;
+ }
+
+ // }}
+
+ // {{ Status
+ private String status;
+
+ @Disabled
+ @MemberOrder(sequence = "3")
+ public String getStatus() {
+ return status;
+ }
+
+ public void setStatus(final String status) {
+ this.status = status;
+ }
+
+ // }}
+
+ // {{ Claimant
+ private Claimant claimant;
+
+ @Disabled
+ @MemberOrder(sequence = "4")
+ public Claimant getClaimant() {
+ return claimant;
+ }
+
+ public void setClaimant(final Claimant claimant) {
+ this.claimant = claimant;
+ }
+
+ // }}
+
+ // {{ BigDecimal
+ private BigDecimal bigDecimal;
+
+ @MemberOrder(sequence = "9")
+ public BigDecimal getBigDecimal() {
+ return bigDecimal;
+ }
+
+ public void setBigDecimal(final BigDecimal bigDecimal) {
+ this.bigDecimal = bigDecimal;
+ }
+
+ public void modifyBigDecimal(final BigDecimal bigDecimal) {
+ // check for no-op
+ if (bigDecimal == null || bigDecimal.equals(getBigDecimal())) {
+ return;
+ }
+ // associate new
+ setBigDecimal(bigDecimal);
+ // additional business logic
+ onModifyBigDecimal(bigDecimal);
+ }
+
+ public void clearBigDecimal() {
+ // check for no-op
+ if (getBigDecimal() == null) {
+ return;
+ }
+ // dissociate existing
+ setBigDecimal(null);
+ // additional business logic
+ onClearBigDecimal();
+ }
+
+ protected void onModifyBigDecimal(final BigDecimal bigDecimal) {
+ }
+
+ protected void onClearBigDecimal() {
+ }
+
+ // }}
+
+ // {{ Color
+ private Color color;
+
+ @MemberOrder(sequence = "8")
+ public Color getColor() {
+ return color;
+ }
+
+ public void setColor(final Color color) {
+ this.color = color;
+ }
+
+ public void modifyColor(final Color color) {
+ // check for no-op
+ if (color == null || color.equals(getColor())) {
+ return;
+ }
+ // associate new
+ setColor(color);
+ // additional business logic
+ onModifyColor(color);
+ }
+
+ public void clearColor() {
+ // check for no-op
+ if (getColor() == null) {
+ return;
+ }
+ // dissociate existing
+ setColor(null);
+ // additional business logic
+ onClearColor();
+ }
+
+ protected void onModifyColor(final Color color) {
+ }
+
+ protected void onClearColor() {
+ }
+
+ // }}
+
+ // {{ Approver
+ private Approver approver;
+
+ @Disabled
+ @MemberOrder(sequence = "5")
+ public Approver getApprover() {
+ return approver;
+ }
+
+ public void setApprover(final Approver approver) {
+ this.approver = approver;
+ }
+
+ // }}
+
+ // {{ Items
+ private final List<ClaimItem> items = new ArrayList<ClaimItem>();
+
+ @MemberOrder(sequence = "6")
+ public List<ClaimItem> getItems() {
+ return items;
+ }
+
+ public void addToItems(final ClaimItem item) {
+ items.add(item);
+ }
+
+ // }}
+
+ // {{ action: Submit
+ public void submit(final Approver approver) {
+ setStatus("Submitted");
+ setApprover(approver);
+ }
+
+ public String disableSubmit() {
+ return getStatus().equals("New") ? null : "Claim has already been submitted";
+ }
+
+ public Object[] defaultSubmit() {
+ return new Object[] { getClaimant().getApprover() };
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
new file mode 100644
index 0000000..0c80cb8
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
@@ -0,0 +1,77 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.claims;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.Money;
+
+public class ClaimItem extends AbstractDomainObject {
+
+ // {{ Title
+ public String title() {
+ return getDescription();
+ }
+
+ // }}
+
+ // {{ DateIncurred
+ private Date dateIncurred;
+
+ @MemberOrder(sequence = "1")
+ public Date getDateIncurred() {
+ return dateIncurred;
+ }
+
+ public void setDateIncurred(final Date dateIncurred) {
+ this.dateIncurred = dateIncurred;
+ }
+
+ // }}
+
+ // {{ Description
+ private String description;
+
+ @MemberOrder(sequence = "2")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ // }}
+
+ // {{ Amount
+ private Money amount;
+
+ @MemberOrder(sequence = "3")
+ public Money getAmount() {
+ return amount;
+ }
+
+ public void setAmount(final Money price) {
+ this.amount = price;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
new file mode 100644
index 0000000..b743ecd
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.claims;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Named;
+
+@Named("Claims")
+public interface ClaimRepository {
+
+ public List<Claim> allClaims();
+
+ public List<Claim> findClaims(@Named("Description") String description);
+
+ public List<Claim> claimsFor(Claimant claimant);
+
+ public Claim newClaim(Claimant claimant);
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
new file mode 100644
index 0000000..6bd83cd
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.claims;
+
+import java.util.List;
+
+public class ClaimRepositoryImpl implements ClaimRepository {
+
+ @Override
+ public List<Claim> allClaims() {
+ return null;
+ }
+
+ @Override
+ public List<Claim> findClaims(final String description) {
+ return null;
+ }
+
+ @Override
+ public List<Claim> claimsFor(final Claimant claimant) {
+ return null;
+ }
+
+ @Override
+ public Claim newClaim(final Claimant claimant) {
+ return null;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
new file mode 100644
index 0000000..707796a
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.claims;
+
+public interface Claimant {
+
+ Approver getApprover();
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
new file mode 100644
index 0000000..49fb002
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.employees;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.Disabled;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.When;
+import org.apache.isis.core.tck.dom.claimapp.claims.Approver;
+import org.apache.isis.core.tck.dom.claimapp.claims.Claimant;
+
+public class Employee extends AbstractDomainObject implements Claimant, Approver {
+
+ // {{ Title
+ public String title() {
+ return getName();
+ }
+
+ // }}
+
+ // {{ Name
+ private String name;
+
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public void modifyName(final String name) {
+ setName(name);
+ }
+
+ public void clearName() {
+ setName(null);
+ }
+
+ public boolean whetherHideName;
+
+ public boolean hideName() {
+ return whetherHideName;
+ }
+
+ public String reasonDisableName;
+
+ public String disableName() {
+ return reasonDisableName;
+ }
+
+ public String reasonValidateName;
+
+ public String validateName(final String name) {
+ return reasonValidateName;
+ }
+
+ // }}
+
+ // {{ Password
+ private String password;
+
+ @MemberOrder(sequence = "2")
+ @Disabled(when = When.ONCE_PERSISTED)
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(final String password) {
+ this.password = password;
+ }
+
+ // }}
+
+ // {{ Approver
+ private Approver approver;
+
+ @Override
+ @MemberOrder(sequence = "2")
+ public Approver getApprover() {
+ return approver;
+ }
+
+ public void setApprover(final Approver approver) {
+ this.approver = approver;
+ }
+
+ // }}
+
+ // {{ injected: EmployeeRepository
+ private EmployeeRepository employeeRepository;
+
+ public EmployeeRepository getEmployeeRepository() {
+ return employeeRepository;
+ }
+
+ public void setEmployeeRepository(final EmployeeRepository employeeRepository) {
+ this.employeeRepository = employeeRepository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
new file mode 100644
index 0000000..d17f228
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.employees;
+
+import java.util.List;
+
+import org.apache.isis.applib.annotation.Named;
+
+@Named("Employees")
+public interface EmployeeRepository {
+
+ public List<Employee> allEmployees();
+
+ public List<Employee> findEmployees(@Named("Name") String name);
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
new file mode 100644
index 0000000..4f58cd5
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.claimapp.employees;
+
+import java.util.List;
+
+public class EmployeeRepositoryImpl implements EmployeeRepository {
+
+ @Override
+ public List<Employee> allEmployees() {
+ return null;
+ }
+
+ @Override
+ public List<Employee> findEmployees(final String name) {
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
new file mode 100644
index 0000000..0383050
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.tck.dom.defaults;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.Hidden;
+
+@Hidden
+@DomainService
+public class HiddenRepository {
+
+ public String someAction() {
+ return null;
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
new file mode 100644
index 0000000..b05f698
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.defaults;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Title;
+
+public class WithDefaultsEntity extends AbstractDomainObject {
+
+ // {{ Name (string, title)
+ private String name;
+
+ @MemberOrder(sequence = "1")
+ @Title
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String defaultName() {
+ return "default-name";
+ }
+
+ // }}
+
+ // {{ Flag (boolean)
+ private boolean flag;
+
+ @MemberOrder(sequence = "1")
+ public boolean getFlag() {
+ return flag;
+ }
+
+ public void setFlag(final boolean flag) {
+ this.flag = flag;
+ }
+
+ public boolean defaultFlag() {
+ return true;
+ }
+
+ // }}
+
+ // {{ AnInt (int)
+ private int anInt;
+
+ @MemberOrder(sequence = "1")
+ public int getAnInt() {
+ return anInt;
+ }
+
+ public void setAnInt(final int anInt) {
+ this.anInt = anInt;
+ }
+
+ public int defaultAnInt() {
+ return 42;
+ }
+
+ // }}
+
+ // {{ Other (property)
+ private WithDefaultsEntity other;
+
+ @MemberOrder(sequence = "1")
+ public WithDefaultsEntity getOther() {
+ return other;
+ }
+
+ public void setOtherEntity(final WithDefaultsEntity withDefaultsEntity) {
+ this.other = withDefaultsEntity;
+ }
+
+ public WithDefaultsEntity defaultOther() {
+ final List<WithDefaultsEntity> list = repository.list();
+ return list.size() > 0 ? list.get(list.size() - 1) : null;
+ }
+
+ // }}
+
+ // {{ injected: WithDefaultsEntityRepository
+ private WithDefaultsEntityRepository repository;
+
+ public void setWithDefaultsEntityRepository(final WithDefaultsEntityRepository repository) {
+ this.repository = repository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
new file mode 100644
index 0000000..158f949
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
@@ -0,0 +1,58 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.defaults;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.QueryOnly;
+import org.apache.isis.applib.filter.Filter;
+
+@Named("Simples")
+@DomainService
+public class WithDefaultsEntityRepository extends AbstractFactoryAndRepository {
+
+ @Override
+ public String getId() {
+ return "withDefaultsEntities";
+ }
+
+ @MemberOrder(sequence = "1")
+ @QueryOnly
+ public List<WithDefaultsEntity> list() {
+ final Filter<Object> filterPersistentOnly = new Filter<Object>() {
+
+ @Override
+ public boolean accept(final Object t) {
+ return getContainer().isPersistent(t);
+ }
+ };
+ return allMatches(WithDefaultsEntity.class, filterPersistentOnly);
+ }
+
+ @MemberOrder(sequence = "3")
+ public WithDefaultsEntity newTransientEntity() {
+ return newTransientInstance(WithDefaultsEntity.class);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
new file mode 100644
index 0000000..c92e560
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.movies;
+
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+@ObjectType("movies.MOVIE")
+public class Movie {
+
+ public String title() {
+ return name;
+ }
+
+ // {{ name: String
+ private String name;
+ public String getName() {
+ return name;
+ }
+ public void setName(final String name) {
+ this.name = name;
+ }
+ // }}
+
+ // {{ director: Person
+ private Person director;
+ public Person getDirector() {
+ return director;
+ }
+ public void setDirector(final Person director) {
+ this.director = director;
+ }
+
+ // }}
+
+ // {{ roles: List
+ private final List<Role> roles = Lists.newArrayList();
+ public List<Role> getRoles() {
+ return roles;
+ }
+ public void addToRoles(final Role role) {
+ roles.add(role);
+ }
+ public void removeFromRoles(final Role role) {
+ roles.remove(role);
+ }
+ // }}
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
new file mode 100644
index 0000000..19d4986
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.movies;
+
+import java.util.List;
+
+import org.apache.isis.applib.DomainObjectContainer;
+
+public class MovieDomainRepository {
+
+ public List<Person> allPersons() {
+ return container.allInstances(Person.class);
+ }
+
+ public List<Movie> allMovies() {
+ return container.allInstances(Movie.class);
+ }
+
+ public List<Role> allRoles() {
+ return container.allInstances(Role.class);
+ }
+
+
+ // {{ injected: DomainObjectContainer
+ private DomainObjectContainer container;
+
+ public void setDomainObjectContainer(final DomainObjectContainer container) {
+ this.container = container;
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
new file mode 100644
index 0000000..5eb7cd2
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.movies;
+
+import java.util.Date;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+@ObjectType("movies.PERSON")
+public class Person {
+
+ public String title() {
+ return name;
+ }
+
+ // {{ name: String
+ private String name;
+ public String getName() {
+ return name;
+ }
+ public void setName(final String name) {
+ this.name = name;
+ }
+ // }}
+
+
+ // {{ Date: java.util.Date
+ private Date date;
+ public Date getDate() {
+ return date;
+ }
+ public void setDate(final Date date) {
+ this.date = date;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
new file mode 100644
index 0000000..6a8cd32
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.movies;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+
+@ObjectType("movies.ROLE")
+public class Role {
+
+ public String title() {
+ return name;
+ }
+
+ // {{ name: String
+ private String name;
+ public String getName() {
+ return name;
+ }
+ public void setName(final String name) {
+ this.name = name;
+ }
+ // }}
+
+
+ // {{ actor: Person
+ private Person actor;
+ public Person getActor() {
+ return actor;
+ }
+ public void setActor(final Person actor) {
+ this.actor = actor;
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
new file mode 100755
index 0000000..1e4c352
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+public interface Empty {
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
new file mode 100644
index 0000000..dd6190f
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+
+public class EmptyEntityWithOwnProperty implements Empty {
+
+ // {{ Special: string
+ private String special;
+
+ public String getSpecial() {
+ return special;
+ }
+
+ public void setSpecial(final String special) {
+ this.special = special;
+ }
+ // }}
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
new file mode 100755
index 0000000..3a73ff7
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
@@ -0,0 +1,110 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * This class is the collection point of all the polymorphism and related tests.
+ * There is nothing really special about it, it is just a placeholder for the
+ * various tests related to polymorphism or recursion (JIRA ISIS-117 and
+ * ISIS-118).
+ *
+ * @author Kevin
+ *
+ */
+public class ReferencingPolyTypesEntity extends AbstractDomainObject {
+
+ public String title() {
+ return string;
+ }
+
+ // {{ String type
+ private String string;
+
+ public String getString() {
+ return string;
+ }
+
+ public void setString(final String string) {
+ this.string = string;
+ }
+
+ // }}
+
+ // {{ PolyBaseClass collection
+ private List<StringBaseEntity> polyBaseClasses = new ArrayList<StringBaseEntity>();
+
+ public List<StringBaseEntity> getPolyBaseClasses() {
+ return polyBaseClasses;
+ }
+
+ public void setPolyBaseClasses(final List<StringBaseEntity> polyBaseClasses) {
+ this.polyBaseClasses = polyBaseClasses;
+ }
+
+ // }}
+
+ // {{ PolyInterfaceType: Can we store / restore properties by interface?
+ private Stringable polyInterfaceType;
+
+ public Stringable getPolyInterfaceType() {
+ return polyInterfaceType;
+ }
+
+ public void setPolyInterfaceType(final Stringable polyInterfaceType) {
+ this.polyInterfaceType = polyInterfaceType;
+ }
+
+ // }}
+
+ // {{ PolyInterface collection
+ private List<Stringable> stringables = new ArrayList<Stringable>();
+
+ public List<Stringable> getPolyInterfaces() {
+ return stringables;
+ }
+
+ public void setPolyInterfaces(final List<Stringable> stringables) {
+ this.stringables = stringables;
+ }
+
+ // }}
+
+ // {{ PolySelfRefClass: Can we store / restore classes that contain
+ // self-referencing collections?
+ private SelfReferencingEntity selfReferencingEntity;
+
+ public SelfReferencingEntity getPolySelfRefClass() {
+ return selfReferencingEntity;
+ }
+
+ public void setPolySelfRefClass(final SelfReferencingEntity selfReferencingEntity) {
+ this.selfReferencingEntity = selfReferencingEntity;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
new file mode 100755
index 0000000..59a4058
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * This test class is used to test that a class can contain a collection of
+ * itself.
+ *
+ * Caveat: Every class instance can only be contained by 1 parent collection,
+ * and will only be contained once.
+ *
+ * @author Kevin
+ *
+ * @version $Rev$ $Date$
+ */
+
+public class SelfReferencingEntity extends AbstractDomainObject {
+
+ public String title() {
+ return string;
+ }
+
+ // {{ String type
+ private String string;
+ public String getString() {
+ return string;
+ }
+ public void setString(final String string) {
+ this.string = string;
+ }
+ // }}
+
+ // {{ PolyTestClass collection
+ private List<SelfReferencingEntity> polySelfRefClasses = new ArrayList<SelfReferencingEntity>();
+
+ public List<SelfReferencingEntity> getPolySelfRefClasses() {
+ return polySelfRefClasses;
+ }
+
+ public void setPolySelfRefClasses(final List<SelfReferencingEntity> polySelfRefClasses) {
+ this.polySelfRefClasses = polySelfRefClasses;
+ }
+
+ public void addToPolySelfRefClasses(final SelfReferencingEntity selfReferencingEntity) {
+ // check for no-op
+ if (selfReferencingEntity == null || getPolySelfRefClasses().contains(selfReferencingEntity)) {
+ return;
+ }
+ // associate new
+ getPolySelfRefClasses().add(selfReferencingEntity);
+ }
+
+ public void removeFromPolySelfRefClasses(final SelfReferencingEntity selfReferencingEntity) {
+ // check for no-op
+ if (selfReferencingEntity == null || !getPolySelfRefClasses().contains(selfReferencingEntity)) {
+ return;
+ }
+ // dissociate existing
+ getPolySelfRefClasses().remove(selfReferencingEntity);
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
new file mode 100755
index 0000000..4636a53
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * @author Kevin
+ *
+ */
+public abstract class StringBaseEntity extends AbstractDomainObject {
+
+ public String title() {
+ return stringBase;
+ }
+
+ // {{ String type
+ private String stringBase;
+
+ public String getStringBase() {
+ return stringBase;
+ }
+
+ public void setStringBase(final String string) {
+ this.stringBase = string;
+ }
+
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
new file mode 100755
index 0000000..748997c
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ *
+ */
+public class StringBaseEntitySub extends StringBaseEntity {
+
+ @Override
+ public String title() {
+ return stringOne;
+ }
+
+ // {{ String type
+ private String stringOne;
+
+ public String getStringClassOne() {
+ return stringOne;
+ }
+
+ public void setStringClassOne(final String string) {
+ this.stringOne = string;
+ }
+
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
new file mode 100755
index 0000000..a208ec2
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ *
+ */
+public class StringBaseEntitySubThree extends StringBaseEntitySubTwo {
+
+ // {{ String type
+ private String string;
+
+ public String getStringClassThree() {
+ return string;
+ }
+
+ public void setStringClassThree(final String string) {
+ this.string = string;
+ }
+
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
new file mode 100755
index 0000000..7ffd40b
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
@@ -0,0 +1,48 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+/**
+ * @author Kevin
+ *
+ */
+public class StringBaseEntitySubTwo extends StringBaseEntity {
+
+ @Override
+ public String title() {
+ return stringClassTwo;
+ }
+
+ // {{ String type
+ private String stringClassTwo;
+
+ public String getStringClassTwo() {
+ return stringClassTwo;
+ }
+
+ public void setStringClassTwo(final String string) {
+ this.stringClassTwo = string;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
new file mode 100755
index 0000000..b3f502f
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
@@ -0,0 +1,24 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+public interface Stringable {
+ public String getString();
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
new file mode 100644
index 0000000..a3d2b13
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.tck.dom.poly;
+
+
+public class StringableEntityWithOwnDerivedProperty implements Stringable {
+
+ // {{ String
+ private String string;
+
+ @Override
+ public String getString() {
+ return string;
+ }
+
+ public void setString(final String string) {
+ this.string = string;
+ }
+ // }}
+
+ public String getSpecial() {
+ return "special";
+ }
+
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
new file mode 100755
index 0000000..41a11ea
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+
+public class StringableEntityWithOwnProperties extends AbstractDomainObject implements Stringable, Empty {
+
+ public String title() {
+ return string;
+ }
+
+ // {{ String type
+ private String string;
+
+ @Override
+ public String getString() {
+ return string;
+ }
+
+ public void setString(final String string) {
+ this.string = string;
+ }
+
+ // }}
+
+ // {{ Special
+ private String special;
+
+ public String getSpecial() {
+ return special;
+ }
+
+ public void setSpecial(final String special) {
+ this.special = special;
+ }
+
+ // }}
+
+ // {{ Integer
+ private Integer integerValue;
+
+ @MemberOrder(sequence = "1")
+ public Integer getInteger() {
+ return integerValue;
+ }
+
+ public void setInteger(final Integer integerValue) {
+ this.integerValue = integerValue;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
new file mode 100755
index 0000000..460f521
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.poly;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+public class StringableEntityWithOwnProperty extends AbstractDomainObject implements Stringable {
+
+ public String title() {
+ return string;
+ }
+
+ // {{ String type
+ private String string;
+ @Override
+ public String getString() {
+ return string;
+ }
+ public void setString(final String string) {
+ this.string = string;
+ }
+ // }}
+
+ // {{ Special
+ private String special;
+ public String getSpecial() {
+ return special;
+ }
+ public void setSpecial(final String special) {
+ this.special = special;
+ }
+ // }}
+
+}
[27/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java
new file mode 100644
index 0000000..02cefba
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenRepresentation_ok.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.endsWith;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // when
+ final Response response = resource.services();
+ final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ final ListRepresentation repr = restfulResponse.getEntity();
+
+ assertThat(repr, isMap());
+
+ assertThat(repr.getSelf(), isLink(client)
+ .rel(Rel.SELF)
+ .href(endsWith(":39393/services"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.LIST.getMediaType())
+ .returning(HttpStatusCode.OK)
+ );
+ assertThat(repr.getUp(), isLink(client)
+ .rel(Rel.UP)
+ .href(endsWith(":39393/"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.HOME_PAGE.getMediaType())
+ .returning(HttpStatusCode.OK)
+ );
+
+ assertThat(repr.getValue(), isArray());
+
+ assertThat(repr.getLinks(), isArray());
+ assertThat(repr.getExtensions(), isMap());
+ }
+
+ @Test
+ public void linksToDomainServiceResources() throws Exception {
+
+ // given
+ final RestfulResponse<ListRepresentation> jsonResp = RestfulResponse.ofT(resource.services());
+ final ListRepresentation repr = jsonResp.getEntity();
+
+ // when
+ final JsonRepresentation values = repr.getValue();
+
+ // then
+ for (final LinkRepresentation link : values.arrayIterable(LinkRepresentation.class)) {
+ assertThat("HiddenRepository should not show up in services list", false, is(link.getHref().endsWith("HiddenRepository")));
+ }
+
+ // and also
+ for (final LinkRepresentation link : values.arrayIterable(LinkRepresentation.class)) {
+
+ assertThat(link, isLink(client)
+ .rel(containsString(Rel.SERVICE.getName()))
+ .href(containsString(":39393/"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
+ );
+ assertThat(link, isLink(client)
+ .returning(HttpStatusCode.OK)
+ .responseEntityWithSelfHref(link.getHref())
+ );
+ }
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java
new file mode 100644
index 0000000..041f2b4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_CacheControl_ok.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMaxAge;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_CacheControl_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getDomainServiceResource();
+ }
+
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.services();
+
+ // when
+ final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ final CacheControl cacheControl = restfulResponse.getHeader(Header.CACHE_CONTROL);
+ assertThat(cacheControl, hasMaxAge(24 * 60 * 60));
+ assertThat(cacheControl.getMaxAge(), is(24 * 60 * 60));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..dc1f374
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getDomainServiceResource();
+ }
+
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.services();
+
+ // when
+ final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java
new file mode 100644
index 0000000..5a42dbe
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasParameter;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasSubType;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_ContentType_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ resource = client.getDomainServiceResource();
+ }
+
+
+ @Test
+ public void contentType_and_cacheControl() throws Exception {
+ // given
+ final Response resp = resource.services();
+
+ // when
+ final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ final MediaType contentType = restfulResponse.getHeader(Header.CONTENT_TYPE);
+ assertThat(contentType, hasMediaType("application"));
+ assertThat(contentType, hasSubType("json"));
+ assertThat(contentType, hasParameter("profile", "urn:org.restfulobjects:repr-types/list"));
+ assertThat(contentType, is(RepresentationType.LIST.getMediaType()));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..988ff31
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,68 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "services");
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java
new file mode 100644
index 0000000..9cee7e4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java
@@ -0,0 +1,147 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.Matchers.greaterThan;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_whenQueryArg_xRoFollowLinks_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private RestfulRequest request;
+ private RestfulResponse<ListRepresentation> restfulResponse;
+ private ListRepresentation repr;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ }
+
+ @Test
+ public void noFollow() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "services");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getSelf().getValue(), is(nullValue()));
+ assertThat(repr.getUp().getValue(), is(nullValue()));
+ }
+
+ @Test
+ public void self() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "services")
+ .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.SELF.getName() + "]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getSelf().getValue(), is(not(nullValue())));
+ }
+
+ @Test
+ public void up() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "services")
+ .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.UP.getName() + "]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ assertThat(repr.getUp().getValue(), is(not(nullValue())));
+ }
+
+ @Test
+ public void value_noQualifications_andSoAllOfThemEagerlyReturned() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "services")
+ .withArg(RequestParameter.FOLLOW_LINKS, "value[rel=" + Rel.SERVICE.getName() + "]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ request = client.createRequest(RestfulHttpMethod.GET, "services")
+ .withArg(RequestParameter.FOLLOW_LINKS, "value");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ // then
+ for (final LinkRepresentation link : repr.getValue().arrayIterable(LinkRepresentation.class)) {
+
+ assertThat(link, isLink(client)
+ .rel(containsString(Rel.SERVICE.getName()))
+ .href(containsString(":39393/"))
+ .httpMethod(RestfulHttpMethod.GET)
+ .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
+ .value(is(not(nullValue(JsonRepresentation.class))))
+ );
+ }
+
+ }
+
+ @Test
+ public void value_withQualification_andSoSingleServiceEagerlyReturned() throws Exception {
+
+ request = client.createRequest(RestfulHttpMethod.GET, "services")
+ .withArg(RequestParameter.FOLLOW_LINKS, "value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"JdkValuedEntities\"]");
+ restfulResponse = request.executeT();
+ repr = restfulResponse.getEntity();
+
+ // then
+ int numWithValue = 0;
+ int numWithoutValue = 0;
+ for (final LinkRepresentation link : repr.getValue().arrayIterable(LinkRepresentation.class)) {
+
+ if(isLink(client).value(is(not(nullValue(JsonRepresentation.class)))).build().matches(link)) {
+ numWithValue++;
+ } else {
+ numWithoutValue++;
+ }
+ }
+
+ assertThat(numWithValue, is(1));
+ assertThat(numWithoutValue, is(greaterThan(0)));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
new file mode 100644
index 0000000..2bd52ec
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+public class Get_whenRequestHeaders_Accept_isInvalid_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java
new file mode 100644
index 0000000..8120709
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java
@@ -0,0 +1,105 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.MediaType;
+
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.jboss.resteasy.client.ClientRequest;
+import org.jboss.resteasy.client.ClientResponse;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_whenRequestHeaders_Accept_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private RestfulRequest request;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ request = client.createRequest(RestfulHttpMethod.GET, "services");
+ }
+
+ @Test
+ public void applicationJson_noProfile_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
+ final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.LIST.getMediaType()));
+ }
+
+ @Test
+ public void applicationJson_profileList_returns200() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.LIST.getMediaType());
+ final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+ @Test
+ public void missingHeader_returns200() throws Exception {
+
+ final RestfulResponse<ListRepresentation> restfulResp = request.executeT();
+
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
+ }
+
+ @Test
+ public void applicationJson_profileIncorrect_returns406() throws Exception {
+
+ request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
+ final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
+ }
+
+ @Test
+ public void incorrectMediaType_returnsNotAcceptable() throws Exception {
+
+ // given
+ final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("services");
+ clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
+
+ // when
+ final ClientResponse<?> resp = clientRequest.get();
+ final RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(resp);
+
+ // then
+ assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java
new file mode 100644
index 0000000..4a9a9cf
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Post_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource domainServiceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainServiceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = domainServiceResource.service("ActionsEntities");
+ final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation upLink = serviceRepr.getLinkWithRel(Rel.UP);
+ final LinkRepresentation postLink = upLink.withMethod(RestfulHttpMethod.POST);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the services resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java
new file mode 100644
index 0000000..2706a84
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Put_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource domainServiceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainServiceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = domainServiceResource.service("ActionsEntities");
+ final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation upLink = serviceRepr.getLinkWithRel(Rel.UP);
+ final LinkRepresentation postLink = upLink.withMethod(RestfulHttpMethod.PUT);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the services resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java
new file mode 100644
index 0000000..feb52dc
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Delete_then_405_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+ private DomainServiceResource domainServiceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ domainServiceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void followLink() throws Exception {
+
+ // given
+ final Response serviceResp = domainServiceResource.service("ActionsEntities");
+ final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
+ final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
+ final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
+ final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
+
+ // when
+ final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
+
+ // then
+ assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting a service resource is not allowed."));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
new file mode 100644
index 0000000..266c5de
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
new file mode 100644
index 0000000..3f0f956
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Ignore
+ @Test
+ public void representation() throws Exception {
+
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java
new file mode 100644
index 0000000..0a62815
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+public class Get_givenHiddenMembers_thenRepresentation_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
new file mode 100644
index 0000000..85b2738
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
@@ -0,0 +1,195 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.assertThat;
+
+public class Get_thenRepresentation_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void representation() throws Exception {
+
+ // given
+ final Response resp = resource.service("JdkValuedEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
+
+ final DomainObjectRepresentation repr = jsonResp.getEntity();
+
+ assertThat(repr, isMap());
+
+ assertThat(repr.getTitle(), matches("JdkValuedEntities"));
+
+ assertThat(repr.getDomainType(), is(nullValue()));
+ assertThat(repr.getInstanceId(), is(nullValue()));
+
+ assertThat(repr.getServiceId(), is("JdkValuedEntities"));
+
+ assertThat(repr.getSelf(), isLink().httpMethod(RestfulHttpMethod.GET).build());
+
+ assertThat(repr.getMembers(), isMap());
+ assertThat(repr.getMembers().size(), is(2));
+ DomainObjectMemberRepresentation listMemberRepr = repr.getAction("list");
+
+ assertThat(listMemberRepr.getMemberType(), is("action"));
+ assertThat(listMemberRepr.getDisabledReason(), is(nullValue()));
+ assertThat(listMemberRepr.getLinks(), isArray());
+ assertThat(listMemberRepr.getLinks().size(), is(1));
+
+ LinkRepresentation listMemberReprDetailsLink = listMemberRepr.getLinkWithRel(Rel.DETAILS);
+ assertThat(listMemberReprDetailsLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/services/JdkValuedEntities/actions/list"))
+ .returning(HttpStatusCode.OK)
+ .responseEntityWithSelfHref(listMemberReprDetailsLink.getHref()).build());
+
+
+ assertThat(repr.getLinks(), isArray());
+ assertThat(repr.getLinks().size(), is(3));
+
+ // link to self (see above)
+ // link to describedby
+ LinkRepresentation describedByLink = repr.getLinkWithRel(Rel.DESCRIBEDBY);
+ assertThat(describedByLink, isLink(client)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(endsWith("/domain-types/JdkValuedEntities")).build()
+ );
+ assertThat(describedByLink, isLink(client)
+ .returning(HttpStatusCode.OK)
+ .responseEntityWithSelfHref(describedByLink.getHref()).build());
+
+ assertThat(repr.getLinkWithRel(Rel.PERSIST), is(nullValue()));
+ assertThat(repr.getLinkWithRel(Rel.UPDATE), is(nullValue()));
+ assertThat(repr.getLinkWithRel(Rel.DELETE), is(nullValue()));
+
+ assertThat(repr.getExtensions(), isMap());
+ assertThat(repr.getOid(), matches("JdkValuedEntities:28"));
+ }
+
+
+
+ @Test
+ public void visibleAndInvocableAction() throws Exception {
+
+ // given
+ final Response resp = resource.service("BusinessRulesEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = jsonResp.getEntity();
+
+ assertThat(repr, isMap());
+
+ final DomainObjectMemberRepresentation actionRepr = repr.getAction("visibleAndInvocableAction");
+ assertThat(actionRepr, isMap());
+
+ assertThat(actionRepr.getDisabledReason(), is(nullValue()));
+
+ final LinkRepresentation actionDetailsLink = actionRepr.getLinkWithRel(Rel.DETAILS);
+ assertThat(actionDetailsLink, isLink(this.client)
+ .rel(Rel.DETAILS)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/BusinessRulesEntities/actions/visibleAndInvocableAction"))
+ .returning(HttpStatusCode.OK).build());
+ }
+
+
+ @Test
+ public void visibleButNotInvocableAction() throws Exception {
+
+ // given
+ final Response resp = resource.service("BusinessRulesEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = jsonResp.getEntity();
+
+ final DomainObjectMemberRepresentation actionRepr = repr.getAction("visibleButNotInvocableAction");
+ assertThat(actionRepr, isMap());
+
+ assertThat(actionRepr.getDisabledReason(), is("Always disabled"));
+
+ final LinkRepresentation actionDetailsLink = actionRepr.getLinkWithRel(Rel.DETAILS);
+
+ // even though not invocable, still can traverse to its details page
+ assertThat(actionDetailsLink, isLink(this.client)
+ .href(Matchers.endsWith(":39393/services/BusinessRulesEntities/actions/visibleButNotInvocableAction"))
+ .returning(HttpStatusCode.OK).build());
+ }
+
+ @Test
+ public void invisibleAction() throws Exception {
+
+ // given
+ final Response resp = resource.service("BusinessRulesEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
+ final DomainObjectRepresentation repr = jsonResp.getEntity();
+
+ assertThat(repr.getAction("invisibleAction"), is(nullValue()));
+ }
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java
new file mode 100644
index 0000000..41e868c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java
@@ -0,0 +1,63 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_CacheControl_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.service("JdkValuedEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(jsonResp.getHeader(RestfulResponse.Header.CACHE_CONTROL).getMaxAge(), is(24 * 60 * 60));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
new file mode 100644
index 0000000..625e36b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.apache.isis.core.commons.matchers.IsisMatchers;
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+public class Get_thenResponseHeaders_ContentLength_ok {
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.service("JdkValuedEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java
new file mode 100644
index 0000000..85859b6
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_ContentType_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.service("JdkValuedEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(jsonResp.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.DOMAIN_OBJECT.getMediaType("x-ro-domain-type", "http://localhost:39393/domain-types/JdkValuedEntities")));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java
new file mode 100644
index 0000000..5b44c0c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_thenResponseHeaders_eTag_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.service("JdkValuedEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ // TOFIX: ROSPEC: update spec so this that an ETag is not required for services
+ assertThat(jsonResp.getHeader(RestfulResponse.Header.ETAG), is(nullValue()));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java
new file mode 100644
index 0000000..a2a2ed2
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import javax.ws.rs.core.Response;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_then_200_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void ok() throws Exception {
+ // given
+ final Response resp = resource.service("JdkValuedEntities");
+
+ // when
+ final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java
new file mode 100644
index 0000000..d9f758e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java
@@ -0,0 +1,60 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_whenDoesntExistId_thenResponseCode_404 {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource resource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ resource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void notFound_usingTemplatedMethod() throws Exception {
+
+ // when
+ final Response resp = resource.service("nonExistentServiceId");
+ final RestfulResponse<JsonRepresentation> jsonResp = RestfulResponse.of(resp);
+
+ // then
+ assertThat(jsonResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
+ }
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java
new file mode 100644
index 0000000..e7d13ce
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java
@@ -0,0 +1,73 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+public class Get_whenQueryArg_xRoDomainModel_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private RestfulRequest request;
+
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ String href = Util.givenLinkToService(client, "JdkValuedEntities");
+ request = client.createRequest(RestfulHttpMethod.GET, href);
+ }
+
+ @Test
+ public void simple_rejected() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
+ assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
+ }
+
+ @Test
+ public void formal_accepted() throws Exception {
+
+ request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
+ final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
+
+ assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
+ }
+
+}
[12/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
deleted file mode 100644
index 3b235ec..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenRepresentation_ok.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectCollectionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenRepresentation_ok {
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Test
- public void representation() throws Exception {
-
- // when
- final Response collectionResp = domainObjectResource.accessCollection("BSRL", "73", "visibleAndEditableCollection");
- final RestfulResponse<ObjectCollectionRepresentation> collectionJsonResp = RestfulResponse.ofT(collectionResp);
- assertThat(collectionJsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- // then
- final ObjectCollectionRepresentation collectionRepr = collectionJsonResp.getEntity();
-
- assertThat(collectionRepr.getString("memberType"), is("collection"));
-
- // self link
- final LinkRepresentation selfLink = collectionRepr.getLinkWithRel(Rel.SELF);
- assertThat(selfLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/objects/BSRL/73/collections/visibleAndEditableCollection"))
- .returning(HttpStatusCode.OK)
- .build());
-
- // up link
- final LinkRepresentation upLink = collectionRepr.getLinkWithRel(Rel.UP);
- assertThat(upLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("http://localhost:39393/objects/BSRL/73"))
- .returning(HttpStatusCode.OK)
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
- .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/73/collections/visibleAndEditableCollection"))
- .build());
-
- assertThat(addtoLink.getArguments(), is(not(nullValue())));
- assertThat(addtoLink.getArguments().isArray(), is(false));
- assertThat(addtoLink.getArguments().size(), is(1));
-
- //remove-from link
- final LinkRepresentation removeFromLink = collectionRepr.getLinkWithRel(Rel.REMOVE_FROM);
- assertThat(removeFromLink, isLink(client)
- .httpMethod(RestfulHttpMethod.DELETE)
- .type(RepresentationType.OBJECT_COLLECTION.getMediaType())
- .href(endsWith("/objects/BSRL/73/collections/visibleAndEditableCollection"))
- .build());
-
- assertThat(removeFromLink.getArguments(), is(not(nullValue())));
- assertThat(removeFromLink.getArguments().isArray(), is(false));
- assertThat(removeFromLink.getArguments().size(), is(1));
-
- // described by link
- final LinkRepresentation describedByLink = collectionRepr.getLinkWithRel(Rel.DESCRIBEDBY);
- assertThat(describedByLink, isLink(client)
- .returning(HttpStatusCode.OK)
- .responseEntityWithSelfHref(describedByLink.getHref())
- .build());
-
- assertThat(collectionRepr.getArray("value").isArray(),is(true));
-
- assertThat(collectionRepr.getExtensions(), isMap());
- assertThat(collectionRepr.getExtensions().getString("collectionSemantics"), is("list"));
- assertThat(collectionRepr.getExtensions().getArray("changed").isArray(), is(true));
- assertThat(collectionRepr.getExtensions().getArray("disposed").isArray(), is(true));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index a64d32f..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
deleted file mode 100644
index d43dcb4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentLength_ok.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenResponseHeaders_ContentLength_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Test
- public void collectionDetails() throws Exception {
-
- // when
- final Response collectionResp = domainObjectResource.accessCollection("BSRL", "73", "visibleAndEditableCollection");
- final RestfulResponse<ObjectPropertyRepresentation> collectionJsonResp = RestfulResponse.ofT(collectionResp);
- assertThat(collectionJsonResp.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
-
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 7b0801c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- // TODO: should also assert on the x-ro-element-type, using RestfulMatchers#hasxRoElementType(...)
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index e91e6a3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Get_thenResponseHeaders_eTag_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java
deleted file mode 100644
index b56ee79..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_then_200_ok.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectPropertyRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_then_200_ok {
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainObjectResource domainObjectResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainObjectResource = client.getDomainObjectResource();
- }
-
-
- @Test
- public void collectionDetails() throws Exception {
-
- // when
- final Response collectionResp = domainObjectResource.accessCollection("BSRL", "73", "visibleAndEditableCollection");
- final RestfulResponse<ObjectPropertyRepresentation> collectionJsonResp = RestfulResponse.ofT(collectionResp);
- assertThat(collectionJsonResp.getStatus(), is(HttpStatusCode.OK));
-
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java
deleted file mode 100644
index d60d84a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenArg_then_405_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Get_whenArg_then_405_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java
deleted file mode 100644
index 5b12b63..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistColl_then_404.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenDoesntExistColl_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void returns404() throws Exception {
-
- // given
- RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/collections/nonExistentCollection");
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java
deleted file mode 100644
index 986c431..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenDoesntExistOid_then_404.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.jboss.resteasy.client.core.executors.URLConnectionClientExecutor;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenDoesntExistOid_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient(new URLConnectionClientExecutor());
- }
-
- @Test
- public void returns404() throws Exception {
-
- givenWhenThen("73", RestfulResponse.HttpStatusCode.OK);
- givenWhenThen("nonExistentOid", RestfulResponse.HttpStatusCode.NOT_FOUND);
-
- }
-
- private void givenWhenThen(String oid, RestfulResponse.HttpStatusCode statusCode1) {
- // given
- RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/" +
- oid +
- "/collections/visibleAndEditableCollection");
-
- // when
- RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(statusCode1));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java
deleted file mode 100644
index cdce258..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenHiddenColl_then_404.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenHiddenColl_then_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- }
-
- @Test
- public void returns404() throws Exception {
-
- // given
- RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/64/collections/invisibleCollection");
-
- // when
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.NOT_FOUND));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index 2d12768..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectCollectionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- request = client.createRequest(RestfulHttpMethod.GET, "/objects/BSRL/73/collections/visibleAndEditableCollection");
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<ObjectCollectionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<ObjectCollectionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
deleted file mode 100644
index 1b5a8d8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenQueryArg_xRoFollowLinks_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Get_whenQueryArg_xRoFollowLinks_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java
deleted file mode 100644
index a55e08d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_ok_TODO.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import javax.ws.rs.core.MediaType;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.version.VersionRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenRequestHeaders_Accept_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "objects/BSRL/73/collections/visibleAndEditableCollection");
- }
-
- @Test
- public void applicationJson_noProfile_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
-
- @Test
- public void applicationJson_profileObjectProperty_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.OBJECT_COLLECTION.getMediaType());
- final RestfulResponse<VersionRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
- @Test
- public void missingHeader_returns200() throws Exception {
-
- final RestfulResponse<VersionRepresentation> restfulResp = request.executeT();
-
- assertThat(restfulResp.getStatus(), is(RestfulResponse.HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
deleted file mode 100644
index 3837da0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Get_whenRequestHeaders_Accept_whenInvalid_406_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Get_whenRequestHeaders_Accept_whenInvalid_406_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java
deleted file mode 100644
index e7bede1..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenDisabled_then_203_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_givenDisabled_then_203_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java
deleted file mode 100644
index 3ec986d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_givenEntityInCollection_whenArgIsHrefAndLinksToEntity_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
deleted file mode 100644
index 2fe8390..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
deleted file mode 100644
index 79010b5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java
deleted file mode 100644
index 29a16b2..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenHidden_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_givenHidden_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
deleted file mode 100644
index 9899f62..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_givenSetSemantics_whenHrefArg_thenResponseCode_205_bad_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 77c69e0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index d780a11..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Post_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 6551aa6..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Post_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 21566aa..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Post_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index 67bc9be..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_thenResponseHeaders_eTag_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java
deleted file mode 100644
index 66bf63a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_then_200_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_then_200_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
deleted file mode 100644
index 93c27cf..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
deleted file mode 100644
index e1974f2..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java
deleted file mode 100644
index 16f0d3a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgIsMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenArgIsMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java
deleted file mode 100644
index d1e4624..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgMandatoryButMissing_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenArgMandatoryButMissing_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
deleted file mode 100644
index d30224c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_whenArgValid_thenEntityAddedToCollection_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
deleted file mode 100644
index faea0f9..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java
deleted file mode 100644
index 20393a3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsInvalid_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenArgValueIsInvalid_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
deleted file mode 100644
index f68e5ae..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO {
-
-}
[16/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java
deleted file mode 100644
index 4512592..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_bounceSystem.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_bounceSystem {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void bounceSystem() throws Exception {
- iswf.bounceSystem();
- iswf.bounceSystem();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java
deleted file mode 100644
index cea02d5..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_findInstance.java
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_findInstance {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void whenNoInstances() {
- iswf.beginTran();
- final PrimitiveValuedEntity entity = repo.findById(1);
- assertThat(entity, is(nullValue()));
- iswf.commitTran();
- }
-
- @Test
- public void whenAnInstance() throws Exception {
-
- iswf.beginTran();
- repo.newEntity().setId(1);
- iswf.commitTran();
-
- iswf.beginTran();
- final PrimitiveValuedEntity entity = repo.findById(1);
- assertThat(entity, is(not(nullValue())));
- assertThat(entity.getId(), is(1));
- iswf.commitTran();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java
deleted file mode 100644
index b3c05f1..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_all.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import com.google.common.collect.ImmutableMap;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_namedQuery_all {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Before
- public void setUp() throws Exception {
-
- iswf.beginTran();
-
- PrimitiveValuedEntity entity = repo.newEntity();
- entity.setId(1);
- entity.setIntProperty(111);
-
- entity = repo.newEntity();
- entity.setId(2);
- entity.setIntProperty(222);
-
- entity = repo.newEntity();
- entity.setId(3);
- entity.setIntProperty(333);
-
- entity = repo.newEntity();
- entity.setId(4);
- entity.setIntProperty(111);
-
- iswf.commitTran();
- }
-
- @Test
- public void whenOne() throws Exception {
-
- iswf.beginTran();
-
- List<PrimitiveValuedEntity> entities = repo.findByNamedQueryAll("prmv_findByIntProperty", ImmutableMap.of("i", (Object)222));
- assertThat(entities, is(not(nullValue())));
- assertThat(entities.size(), is(1));
-
- iswf.commitTran();
- }
-
- @Test
- public void whenTwo() throws Exception {
-
- iswf.beginTran();
-
- List<PrimitiveValuedEntity> entities = repo.findByNamedQueryAll("prmv_findByIntProperty", ImmutableMap.of("i", (Object)111));
- assertThat(entities, is(not(nullValue())));
- assertThat(entities.size(), is(2));
-
- iswf.commitTran();
- }
-
- @Test
- public void whenNone() throws Exception {
-
- iswf.beginTran();
-
- List<PrimitiveValuedEntity> entities = repo.findByNamedQueryAll("prmv_findByIntProperty", ImmutableMap.of("i", (Object)999));
- assertThat(entities, is(not(nullValue())));
- assertThat(entities.size(), is(0));
-
- iswf.commitTran();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java
deleted file mode 100644
index 15fdcd7..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_namedQuery_firstOnly.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import com.google.common.collect.ImmutableMap;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_namedQuery_firstOnly {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Before
- public void setUp() throws Exception {
-
- iswf.beginTran();
-
- PrimitiveValuedEntity entity = repo.newEntity();
- entity.setId(1);
- entity.setIntProperty(111);
-
- entity = repo.newEntity();
- entity.setId(2);
- entity.setIntProperty(222);
-
- entity = repo.newEntity();
- entity.setId(3);
- entity.setIntProperty(333);
-
- entity = repo.newEntity();
- entity.setId(4);
- entity.setIntProperty(111);
-
- iswf.commitTran();
-
- }
-
- @Test
- public void whenOne() throws Exception {
-
- PrimitiveValuedEntity entity;
-
- iswf.beginTran();
-
- entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)222));
- assertThat(entity, is(not(nullValue())));
- assertThat(entity.getId(), is(2));
-
- iswf.commitTran();
- }
-
- @Test
- public void whenTwo() throws Exception {
-
- PrimitiveValuedEntity entity;
-
- iswf.beginTran();
-
- entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)111));
- assertThat(entity, is(not(nullValue())));
- assertThat(entity.getId(), is(1));
-
- iswf.commitTran();
- }
-
- @Test
- public void whenNone() throws Exception {
-
- PrimitiveValuedEntity entity;
-
- iswf.beginTran();
-
- entity = repo.findByNamedQueryFirstOnly("prmv_findByIntProperty", ImmutableMap.of("i", (Object)999));
- assertThat(entity, is(nullValue()));
-
- iswf.commitTran();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java
deleted file mode 100644
index 4b27d8d..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_applibValuedEntity.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.applib.value.Date;
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persistAndUpdate_applibValuedEntity {
-
- private ApplibValuedEntityRepository repo = new ApplibValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("APPLIBVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwo() throws Exception {
- iswf.beginTran();
- repo.newEntity().setStringProperty("1");
- repo.newEntity().setStringProperty("2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<ApplibValuedEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persist_then_update() throws Exception {
- iswf.beginTran();
-
- ApplibValuedEntity entity = repo.newEntity();
- entity.setStringProperty("1");
-
- Date date = new Date();
- entity.setDateProperty(date);
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
- assertThat(entity.getDateProperty().dateValue(), is(date.dateValue()));
-
- date = date.add(-1, -1, -1);
- entity.setDateProperty(date);
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
- assertThat(entity.getDateProperty().dateValue(), is(date.dateValue()));
-
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java
deleted file mode 100644
index b74224e..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_jdkValuedEntity.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.sql.Timestamp;
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.JdkValuedEntityRepository;
-import org.apache.isis.core.tck.dom.scalars.MyEnum;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persistAndUpdate_jdkValuedEntity {
-
- private JdkValuedEntityRepository repo = new JdkValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("JDKVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwo() throws Exception {
- iswf.beginTran();
- repo.newEntity().setStringProperty("1");
- repo.newEntity().setStringProperty("2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<JdkValuedEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persist_then_update() throws Exception {
- iswf.beginTran();
- JdkValuedEntity entity = repo.newEntity();
- entity.setStringProperty("1");
- entity.setBigDecimalProperty(BigDecimal.valueOf(543210987654321L, 0)); // mssqlserver can cope with scale>0, but hsqldb cannot
- entity.setBigIntegerProperty(BigInteger.valueOf(123456789012345L));
- entity.setJavaSqlDateProperty(new java.sql.Date(Utils.toMillis(2009, 6, 11)));
- entity.setJavaSqlTimeProperty(new java.sql.Time(Utils.toMillis(1970, 1, 1, 0, 5, 10))); // date portion is unimportant, is preserved on mssqlserver but not on hsqldb
- entity.setJavaSqlTimestampProperty(new Timestamp(Utils.toMillis(2010, 5, 13, 20, 25, 30)));
- entity.setJavaUtilDateProperty(new java.util.Date(Utils.toMillis(2010, 5, 13, 22, 17, 12)));
- entity.setMyEnum(MyEnum.GREEN);
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
-
- assertThat(entity.getStringProperty(), is("1"));
- assertThat(entity.getBigDecimalProperty(), is(BigDecimal.valueOf(543210987654321L, 0)));
- assertThat(entity.getBigIntegerProperty(), is(BigInteger.valueOf(123456789012345L)));
- assertThat(entity.getJavaSqlDateProperty(), is(new java.sql.Date(Utils.toMillis(2009, 6, 11))));
- assertThat(entity.getJavaSqlTimeProperty(), is(new java.sql.Time(Utils.toMillis(1970, 1, 1, 0, 5, 10))));
- assertThat(entity.getJavaSqlTimestampProperty(), is(new Timestamp(Utils.toMillis(2010, 5, 13, 20, 25, 30))));
- assertThat(entity.getJavaUtilDateProperty(), is(new java.util.Date(Utils.toMillis(2010, 5, 13, 22, 17, 12))));
- assertThat(entity.getMyEnum(), is(MyEnum.GREEN));
-
-
- entity.setBigDecimalProperty(BigDecimal.valueOf(123456789012345L, 0));
- entity.setBigIntegerProperty(BigInteger.valueOf(543210987654321L));
- entity.setJavaSqlDateProperty(new java.sql.Date(Utils.toMillis(2010, 5, 13)));
- entity.setJavaSqlTimeProperty(new java.sql.Time(Utils.toMillis(1970, 1, 1, 5, 10, 15)));
- entity.setJavaSqlTimestampProperty(new Timestamp(Utils.toMillis(2010, 5, 13, 10, 15, 20)));
- entity.setJavaUtilDateProperty(new java.util.Date(Utils.toMillis(2010, 5, 13, 20, 15, 10)));
- entity.setMyEnum(MyEnum.BLUE);
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
- assertThat(entity.getBigDecimalProperty(), is(BigDecimal.valueOf(123456789012345L, 0)));
- assertThat(entity.getBigIntegerProperty(), is(BigInteger.valueOf(543210987654321L)));
- assertThat(entity.getJavaSqlDateProperty(), is(new java.sql.Date(Utils.toMillis(2010, 5, 13))));
- assertThat(entity.getJavaSqlTimeProperty(), is(new java.sql.Time(Utils.toMillis(1970, 1, 1, 5, 10, 15))));
- assertThat(entity.getJavaSqlTimestampProperty(), is(new Timestamp(Utils.toMillis(2010, 5, 13, 10, 15, 20))));
- assertThat(entity.getJavaUtilDateProperty(), is(new java.util.Date(Utils.toMillis(2010, 5, 13, 20, 15, 10))));
- assertThat(entity.getMyEnum(), is(MyEnum.BLUE));
-
- iswf.commitTran();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java
deleted file mode 100644
index d1567cb..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_objectAdapters.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
-import org.apache.isis.core.metamodel.adapter.ResolveState;
-import org.apache.isis.core.metamodel.adapter.oid.OidMarshaller;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persistAndUpdate_objectAdapters {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void transient_then_persistent() throws Exception {
-
- iswf.beginTran();
- PrimitiveValuedEntity entity = repo.newEntity();
- ObjectAdapter adapter = iswf.adapterFor(entity);
-
- assertThat(adapter.isTransient(), is(true));
- assertThat(adapter.getResolveState(), is(ResolveState.TRANSIENT));
- assertThat(adapter.getOid().isTransient(), is(true));
-
- entity.setId(1);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- final List<PrimitiveValuedEntity> list = repo.list();
- assertThat(list.size(), is(1));
-
- adapter = iswf.adapterFor(list.get(0));
- assertThat(adapter.getResolveState(), is(ResolveState.RESOLVED));
- assertThat(adapter.isTransient(), is(false));
- assertThat(adapter.getOid().enString(new OidMarshaller()), is("PRMV:i~1"));
-
- iswf.commitTran();
- }
-
- @Test
- public void updated_and_retrieved() throws Exception {
-
- // given persisted
- iswf.beginTran();
- PrimitiveValuedEntity entity = repo.newEntity();
- ObjectAdapter adapter = iswf.adapterFor(entity);
-
- entity.setId(1);
- entity.setCharProperty('X');
-
- iswf.commitTran();
-
- // when update
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
- entity.setCharProperty('Y');
- iswf.commitTran();
-
- // then adapter's state is resolved
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
- assertThat(entity.getCharProperty(), is('Y'));
-
- adapter = iswf.adapterFor(entity);
- assertThat(adapter.getResolveState(), is(ResolveState.RESOLVED));
-
- iswf.commitTran();
-
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java
deleted file mode 100644
index 3dfb7d4..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_primitiveValuedEntity.java
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persistAndUpdate_primitiveValuedEntity {
-
- private PrimitiveValuedEntityRepository repo = new PrimitiveValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("PRIMITIVEVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwo() throws Exception {
- iswf.beginTran();
- repo.newEntity().setId(1);
- repo.newEntity().setId(2);
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<PrimitiveValuedEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
- @Test
- public void persist_then_update() throws Exception {
-
- iswf.beginTran();
- PrimitiveValuedEntity entity = repo.newEntity();
- entity.setId(1);
-
- entity.setBooleanProperty(false);
- entity.setByteProperty((byte)456);
- entity.setDoubleProperty(123456789876.0);
- entity.setFloatProperty(654321.0f);
- entity.setIntProperty(765);
- entity.setLongProperty(7654321012345L);
- entity.setShortProperty((short)543);
- entity.setCharProperty('A');
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
-
- assertThat(entity.getBooleanProperty(), is(false));
- assertThat(entity.getByteProperty(), is((byte)456));
- assertThat(entity.getDoubleProperty(), is(123456789876.0));
- assertThat(entity.getFloatProperty(), is(654321.0f));
- assertThat(entity.getIntProperty(), is(765));
- assertThat(entity.getLongProperty(), is(7654321012345L));
- assertThat(entity.getShortProperty(), is((short)543));
- assertThat(entity.getCharProperty(), is('A'));
-
-
- entity.setBooleanProperty(true);
- entity.setByteProperty((byte)123);
- entity.setDoubleProperty(9876543210987.0);
- entity.setFloatProperty(123456.0f);
- entity.setIntProperty(456);
- entity.setLongProperty(12345678901L);
- entity.setShortProperty((short)4567);
- entity.setCharProperty('X');
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
-
- assertThat(entity.getBooleanProperty(), is(true));
- assertThat(entity.getByteProperty(), is((byte)123));
- assertThat(entity.getDoubleProperty(), is(9876543210987.0));
- assertThat(entity.getFloatProperty(), is(123456.0f));
- assertThat(entity.getIntProperty(), is(456));
- assertThat(entity.getLongProperty(), is(12345678901L));
- assertThat(entity.getShortProperty(), is((short)4567));
- assertThat(entity.getCharProperty(), is('X'));
-
- iswf.commitTran();
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java
deleted file mode 100644
index 94e3c62..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persistAndUpdate_wrapperValuedEntity.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
-import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persistAndUpdate_wrapperValuedEntity {
-
- private WrapperValuedEntityRepository repo = new WrapperValuedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("WRAPPERVALUEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwo() throws Exception {
- iswf.beginTran();
- repo.newEntity().setStringProperty("1");
- repo.newEntity().setStringProperty("2");
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<WrapperValuedEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
-
- @Test
- public void persist_then_update() throws Exception {
- iswf.beginTran();
- WrapperValuedEntity entity = repo.newEntity();
- entity.setStringProperty("1");
- entity.setBooleanProperty(false);
- entity.setByteProperty((byte)321);
- entity.setDoubleProperty(123456768723429.0);
- entity.setFloatProperty(654321.0f);
- entity.setIntegerProperty(543);
- entity.setLongProperty(90876512345L);
- entity.setShortProperty((short)7654);
- entity.setCharacterProperty('A');
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
- assertThat(entity.getStringProperty(), is("1"));
- assertThat(entity.getBooleanProperty(), is(false));
- assertThat(entity.getByteProperty(), is((byte)321));
- assertThat(entity.getDoubleProperty(), is(123456768723429.0));
- assertThat(entity.getFloatProperty(), is(654321.0f));
- assertThat(entity.getIntegerProperty(), is(543));
- assertThat(entity.getLongProperty(), is(90876512345L));
- assertThat(entity.getShortProperty(), is((short)7654));
- assertThat(entity.getCharacterProperty(), is('A'));
-
-
- entity.setBooleanProperty(true);
- entity.setByteProperty((byte)123);
- entity.setDoubleProperty(9876543210987.0);
- entity.setFloatProperty(123456.0f);
- entity.setIntegerProperty(456);
- entity.setLongProperty(12345678901L);
- entity.setShortProperty((short)4567);
- entity.setCharacterProperty('X');
-
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- entity = repo.list().get(0);
- assertThat(entity.getBooleanProperty(), is(true));
- assertThat(entity.getByteProperty(), is((byte)123));
- assertThat(entity.getDoubleProperty(), is(9876543210987.0));
- assertThat(entity.getFloatProperty(), is(123456.0f));
- assertThat(entity.getIntegerProperty(), is(456));
- assertThat(entity.getLongProperty(), is(12345678901L));
- assertThat(entity.getShortProperty(), is((short)4567));
- assertThat(entity.getCharacterProperty(), is('X'));
-
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java
----------------------------------------------------------------------
diff --git a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java b/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java
deleted file mode 100644
index 25a858f..0000000
--- a/tck/tck-integtests/src/test/java/org/apache/isis/objectstore/jdo/datanucleus/scenarios/scalar/Persistence_persist_dataStoreAssignedPrimaryKey.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.objectstore.jdo.datanucleus.scenarios.scalar;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import java.util.List;
-
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
-import org.apache.isis.core.tck.dom.scalars.AutoAssignedEntity;
-import org.apache.isis.core.tck.dom.scalars.AutoAssignedEntityRepository;
-import org.apache.isis.objectstore.jdo.datanucleus.Utils;
-
-public class Persistence_persist_dataStoreAssignedPrimaryKey {
-
- private AutoAssignedEntityRepository repo = new AutoAssignedEntityRepository();
-
- @Rule
- public IsisSystemWithFixtures iswf = Utils.systemBuilder()
- .with(Utils.listenerToDeleteFrom("AUTOASSIGNEDENTITY"))
- .withServices(repo)
- .build();
-
- @Test
- public void persistTwo() throws Exception {
- iswf.beginTran();
- repo.newEntity();
- repo.newEntity();
- iswf.commitTran();
-
- iswf.bounceSystem();
-
- iswf.beginTran();
- List<AutoAssignedEntity> list = repo.list();
- assertThat(list.size(), is(2));
- iswf.commitTran();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/README-testcases.md
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/README-testcases.md b/tck/tck-viewer-restfulobjects/README-testcases.md
deleted file mode 100644
index b05c06a..0000000
--- a/tck/tck-viewer-restfulobjects/README-testcases.md
+++ /dev/null
@@ -1,80 +0,0 @@
-<!--
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
--->
-
-<pre>
-
-[incorrect]_thenResponseCode_405_bad
-
-Get_whenQueryArg_xRoFollowLinks_ok
-Get_whenQueryArg_xRoDomainModel_ok
-
-Get_whenRequestHeaders_Accept_isInvalid_bad
-Get_whenRequestHeaders_Accept_ok
-
-
-[modifying]_givenDisabled_thenResponseCode_203_TODO
-
-[modifying]_givenEtag_whenIfMatchHeaderDoesMatch_ok
-[modifying]_givenEtag_whenIfMatchHeaderDoesNotMatch_bad
-
-[modifying]_givenXxx_whenArgsValid_thenXxx_ok_TODO
-
-
-[modifying]_whenArgsMandatoryButMissing_bad_TODO
-rename from
-[modifying]_whenNoArg_bad_TODO
-
-
-[modifying]_then[PostConditionsHappyCase]_TODO
-
-[modifying]_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO
-[modifying]_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO
-
-[modifying]_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO
-[modifying]_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO
-[modifying]_whenArgValueIsInvalid_bad_TODO
-
-[modifying]_whenArgIsMalformed_bad_TODO
-
-[anyValid]_whenDoesntExistOid_thenResponseCode_404_TODO
-[anyValid]_whenDoesntExistMember_thenResponseCode_404_TODO
-[anyValid]_givenHidden_thenResponseCode_404_TODO
-
-[anyValid]_thenRepresentation_ok_TODO
-[anyValid]_thenResponseCode_200_ok
-[anyValid]_thenResponseHeaders_ContentType_ok
-[anyValid]_thenResponseHeaders_ContentLength_ok
-[anyValid]_thenResponseHeaders_CacheControl_ok
-[anyValid]_thenResponseHeaders_eTag_ok
-
-
-
-
-
-
-
-Delete_whenLinkToEntityThatExistsButIsNotInCollection_ok_TODO
-Delete_whenHrefArgLinksToEntityInCollection_ok_TODO
-Put_whenArgsValid_thenMultiplePropertyUpdate_TODO
-
-Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO
-Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO
-
-Get_givenHiddenMembers_thenRepresentation_ok_TODO
-</pre>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch b/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch
deleted file mode 100644
index 53bd401..0000000
--- a/tck/tck-viewer-restfulobjects/ide/eclipse/launch/viewer-restful-tck.launch
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.apache.isis.runtimes.dflt.webserver/src/main/java/org/apache/isis/WebServer.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<mapAttribute key="org.eclipse.debug.core.preferred_launchers">
-<mapEntry key="[debug]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-<mapEntry key="[run]" value="org.eclipse.jdt.launching.localJavaApplication"/>
-</mapAttribute>
-<stringAttribute key="org.eclipse.debug.core.source_locator_id" value="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"/>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.INCLUDE_EXTERNAL_JARS" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.m2e.launchconfig.classpathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.apache.isis.WebServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="isis-viewer-restfulobjects-tck"/>
-<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.m2e.launchconfig.sourcepathProvider"/>
-</launchConfiguration>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/pom.xml
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/pom.xml b/tck/tck-viewer-restfulobjects/pom.xml
deleted file mode 100644
index 1e7d558..0000000
--- a/tck/tck-viewer-restfulobjects/pom.xml
+++ /dev/null
@@ -1,119 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-tck-viewer-restfulobjects</artifactId>
- <name>Isis RestfulObjects Viewer TCK tests</name>
-
- <packaging>war</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- </plugin>
-
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <includes>
- <include>**/*Test_*.java</include>
- <include>**/Get_*.java</include>
- <include>**/Delete_*.java</include>
- <include>**/Put_*.java</include>
- <include>**/Post_*.java</include>
- </includes>
- <!-- TODO: reinstate -->
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
-
- </plugins>
- </build>
-
- <repositories>
- <repository>
- <id>JBoss Public Release</id>
- <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-
- <dependencies>
-
- <!-- other modules in this project -->
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-dom</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-fixture</artifactId>
- </dependency>
-
- <!-- isis viewer -->
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-viewer-restfulobjects-server</artifactId>
- </dependency>
-
-
- <!-- isis runtime -->
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-runtime</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-security</artifactId>
- </dependency>
-
- <!-- to run using WebServer -->
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-webserver</artifactId>
- <scope>runtime</scope>
- <optional>true</optional>
- </dependency>
-
- <dependency>
- <groupId>org.reflections</groupId>
- <artifactId>reflections</artifactId>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- </dependencies>
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java b/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java
deleted file mode 100644
index e72a568..0000000
--- a/tck/tck-viewer-restfulobjects/src/main/java/org/apache/isis/viewer/restfulobjects/tck/Dummy.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck;
-
-
-public class Dummy {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties b/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties
deleted file mode 100644
index e6bf541..0000000
--- a/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/isis.properties
+++ /dev/null
@@ -1,42 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-isis.authentication=bypass
-isis.authorization=bypass
-
-isis.persistor=in-memory
-
-isis.services-installer=configuration-and-annotation
-isis.services.ServicesInstallerFromAnnotation.packagePrefix=org.apache.isis.core.tck.dom
-
-isis.services = org.apache.isis.applib.services.eventbus.EventBusService$Noop
-
-isis.fixtures.prefix= org.apache.isis.core.tck.fixture
-isis.fixtures=\
- LogonAsSvenFixture,\
- scalars.ApplibValuedEntityFixture,\
- scalars.JdkValuedEntityFixture,\
- scalars.PrimitiveValuedEntityFixture,\
- scalars.WrapperValuedEntityFixture,\
- refs.ParentEntitiesFixture,\
- defaults.WithDefaultsEntityFixture,\
- busrules.BusRulesEntityFixture,\
- actions.ActionsEntityFixture,\
- scalars.JodaValuedEntityFixture
-
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties b/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties
deleted file mode 100644
index c7f605a..0000000
--- a/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/logging.properties
+++ /dev/null
@@ -1,30 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-# apache's log4j is used to provide system logging.
-log4j.rootCategory=WARN, Console
-
-# The console appender
-log4j.appender.Console=org.apache.log4j.ConsoleAppender
-log4j.appender.Console.target=System.out
-log4j.appender.Console.layout=org.apache.log4j.PatternLayout
-log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n
-
-log4j.appender.File=org.apache.log4j.RollingFileAppender
-log4j.appender.File.file=isis.log
-log4j.appender.File.append=false
-log4j.appender.File.layout=org.apache.log4j.PatternLayout
-log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml b/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
deleted file mode 100644
index 366134d..0000000
--- a/tck/tck-viewer-restfulobjects/src/main/webapp/WEB-INF/web.xml
+++ /dev/null
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<web-app id="WebApp_ID" version="2.4"
- xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
-
- <display-name>RestfulObjects TCK</display-name>
-
-
- <filter>
- <filter-name>ResourceCachingFilter</filter-name>
- <filter-class>org.apache.isis.core.webapp.content.ResourceCachingFilter</filter-class>
- <init-param>
- <param-name>CacheTime</param-name>
- <param-value>86400</param-value>
- </init-param>
- </filter>
-
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.js</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.css</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.jpg</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.png</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>ResourceCachingFilter</filter-name>
- <url-pattern>*.gif</url-pattern>
- </filter-mapping>
-
- <servlet>
- <servlet-name>Resource</servlet-name>
- <servlet-class>org.apache.isis.core.webapp.content.ResourceServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.js</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.gif</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.png</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>Resource</servlet-name>
- <url-pattern>*.html</url-pattern>
- </servlet-mapping>
-
-
-
-
- <listener>
- <listener-class>org.apache.isis.core.webapp.IsisWebAppBootstrapper</listener-class>
- </listener>
-
- <context-param>
- <param-name>isis.viewers</param-name>
- <param-value>restfulobjects</param-value>
- </context-param>
-
- <filter>
- <filter-name>IsisSessionFilter</filter-name>
- <filter-class>org.apache.isis.core.webapp.IsisSessionFilter</filter-class>
- <init-param>
- <!-- trusted client, so no authentication required -->
- <param-name>authenticationSessionStrategy</param-name>
- <param-value>org.apache.isis.viewer.restfulobjects.server.authentication.AuthenticationSessionStrategyTrusted</param-value>
- </init-param>
- <init-param>
- <!-- what to do if no session was found; we indicate to issue a 401 basic authentication challenge -->
- <param-name>whenNoSession</param-name>
- <param-value>continue</param-value>
- </init-param>
- </filter>
-
- <filter-mapping>
- <filter-name>IsisSessionFilter</filter-name>
- <url-pattern>*</url-pattern>
- </filter-mapping>
-
- <filter>
- <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
- <filter-class>org.apache.isis.viewer.restfulobjects.server.webapp.IsisTransactionFilterForRestfulObjects</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>IsisTransactionFilterForRestfulObjects</filter-name>
- <url-pattern>*</url-pattern>
- </filter-mapping>
-
-
-
- <listener>
- <listener-class>org.jboss.resteasy.plugins.server.servlet.ResteasyBootstrap</listener-class>
- </listener>
-
- <context-param>
- <param-name>javax.ws.rs.Application</param-name>
- <param-value>org.apache.isis.viewer.restfulobjects.server.RestfulObjectsApplication</param-value>
- </context-param>
-
- <servlet>
- <servlet-name>RestEasy</servlet-name>
- <servlet-class>org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>RestEasy</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>
-
-</web-app>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java
deleted file mode 100644
index 7197ff0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/IsisWebServerRule.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck;
-
-import org.apache.http.client.HttpClient;
-import org.jboss.resteasy.client.ClientExecutor;
-import org.junit.rules.MethodRule;
-import org.junit.runners.model.FrameworkMethod;
-import org.junit.runners.model.Statement;
-
-import org.apache.isis.core.runtime.system.context.IsisContext;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-
-public class IsisWebServerRule implements MethodRule {
-
- private static ThreadLocal<WebServer> WEBSERVER = new ThreadLocal<WebServer>();
-
- private RestfulClient client;
-
- @Override
- public Statement apply(final Statement base, final FrameworkMethod method, final Object target) {
- getWebServer(); // creates and starts running if required
- return base;
- }
-
- public WebServer getWebServer() {
- WebServer webServer = WEBSERVER.get();
- if(webServer == null) {
- webServer = new WebServer();
- WEBSERVER.set(webServer);
- webServer.run(39393);
- }
- return webServer;
- }
-
- public void discardWebApp() {
- getWebServer().stop();
- WEBSERVER.set(null);
- IsisContext.testReset();
- }
-
- public RestfulClient getClient() {
- if(client == null) {
- final WebServer webServer = getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
- return client;
- }
-
- public RestfulClient getClient(HttpClient httpClient) {
- if(client == null) {
- final WebServer webServer = getWebServer();
- client = new RestfulClient(webServer.getBase(), httpClient);
- }
- return client;
- }
-
- public RestfulClient getClient(ClientExecutor clientExecutor) {
- if(client == null) {
- final WebServer webServer = getWebServer();
- client = new RestfulClient(webServer.getBase(), clientExecutor);
- }
- return client;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java
deleted file mode 100644
index 72808e4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/RelTest_matches.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck;
-
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-
-import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-
-public class RelTest_matches {
-
- @Test
- public void whenDoes() throws Exception {
- assertThat(Rel.ACTION.matches(Rel.ACTION), is(true));
- }
-
- @Test
- public void whenDoesNot() throws Exception {
- assertThat(Rel.ACTION.matches(Rel.ACTION_PARAM), is(false));
- }
-
- @Test
- public void whenMatchesOnStr() throws Exception {
- assertThat(Rel.ACTION.matches(Rel.ACTION.getName()), is(true));
- }
-
- @Test
- public void whenMatchesOnStrWithParams() throws Exception {
- assertThat(Rel.ACTION.matches(Rel.ACTION.andParam("foo", "bar")), is(true));
- }
-
-
-}
[46/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
new file mode 100644
index 0000000..dab2309
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.Aggregated;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.EmbeddedOnly
+@javax.jdo.annotations.Discriminator("AGGR")
+@Aggregated
+@ObjectType("AGGR")
+public class AggregatedEntity extends BaseEntity {
+
+ // {{ Name
+ private String name;
+
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
new file mode 100644
index 0000000..e54fd4f
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.AbstractContainedObject;
+
+public abstract class BaseEntity extends AbstractContainedObject {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
new file mode 100644
index 0000000..9a4d524
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDLC")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDLC")
+public class BidirWithListChildEntity extends AbstractDomainObject {
+
+ // {{ Parent (title #1)
+ private BidirWithListParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public BidirWithListParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final BidirWithListParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+ // {{ moveTo
+ @MemberOrder(sequence = "1")
+ public BidirWithListChildEntity moveTo(final BidirWithListParentEntity newParent) {
+ if (newParent == getParent()) {
+ // nothing to do
+ return this;
+ }
+ if (getParent() != null) {
+ getParent().removeChild(this);
+ }
+ newParent.getChildren().add(this);
+ this.setParent(newParent);
+ return this;
+ }
+
+ public BidirWithListParentEntity default0MoveTo() {
+ return getParent();
+ }
+
+ public List<BidirWithListParentEntity> choices0MoveTo() {
+ return getContainer().allInstances(BidirWithListParentEntity.class);
+ }
+
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
new file mode 100644
index 0000000..9e28e7d
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDLP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDLP")
+public class BidirWithListParentEntity extends BaseEntity {
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+
+ // {{ Children
+ @Persistent(mappedBy="parent")
+ private List<BidirWithListChildEntity> children = new ArrayList<BidirWithListChildEntity>();
+
+ @MemberOrder(sequence = "1")
+ public List<BidirWithListChildEntity> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final List<BidirWithListChildEntity> children) {
+ this.children = children;
+ }
+ // }}
+
+
+
+ // {{ newChild (action)
+ public BidirWithListChildEntity newChild(final String name) {
+ final BidirWithListChildEntity childEntity = newTransientInstance(BidirWithListChildEntity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+
+ // {{ removeChild (action)
+ public BidirWithListParentEntity removeChild(final BidirWithListChildEntity childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ childEntity.setParent(null);
+ }
+ return this;
+ }
+
+ public List<BidirWithListChildEntity> choices0RemoveChild() {
+ return getChildren();
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
new file mode 100644
index 0000000..a12eeec
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("BidirWithListParentEntities")
+@ObjectType("BidirWithListParentEntities")
+@DomainService
+public class BidirWithListParentEntityRepository extends AbstractEntityRepository<BidirWithListParentEntity> {
+
+ public BidirWithListParentEntityRepository() {
+ super(BidirWithListParentEntity.class, "BidirWithListParentEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public BidirWithListParentEntity newEntity(final String name) {
+ final BidirWithListParentEntity entity = newTransientInstance(BidirWithListParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
new file mode 100644
index 0000000..ecac7fe
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDSC")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDSC")
+public class BidirWithSetChildEntity extends AbstractDomainObject {
+
+ // {{ Parent (title #1)
+ private BidirWithSetParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public BidirWithSetParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final BidirWithSetParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+ // {{ moveTo
+ @MemberOrder(sequence = "1")
+ public BidirWithSetChildEntity moveTo(final BidirWithSetParentEntity newParent) {
+ if (newParent == getParent()) {
+ // nothing to do
+ return this;
+ }
+ if (getParent() != null) {
+ getParent().removeChild(this);
+ }
+ newParent.getChildren().add(this);
+ this.setParent(newParent);
+ return this;
+ }
+
+ public BidirWithSetParentEntity default0MoveTo() {
+ return getParent();
+ }
+
+ public List<BidirWithSetParentEntity> choices0MoveTo() {
+ return getContainer().allInstances(BidirWithSetParentEntity.class);
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
new file mode 100644
index 0000000..f106b39
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
@@ -0,0 +1,100 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("BDSP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("BDSP")
+public class BidirWithSetParentEntity extends BaseEntity {
+
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Children
+ @Persistent(mappedBy="parent")
+ private Set<BidirWithSetChildEntity> children = new HashSet<BidirWithSetChildEntity>();
+
+ @MemberOrder(sequence = "1")
+ public Set<BidirWithSetChildEntity> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final Set<BidirWithSetChildEntity> children) {
+ this.children = children;
+ }
+ // }}
+
+
+ // {{ newChild (action)
+ public BidirWithSetChildEntity newChild(final String name) {
+ final BidirWithSetChildEntity childEntity = newTransientInstance(BidirWithSetChildEntity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+
+ // {{ removeChild (action)
+ public BidirWithSetParentEntity removeChild(final BidirWithSetChildEntity childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ childEntity.setParent(null);
+ }
+ return this;
+ }
+
+ public List<BidirWithSetChildEntity> choices0RemoveChild() {
+ return Arrays.asList(getChildren().toArray(new BidirWithSetChildEntity[0]));
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
new file mode 100644
index 0000000..130c27e
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("BidirWithSetParentEntities")
+@ObjectType("BidirWithSetParentEntities")
+@DomainService
+public class BidirWithSetParentEntityRepository extends AbstractEntityRepository<BidirWithSetParentEntity> {
+
+ public BidirWithSetParentEntityRepository() {
+ super(BidirWithSetParentEntity.class, "BidirWithSetParentEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public BidirWithSetParentEntity newEntity(final String name) {
+ final BidirWithSetParentEntity entity = newTransientInstance(BidirWithSetParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
new file mode 100644
index 0000000..fb86419
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@ObjectType("CHLD")
+public class ChildEntity extends AbstractDomainObject {
+
+ // {{ Parent (title #1)
+ private ParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public ParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final ParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+ // {{ moveTo
+ @MemberOrder(sequence = "1")
+ public ChildEntity moveTo(final ParentEntity newParent) {
+ if (newParent == getParent()) {
+ // nothing to do
+ return this;
+ }
+ if (getParent() != null) {
+ getParent().removeChild(this);
+ }
+ newParent.getChildren().add(this);
+ this.setParent(newParent);
+ return this;
+ }
+
+ public ParentEntity default0MoveTo() {
+ return getParent();
+ }
+
+ public List<ParentEntity> choices0MoveTo() {
+ return getContainer().allInstances(ParentEntity.class);
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
new file mode 100644
index 0000000..6abc29a
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
@@ -0,0 +1,128 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.NotPersisted;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@ObjectType("PRNT")
+public class ParentEntity extends BaseEntity {
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+ // {{ HomogeneousCollection
+ private List<SimpleEntity> homogeneousCollection = new ArrayList<SimpleEntity>();
+
+ public List<SimpleEntity> getHomogeneousCollection() {
+ return homogeneousCollection;
+ }
+
+ public void setHomogeneousCollection(final List<SimpleEntity> homogenousCollection) {
+ this.homogeneousCollection = homogenousCollection;
+ }
+
+ // }}
+
+ // {{ HeterogeneousCollection
+ private List<BaseEntity> heterogeneousCollection = new ArrayList<BaseEntity>();
+
+ public List<BaseEntity> getHeterogeneousCollection() {
+ return heterogeneousCollection;
+ }
+
+ public void setHeterogeneousCollection(final List<BaseEntity> hetrogenousCollection) {
+ this.heterogeneousCollection = hetrogenousCollection;
+ }
+
+ // }}
+
+ // {{ Children
+ private Set<ChildEntity> children = new HashSet<ChildEntity>();
+
+ @MemberOrder(sequence = "1")
+ public Set<ChildEntity> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final Set<ChildEntity> children) {
+ this.children = children;
+ }
+ // }}
+
+
+ // {{ NotPersisted
+ @NotPersisted
+ public List<SimpleEntity> getNotPersisted() {
+ throw new org.apache.isis.applib.NonRecoverableException("unexpected call");
+ }
+ // }}
+
+
+
+ // {{ newChild (action)
+ public ChildEntity newChild(final String name) {
+ final ChildEntity childEntity = newTransientInstance(ChildEntity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+
+ // {{ removeChild (action)
+ public ParentEntity removeChild(final ChildEntity childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ childEntity.setParent(null);
+ }
+ return this;
+ }
+
+ public Set<ChildEntity> choices0RemoveChild() {
+ return getChildren();
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
new file mode 100644
index 0000000..25ef44d
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("ParentEntities")
+@ObjectType("ParentEntities")
+@DomainService
+public class ParentEntityRepository extends AbstractEntityRepository<ParentEntity> {
+
+ public ParentEntityRepository() {
+ super(ParentEntity.class, "ParentEntities");
+ }
+
+ public BaseEntity someAction() { return null; }
+
+ public SimpleEntity someAction2() { return null; }
+
+ public ReferencingEntity someAction3() { return null; }
+
+ @MemberOrder(sequence = "2")
+ public ParentEntity newEntity(final String name) {
+ final ParentEntity entity = newTransientInstance(ParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
new file mode 100644
index 0000000..364b693
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.util.List;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCCH")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PCCH")
+public abstract class PolyClassChildEntity extends AbstractDomainObject {
+
+ // {{ Parent (title #1)
+ private PolyClassParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public PolyClassParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final PolyClassParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+ // {{ moveTo
+ @MemberOrder(sequence = "1")
+ public PolyClassChildEntity moveTo(final PolyClassParentEntity newParent) {
+ if (newParent == getParent()) {
+ // nothing to do
+ return this;
+ }
+ if (getParent() != null) {
+ getParent().removeChild(this);
+ }
+ newParent.getChildren().add(this);
+ this.setParent(newParent);
+ return this;
+ }
+
+ public PolyClassParentEntity default0MoveTo() {
+ return getParent();
+ }
+
+ public List<PolyClassParentEntity> choices0MoveTo() {
+ return getContainer().allInstances(PolyClassParentEntity.class);
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
new file mode 100644
index 0000000..d8f6594
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCPR")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("PCPR")
+public class PolyClassParentEntity extends BaseEntity {
+
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Children
+ @Persistent(mappedBy="parent")
+ private Set<PolyClassChildEntity> children = new HashSet<PolyClassChildEntity>();
+
+ @MemberOrder(sequence = "1")
+ public Set<PolyClassChildEntity> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final Set<PolyClassChildEntity> children) {
+ this.children = children;
+ }
+ // }}
+
+
+ // {{ newSubtype1 (action)
+ public PolyClassSubtype1Entity newSubtype1(final String name, int foo) {
+ final PolyClassSubtype1Entity childEntity = newTransientInstance(PolyClassSubtype1Entity.class);
+ childEntity.setName(name);
+ childEntity.setFoo(foo);
+ childEntity.setParent(this);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ newSubtype2 (action)
+ public PolyClassSubtype2Entity newSubtype2(final String name, String bar) {
+ final PolyClassSubtype2Entity childEntity = newTransientInstance(PolyClassSubtype2Entity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ childEntity.setBar(bar);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ newSubtype3 (action)
+ public PolyClassSubtype3Entity newSubtype3(final String name, BigDecimal boz) {
+ final PolyClassSubtype3Entity childEntity = newTransientInstance(PolyClassSubtype3Entity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ childEntity.setBoz(boz);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ removeChild (action)
+ public PolyClassParentEntity removeChild(final PolyClassChildEntity childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ childEntity.setParent(null);
+ }
+ return this;
+ }
+
+ public List<PolyClassChildEntity> choices0RemoveChild() {
+ return Arrays.asList(getChildren().toArray(new PolyClassChildEntity[0]));
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
new file mode 100644
index 0000000..a358cfd
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("PolyClassParentEntities")
+@ObjectType("PolyClassParentEntities")
+@DomainService
+public class PolyClassParentEntityRepository extends AbstractEntityRepository<PolyClassParentEntity> {
+
+ public PolyClassParentEntityRepository() {
+ super(PolyClassParentEntity.class, "PolyClassParentEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public PolyClassParentEntity newEntity(final String name) {
+ final PolyClassParentEntity entity = newTransientInstance(PolyClassParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+
+ @Hidden
+ public void registerType(PolyClassSubtype1Entity e) { }
+
+ @Hidden
+ public void registerType(PolyClassSubtype2Entity e) { }
+
+ @Hidden
+ public void registerType(PolyClassSubtype3Entity e) { }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
new file mode 100644
index 0000000..91bb8bb
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCS1")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PCS1")
+public class PolyClassSubtype1Entity extends PolyClassChildEntity {
+
+
+
+ // {{ Foo (property)
+ private int foo;
+
+ @MemberOrder(sequence = "1")
+ public int getFoo() {
+ return foo;
+ }
+
+ public void setFoo(final int foo) {
+ this.foo = foo;
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
new file mode 100644
index 0000000..745f518
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCS2")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
+@ObjectType("PCS2")
+public class PolyClassSubtype2Entity extends PolyClassChildEntity {
+
+
+ // {{ Bar (property)
+ private String bar;
+
+ @MemberOrder(sequence = "1")
+ public String getBar() {
+ return bar;
+ }
+
+ public void setBar(final String bar) {
+ this.bar = bar;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
new file mode 100644
index 0000000..d6fdfe4
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PCS3")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
+@ObjectType("PCS3")
+public class PolyClassSubtype3Entity extends PolyClassChildEntity {
+
+
+
+ // {{ Baz (property)
+ private java.math.BigDecimal boz;
+
+ @MemberOrder(sequence = "1")
+ public java.math.BigDecimal getBoz() {
+ return boz;
+ }
+
+ public void setBoz(final java.math.BigDecimal baz) {
+ this.boz = baz;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
new file mode 100644
index 0000000..888f5f8
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+
+public interface PolyInterface {
+
+ public PolyInterfaceParentEntity getParent();
+ public void setParent(PolyInterfaceParentEntity parent);
+
+ public String getName();
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
new file mode 100644
index 0000000..c7a258d
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+
+public interface PolyInterfaceIdentityStrategy {
+
+ public PolyInterfaceIdentityStrategyParentEntity getParent();
+ public void setParent(PolyInterfaceIdentityStrategyParentEntity parent);
+
+ public String getName();
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
new file mode 100644
index 0000000..045b67b
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntity.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.Extension;
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Join;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIIP")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("PIIP")
+public class PolyInterfaceIdentityStrategyParentEntity extends BaseEntity {
+
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Children
+ @Persistent
+ @Join
+ @Extension(vendorName="datanucleus", key="mapping-strategy", value="identity")
+ private Set<PolyInterfaceIdentityStrategy> children = new HashSet<PolyInterfaceIdentityStrategy>();
+
+ @MemberOrder(sequence = "1")
+ public Set<PolyInterfaceIdentityStrategy> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final Set<PolyInterfaceIdentityStrategy> children) {
+ this.children = children;
+ }
+ // }}
+
+
+ // {{ newSubtype1 (action)
+ public PolyInterfaceIdentityStrategySubtype1Entity newSubtype1(final String name, int foo) {
+ final PolyInterfaceIdentityStrategySubtype1Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype1Entity.class);
+ childEntity.setName(name);
+ childEntity.setFoo(foo);
+ childEntity.setParent(this);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ newSubtype2 (action)
+ public PolyInterfaceIdentityStrategySubtype2Entity newSubtype2(final String name, String bar) {
+ final PolyInterfaceIdentityStrategySubtype2Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype2Entity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ childEntity.setBar(bar);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ newSubtype3 (action)
+ public PolyInterfaceIdentityStrategySubtype3Entity newSubtype3(final String name, BigDecimal boz) {
+ final PolyInterfaceIdentityStrategySubtype3Entity childEntity = newTransientInstance(PolyInterfaceIdentityStrategySubtype3Entity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ childEntity.setBoz(boz);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ removeChild (action)
+ public PolyInterfaceIdentityStrategyParentEntity removeChild(final PolyInterfaceIdentityStrategy childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ childEntity.setParent(null);
+ }
+ return this;
+ }
+
+ public List<PolyInterfaceIdentityStrategy> choices0RemoveChild() {
+ return Arrays.asList(getChildren().toArray(new PolyInterfaceIdentityStrategy[0]));
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
new file mode 100644
index 0000000..232f177
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategyParentEntityRepository.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("PolyInterfaceIdentityStrategyParentEntities")
+@ObjectType("PolyInterfaceIdentityStrategyParentEntities")
+@DomainService
+public class PolyInterfaceIdentityStrategyParentEntityRepository extends AbstractEntityRepository<PolyInterfaceIdentityStrategyParentEntity> {
+
+ public PolyInterfaceIdentityStrategyParentEntityRepository() {
+ super(PolyInterfaceIdentityStrategyParentEntity.class, "PolyInterfaceIdentityStrategyParentEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public PolyInterfaceIdentityStrategyParentEntity newEntity(final String name) {
+ final PolyInterfaceIdentityStrategyParentEntity entity = newTransientInstance(PolyInterfaceIdentityStrategyParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+
+ @Hidden
+ public void registerType(PolyInterfaceIdentityStrategySubtype1Entity e) { }
+
+ @Hidden
+ public void registerType(PolyInterfaceIdentityStrategySubtype2Entity e) { }
+
+ @Hidden
+ public void registerType(PolyInterfaceIdentityStrategySubtype3Entity e) { }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
new file mode 100644
index 0000000..461c317
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype1Entity.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PII1")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PII1")
+public class PolyInterfaceIdentityStrategySubtype1Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
+
+
+
+ // {{ Parent (title #1)
+ private PolyInterfaceIdentityStrategyParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public PolyInterfaceIdentityStrategyParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Foo (property)
+ private int foo;
+
+ @MemberOrder(sequence = "1")
+ public int getFoo() {
+ return foo;
+ }
+
+ public void setFoo(final int foo) {
+ this.foo = foo;
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
new file mode 100644
index 0000000..d7bacbd
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype2Entity.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PII2")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PII2")
+public class PolyInterfaceIdentityStrategySubtype2Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
+
+
+ // {{ Parent (title #1)
+ private PolyInterfaceIdentityStrategyParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public PolyInterfaceIdentityStrategyParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Bar (property)
+ private String bar;
+
+ @MemberOrder(sequence = "1")
+ public String getBar() {
+ return bar;
+ }
+
+ public void setBar(final String bar) {
+ this.bar = bar;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
new file mode 100644
index 0000000..c15dc71
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategySubtype3Entity.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIIS3")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PIIS3")
+public class PolyInterfaceIdentityStrategySubtype3Entity extends BaseEntity implements PolyInterfaceIdentityStrategy {
+
+
+
+ // {{ Parent (title #1)
+ private PolyInterfaceIdentityStrategyParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public PolyInterfaceIdentityStrategyParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final PolyInterfaceIdentityStrategyParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Baz (property)
+ private java.math.BigDecimal boz;
+
+ @MemberOrder(sequence = "1")
+ public java.math.BigDecimal getBoz() {
+ return boz;
+ }
+
+ public void setBoz(final java.math.BigDecimal baz) {
+ this.boz = baz;
+ }
+ // }}
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java
new file mode 100644
index 0000000..144d401
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntity.java
@@ -0,0 +1,127 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import java.math.BigDecimal;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Join;
+import javax.jdo.annotations.Persistent;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIPR")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@ObjectType("PIPR")
+public class PolyInterfaceParentEntity extends BaseEntity {
+
+
+ // {{ Name (also title)
+ private String name;
+
+ @Title
+ @MemberOrder(sequence = "1")
+ @Optional
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Children
+ @Persistent
+ @Join
+ private Set<PolyInterface> children = new HashSet<PolyInterface>();
+
+ @MemberOrder(sequence = "1")
+ public Set<PolyInterface> getChildren() {
+ return children;
+ }
+
+ public void setChildren(final Set<PolyInterface> children) {
+ this.children = children;
+ }
+ // }}
+
+
+ // {{ newSubtype1 (action)
+ public PolyInterfaceSubtype1Entity newSubtype1(final String name, int foo) {
+ final PolyInterfaceSubtype1Entity childEntity = newTransientInstance(PolyInterfaceSubtype1Entity.class);
+ childEntity.setName(name);
+ childEntity.setFoo(foo);
+ childEntity.setParent(this);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ newSubtype2 (action)
+ public PolyInterfaceSubtype2Entity newSubtype2(final String name, String bar) {
+ final PolyInterfaceSubtype2Entity childEntity = newTransientInstance(PolyInterfaceSubtype2Entity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ childEntity.setBar(bar);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ newSubtype3 (action)
+ public PolyInterfaceSubtype3Entity newSubtype3(final String name, BigDecimal boz) {
+ final PolyInterfaceSubtype3Entity childEntity = newTransientInstance(PolyInterfaceSubtype3Entity.class);
+ childEntity.setName(name);
+ childEntity.setParent(this);
+ childEntity.setBoz(boz);
+ this.getChildren().add(childEntity);
+ persistIfNotAlready(childEntity);
+ return childEntity;
+ }
+ // }}
+
+ // {{ removeChild (action)
+ public PolyInterfaceParentEntity removeChild(final PolyInterface childEntity) {
+ if (getChildren().contains(childEntity)) {
+ getChildren().remove(childEntity);
+ childEntity.setParent(null);
+ }
+ return this;
+ }
+
+ public List<PolyInterface> choices0RemoveChild() {
+ return Arrays.asList(getChildren().toArray(new PolyInterface[0]));
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java
new file mode 100644
index 0000000..5d302e4
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceParentEntityRepository.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import org.apache.isis.applib.annotation.*;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("PolyInterfaceParentEntities")
+@ObjectType("PolyInterfaceParentEntities")
+@DomainService
+public class PolyInterfaceParentEntityRepository extends AbstractEntityRepository<PolyInterfaceParentEntity> {
+
+ public PolyInterfaceParentEntityRepository() {
+ super(PolyInterfaceParentEntity.class, "PolyInterfaceParentEntities");
+ }
+
+ @MemberOrder(sequence = "2")
+ public PolyInterfaceParentEntity newEntity(final String name) {
+ final PolyInterfaceParentEntity entity = newTransientInstance(PolyInterfaceParentEntity.class);
+ entity.setName(name);
+ persist(entity);
+ return entity;
+ }
+
+
+ @Hidden
+ public void registerType(PolyInterfaceSubtype1Entity e) { }
+
+ @Hidden
+ public void registerType(PolyInterfaceSubtype2Entity e) { }
+
+ @Hidden
+ public void registerType(PolyInterfaceSubtype3Entity e) { }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java
new file mode 100644
index 0000000..eedc86a
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype1Entity.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIS1")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PIS1")
+public class PolyInterfaceSubtype1Entity extends BaseEntity implements PolyInterface {
+
+
+
+ // {{ Parent (title #1)
+ private PolyInterfaceParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public PolyInterfaceParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final PolyInterfaceParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Foo (property)
+ private int foo;
+
+ @MemberOrder(sequence = "1")
+ public int getFoo() {
+ return foo;
+ }
+
+ public void setFoo(final int foo) {
+ this.foo = foo;
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java
new file mode 100644
index 0000000..ec64f86
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceSubtype2Entity.java
@@ -0,0 +1,86 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.refs;
+
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.Inheritance;
+import javax.jdo.annotations.InheritanceStrategy;
+
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
+@javax.jdo.annotations.Discriminator("PIS2")
+@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
+@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
+@ObjectType("PIS2")
+public class PolyInterfaceSubtype2Entity extends BaseEntity implements PolyInterface {
+
+
+ // {{ Parent (title #1)
+ private PolyInterfaceParentEntity parent;
+
+ @Title(sequence="1", append="-")
+ @MemberOrder(sequence = "1")
+ @Optional
+ public PolyInterfaceParentEntity getParent() {
+ return parent;
+ }
+
+ public void setParent(final PolyInterfaceParentEntity parent) {
+ this.parent = parent;
+ }
+
+ // }}
+
+ // {{ Name (title #2)
+ private String name;
+
+ @Title(sequence="2")
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // }}
+
+
+ // {{ Bar (property)
+ private String bar;
+
+ @MemberOrder(sequence = "1")
+ public String getBar() {
+ return bar;
+ }
+
+ public void setBar(final String bar) {
+ this.bar = bar;
+ }
+ // }}
+
+
+
+}
[44/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java
new file mode 100644
index 0000000..a926b25
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntity.java
@@ -0,0 +1,229 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.applib.annotation.Optional;
+import org.apache.isis.applib.annotation.Title;
+
+@javax.jdo.annotations.PersistenceCapable
+@javax.jdo.annotations.Discriminator("WRPV")
+@javax.jdo.annotations.Query(
+ name="wrpv_findByStringProperty", language="JDOQL",
+ value="SELECT FROM org.apache.isis.tck.dom.scalars.WrapperValuedEntity WHERE stringProperty == :i")
+@ObjectType("WRPV")
+public class WrapperValuedEntity extends AbstractDomainObject {
+
+ // {{ StringProperty (also pk, title)
+ private String stringProperty;
+
+ @javax.jdo.annotations.PrimaryKey
+ @Title
+ @Optional
+ @MemberOrder(sequence = "1")
+ public String getStringProperty() {
+ return stringProperty;
+ }
+
+ public void setStringProperty(final String stringProperty) {
+ this.stringProperty = stringProperty;
+ }
+
+ public WrapperValuedEntity updateStringProperty(
+ @Optional final String stringProperty) {
+ setStringProperty(stringProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ BooleanProperty
+ private Boolean booleanProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Boolean getBooleanProperty() {
+ return booleanProperty;
+ }
+
+ public void setBooleanProperty(final Boolean booleanProperty) {
+ this.booleanProperty = booleanProperty;
+ }
+
+ public WrapperValuedEntity updateBooleanProperty(@Optional final Boolean booleanProperty) {
+ setBooleanProperty(booleanProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ ByteProperty
+ private Byte byteProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Byte getByteProperty() {
+ return byteProperty;
+ }
+
+ public void setByteProperty(final Byte byteProperty) {
+ this.byteProperty = byteProperty;
+ }
+
+ public WrapperValuedEntity updateByteProperty(
+ @Optional final Byte byteProperty) {
+ setByteProperty(byteProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ ShortProperty
+ private Short shortProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Short getShortProperty() {
+ return shortProperty;
+ }
+
+ public void setShortProperty(final Short shortProperty) {
+ this.shortProperty = shortProperty;
+ }
+
+ public WrapperValuedEntity updateShortProperty(
+ @Optional final Short shortProperty) {
+ setShortProperty(shortProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ IntegerProperty
+ private Integer integerProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Integer getIntegerProperty() {
+ return integerProperty;
+ }
+
+ public void setIntegerProperty(final Integer integerProperty) {
+ this.integerProperty = integerProperty;
+ }
+
+ public WrapperValuedEntity updateIntegerProperty(
+ @Optional final Integer integerProperty) {
+ setIntegerProperty(integerProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ LongProperty
+ private Long longProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Long getLongProperty() {
+ return longProperty;
+ }
+
+ public void setLongProperty(final Long longProperty) {
+ this.longProperty = longProperty;
+ }
+
+ public WrapperValuedEntity updateLongProperty(
+ @Optional final Long longProperty) {
+ setLongProperty(longProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ FloatProperty
+ private Float floatProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Float getFloatProperty() {
+ return floatProperty;
+ }
+
+ public void setFloatProperty(final Float floatProperty) {
+ this.floatProperty = floatProperty;
+ }
+
+ public WrapperValuedEntity updateFloatProperty(
+ @Optional final Float floatProperty) {
+ setFloatProperty(floatProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ DoubleProperty
+ private Double doubleProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Double getDoubleProperty() {
+ return doubleProperty;
+ }
+
+ public void setDoubleProperty(final Double doubleProperty) {
+ this.doubleProperty = doubleProperty;
+ }
+
+ public WrapperValuedEntity updateDoubleProperty(
+ @Optional final Double doubleProperty) {
+ setDoubleProperty(doubleProperty);
+ return this;
+ }
+
+ // }}
+
+ // {{ CharacterProperty (property)
+ @javax.jdo.annotations.Column(jdbcType="char") // works for hsqldb
+ //@javax.jdo.annotations.Column(jdbcType="char", sqlType="char") // works for mssqlserver
+ private Character characterProperty;
+
+ @Optional
+ @MemberOrder(sequence = "1")
+ public Character getCharacterProperty() {
+ return characterProperty;
+ }
+
+ public void setCharacterProperty(final Character charProperty) {
+ this.characterProperty = charProperty;
+ }
+
+ public WrapperValuedEntity updateCharacterProperty(
+ @Optional final Character charProperty) {
+ setCharacterProperty(charProperty);
+ return this;
+ }
+
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java
new file mode 100644
index 0000000..e9f9eb9
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/scalars/WrapperValuedEntityRepository.java
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.scalars;
+
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.annotation.Named;
+import org.apache.isis.applib.annotation.ObjectType;
+import org.apache.isis.core.tck.dom.AbstractEntityRepository;
+
+@Named("WrapperValues")
+@ObjectType("WrapperValues")
+@DomainService
+public class WrapperValuedEntityRepository extends AbstractEntityRepository<WrapperValuedEntity> {
+
+ public WrapperValuedEntityRepository() {
+ super(WrapperValuedEntity.class, "WrapperValuedEntities");
+ }
+
+ /**
+ * Required to discover the WrapperValuedEntity type.
+ */
+ @Override
+ @MemberOrder(sequence = "2")
+ public WrapperValuedEntity newEntity() {
+ return super.newEntity();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java
new file mode 100644
index 0000000..07a648d
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/SqlDomainObjectRepository.java
@@ -0,0 +1,175 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.sqlos;
+
+import java.util.List;
+
+import org.apache.isis.applib.AbstractFactoryAndRepository;
+import org.apache.isis.core.tck.dom.poly.Empty;
+import org.apache.isis.core.tck.dom.poly.ReferencingPolyTypesEntity;
+import org.apache.isis.core.tck.dom.poly.SelfReferencingEntity;
+import org.apache.isis.core.tck.dom.poly.StringBaseEntitySub;
+import org.apache.isis.core.tck.dom.poly.StringBaseEntitySubThree;
+import org.apache.isis.core.tck.dom.poly.StringBaseEntitySubTwo;
+import org.apache.isis.core.tck.dom.poly.Stringable;
+import org.apache.isis.core.tck.dom.poly.StringableEntityWithOwnProperties;
+import org.apache.isis.core.tck.dom.poly.StringableEntityWithOwnProperty;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.sqlos.data.SimpleClass;
+import org.apache.isis.core.tck.dom.sqlos.data.SimpleClassTwo;
+import org.apache.isis.core.tck.dom.sqlos.data.SqlDataClass;
+
+/**
+ * @author Kevin
+ *
+ */
+public class SqlDomainObjectRepository extends AbstractFactoryAndRepository {
+
+ // {{ Persistor actions
+ public void save(final Object sqlDataClass) {
+ persistIfNotAlready(sqlDataClass);
+ }
+
+ public void delete(final Object sqlDataClass) {
+ remove(sqlDataClass);
+ }
+
+ public void update(final Object object) {
+ getContainer().objectChanged(object);
+ }
+
+ public void resolve(final Object domainObject) {
+ getContainer().resolve(domainObject);
+ }
+
+ // }}
+
+ // SqlDataClass
+ public List<SqlDataClass> allDataClasses() {
+ return allInstances(SqlDataClass.class);
+ }
+
+ public SqlDataClass newDataClass() {
+ final SqlDataClass object = newTransientInstance(SqlDataClass.class);
+ return object;
+ }
+
+
+ // SimpleClass
+ public SimpleClass newSimpleClass() {
+ final SimpleClass object = newTransientInstance(SimpleClass.class);
+ return object;
+ }
+
+ public List<SimpleClass> allSimpleClasses() {
+ return allInstances(SimpleClass.class);
+ }
+
+ public List<SimpleClass> allSimpleClassesThatMatch(final SimpleClass simpleClassMatch) {
+ return allMatches(SimpleClass.class, simpleClassMatch);
+ }
+
+
+ // SimpleClassTwo
+ public List<SimpleClassTwo> allSimpleClassTwos() {
+ return allInstances(SimpleClassTwo.class);
+ }
+
+ public SimpleClassTwo newSimpleClassTwo() {
+ final SimpleClassTwo object = newTransientInstance(SimpleClassTwo.class);
+ return object;
+ }
+
+ // PrimitiveValuedEntity
+ public List<PrimitiveValuedEntity> allPrimitiveValueEntities() {
+ return allInstances(PrimitiveValuedEntity.class);
+ }
+
+ public PrimitiveValuedEntity newPrimitiveValuedEntity() {
+ return newTransientInstance(PrimitiveValuedEntity.class);
+ }
+
+ public List<PrimitiveValuedEntity> allPrimitiveValuedEntitiesThatMatch(final PrimitiveValuedEntity match) {
+ return allMatches(PrimitiveValuedEntity.class, match);
+ }
+
+
+ // PolyTestClass
+ public ReferencingPolyTypesEntity newPolyTestClass() {
+ final ReferencingPolyTypesEntity object = newTransientInstance(ReferencingPolyTypesEntity.class);
+ return object;
+ }
+
+ public List<ReferencingPolyTypesEntity> allPolyTestClasses() {
+ return allInstances(ReferencingPolyTypesEntity.class);
+ }
+
+ public StringBaseEntitySub newPolySubClassOne() {
+ final StringBaseEntitySub object = newTransientInstance(StringBaseEntitySub.class);
+ return object;
+ }
+
+ public StringBaseEntitySubThree newPolySubClassThree() {
+ final StringBaseEntitySubThree object = newTransientInstance(StringBaseEntitySubThree.class);
+ return object;
+ }
+
+ public StringBaseEntitySubTwo newPolySubClassTwo() {
+ final StringBaseEntitySubTwo object = newTransientInstance(StringBaseEntitySubTwo.class);
+ return object;
+ }
+
+ public StringableEntityWithOwnProperty newPolyInterfaceImplA() {
+ final StringableEntityWithOwnProperty object = newTransientInstance(StringableEntityWithOwnProperty.class);
+ return object;
+ }
+
+ public StringableEntityWithOwnProperties newPolyInterfaceImplB() {
+ final StringableEntityWithOwnProperties object = newTransientInstance(StringableEntityWithOwnProperties.class);
+ return object;
+ }
+
+ public SelfReferencingEntity newPolySelfRefClass() {
+ final SelfReferencingEntity object = newTransientInstance(SelfReferencingEntity.class);
+ return object;
+ }
+
+ public List<Stringable> allPolyInterfaces() {
+ return allInstances(Stringable.class);
+ }
+
+ public List<Stringable> queryPolyInterfaces(final Stringable query) {
+ return allMatches(Stringable.class, query);
+ }
+
+ public List<Empty> allEmptyInterfacesThatMatch(final Empty match) {
+ return allMatches(Empty.class, match);
+ }
+
+ public List<SimpleClass> someSimpleClasses(final long startIndex, final long rowCount) {
+ return allInstances(SimpleClass.class, startIndex, rowCount);
+ }
+
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java
new file mode 100644
index 0000000..0b9888d
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClass.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.sqlos.data;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * @author Kevin
+ *
+ */
+public class SimpleClass extends AbstractDomainObject {
+ public String title() {
+ return string;
+ }
+
+ // {{ String type
+ private String string;
+
+ public String getString() {
+ return string;
+ }
+
+ public void setString(final String string) {
+ this.string = string;
+ }
+
+ // }}
+
+ // {{ SimpleClassTwoA
+ private SimpleClassTwo simplyClassTwoA;
+
+ public SimpleClassTwo getSimpleClassTwoA() {
+ return simplyClassTwoA;
+ }
+
+ public void setSimpleClassTwoA(final SimpleClassTwo simpleClassTwoA) {
+ this.simplyClassTwoA = simpleClassTwoA;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java
new file mode 100644
index 0000000..8fddc22
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SimpleClassTwo.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ *
+ */
+package org.apache.isis.core.tck.dom.sqlos.data;
+
+import org.apache.isis.applib.AbstractDomainObject;
+
+/**
+ * @author Kevin
+ *
+ */
+public class SimpleClassTwo extends AbstractDomainObject {
+
+ public String title() {
+ return text;
+ }
+
+ // {{ String type
+ public String text;
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(final String text) {
+ this.text = text;
+ }
+
+ // }}
+
+ // {{ IntValue
+ private int intValue;
+
+ public int getIntValue() {
+ return intValue;
+ }
+
+ public void setIntValue(final int value) {
+ this.intValue = value;
+ }
+
+ // }}
+
+ // {{ BooleanValue
+ private boolean booleanValue;
+
+ public boolean getBooleanValue() {
+ return booleanValue;
+ }
+
+ public void setBooleanValue(final boolean value) {
+ this.booleanValue = value;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java
new file mode 100644
index 0000000..c1c604b
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/sqlos/data/SqlDataClass.java
@@ -0,0 +1,338 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.sqlos.data;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.value.Color;
+import org.apache.isis.applib.value.Date;
+import org.apache.isis.applib.value.DateTime;
+import org.apache.isis.applib.value.Image;
+import org.apache.isis.applib.value.Money;
+import org.apache.isis.applib.value.Password;
+import org.apache.isis.applib.value.Percentage;
+import org.apache.isis.applib.value.Time;
+import org.apache.isis.applib.value.TimeStamp;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+
+/**
+ * The SqlDataClass is a test class used in the sql-persistor integration tests.
+ * It's properties are stored and retrieved using the persistor, to confirm
+ * accurate persistence behaviour.
+ *
+ * Each property here requires an equivalent test in
+ * {@link SqlIntegrationTestCommon}
+ *
+ * @author Kevin Meyer
+ *
+ */
+
+public class SqlDataClass extends AbstractDomainObject {
+
+ public String title() {
+ return string;
+ }
+
+ // {{ String
+ private String string;
+
+ public String getString() {
+ return string;
+ }
+
+ public void setString(final String string) {
+ this.string = string;
+ }
+
+ // }}
+
+ // {{ Isis Date
+ private Date date;
+
+ public Date getDate() {
+ return date;
+ }
+
+ public void setDate(final Date date) {
+ this.date = date;
+ }
+
+ // }}
+
+ // {{ java.sql Date
+ private java.sql.Date sqlDate;
+
+ @MemberOrder(sequence = "1")
+ public java.sql.Date getSqlDate() {
+ return sqlDate;
+ }
+
+ public void setSqlDate(final java.sql.Date sqlDate) {
+ this.sqlDate = sqlDate;
+ }
+
+ /**/
+
+ // }}
+
+ // {{ Isis Money
+ private Money money;
+
+ @MemberOrder(sequence = "1")
+ public Money getMoney() {
+ return money;
+ }
+
+ public void setMoney(final Money money) {
+ this.money = money;
+ }
+
+ // }}
+
+ // {{ Isis DateTime
+ private DateTime dateTime;
+
+ @MemberOrder(sequence = "1")
+ public DateTime getDateTime() {
+ return dateTime;
+ }
+
+ public void setDateTime(final DateTime dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ // }}
+
+ // {{ Isis TimeStamp
+ private TimeStamp timeStamp;
+
+ @MemberOrder(sequence = "1")
+ public TimeStamp getTimeStamp() {
+ return timeStamp;
+ }
+
+ public void setTimeStamp(final TimeStamp timeStamp) {
+ this.timeStamp = timeStamp;
+ }
+
+ // }}
+
+ // {{ Isis Time
+ private Time time;
+
+ @MemberOrder(sequence = "1")
+ public Time getTime() {
+ return time;
+ }
+
+ public void setTime(final Time time) {
+ this.time = time;
+ }
+
+ // }}
+
+ // {{ Isis Color
+ private Color color;
+
+ @MemberOrder(sequence = "1")
+ public Color getColor() {
+ return color;
+ }
+
+ public void setColor(final Color color) {
+ this.color = color;
+ }
+
+ // }}
+
+ // {{ Isis Image
+ private Image image;
+
+ @MemberOrder(sequence = "1")
+ public Image getImage() {
+ return image;
+ }
+
+ public void setImage(final Image image) {
+ this.image = image;
+ }
+ // }}
+
+ // {{ Isis Password
+ private Password password;
+
+ @MemberOrder(sequence = "1")
+ public Password getPassword() {
+ return password;
+ }
+
+ public void setPassword(final Password password) {
+ this.password = password;
+ }
+
+ // }}
+
+ // {{ Isis Percentage
+ private Percentage percentage;
+
+ @MemberOrder(sequence = "1")
+ public Percentage getPercentage() {
+ return percentage;
+ }
+
+ public void setPercentage(final Percentage percentage) {
+ this.percentage = percentage;
+ }
+
+ // }}
+
+
+ //
+ // References to other entities
+ //
+
+ // {{ SimpleClasses
+ public List<SimpleClass> simpleClasses1 = new ArrayList<SimpleClass>();
+
+ @MemberOrder(sequence = "1")
+ public List<SimpleClass> getSimpleClasses1() {
+ return simpleClasses1;
+ }
+
+ public void setSimpleClasses1(final List<SimpleClass> simpleClasses) {
+ this.simpleClasses1 = simpleClasses;
+ }
+
+ public void addToSimpleClasses1(final SimpleClass simpleClass) {
+ // check for no-op
+ if (simpleClass == null || getSimpleClasses1().contains(simpleClass)) {
+ return;
+ }
+ // associate new
+ getSimpleClasses1().add(simpleClass);
+ // additional business logic
+ onAddToSimpleClasses1(simpleClass);
+ }
+
+ public void removeFromSimpleClasses1(final SimpleClass simpleClass) {
+ // check for no-op
+ if (simpleClass == null || !getSimpleClasses1().contains(simpleClass)) {
+ return;
+ }
+ // dissociate existing
+ getSimpleClasses1().remove(simpleClass);
+ // additional business logic
+ onRemoveFromSimpleClasses1(simpleClass);
+ }
+
+ protected void onAddToSimpleClasses1(final SimpleClass simpleClass) {
+ }
+
+ protected void onRemoveFromSimpleClasses1(final SimpleClass simpleClass) {
+ }
+
+ // }}
+
+ // {{ SimpleClasses2
+ /**/
+ private List<SimpleClass> simpleClasses2 = new ArrayList<SimpleClass>();
+
+ @MemberOrder(sequence = "1")
+ public List<SimpleClass> getSimpleClasses2() {
+ return simpleClasses2;
+ }
+
+ public void setSimpleClasses2(final List<SimpleClass> simpleClasses) {
+ this.simpleClasses2 = simpleClasses;
+ }
+
+ public void addToSimpleClasses2(final SimpleClass simpleClass) {
+ // check for no-op
+ if (simpleClass == null || getSimpleClasses2().contains(simpleClass)) {
+ return;
+ }
+ // associate new
+ getSimpleClasses2().add(simpleClass);
+ // additional business logic
+ onAddToSimpleClasses2(simpleClass);
+ }
+
+ public void removeFromSimpleClasses2(final SimpleClass simpleClass) {
+ // check for no-op
+ if (simpleClass == null || !getSimpleClasses2().contains(simpleClass)) {
+ return;
+ }
+ // dissociate existing
+ getSimpleClasses2().remove(simpleClass);
+ // additional business logic
+ onRemoveFromSimpleClasses2(simpleClass);
+ }
+
+ protected void onAddToSimpleClasses2(final SimpleClass simpleClass) {
+ }
+
+ protected void onRemoveFromSimpleClasses2(final SimpleClass simpleClass) {
+ }
+
+ /**/
+ // }}
+
+ // {{ SimpleClassTwo
+ private SimpleClassTwo simplyClassTwo;
+
+ public SimpleClassTwo getSimpleClassTwo() {
+ return simplyClassTwo;
+ }
+
+ public void setSimpleClassTwo(final SimpleClassTwo simpleClassTwo) {
+ this.simplyClassTwo = simpleClassTwo;
+ }
+
+ // }}
+
+ // {{ PrimitiveValuedEntityMax
+ private PrimitiveValuedEntity pveMax;
+
+ public PrimitiveValuedEntity getPrimitiveValuedEntityMax() {
+ return pveMax;
+ }
+
+ public void setPrimitiveValuedEntityMax(final PrimitiveValuedEntity pveMax) {
+ this.pveMax = pveMax;
+ }
+
+ // }}
+
+ // {{ PrimitiveValuedEntityMin
+ private PrimitiveValuedEntity pveMin;
+
+ public PrimitiveValuedEntity getPrimitiveValuedEntityMin() {
+ return pveMin;
+ }
+
+ public void setPrimitiveValuedEntityMin(final PrimitiveValuedEntity pveMin) {
+ this.pveMin = pveMin;
+ }
+
+ // }}
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java
new file mode 100644
index 0000000..ab987c6
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/viewmodels/SimpleViewModel.java
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.viewmodels;
+
+import org.apache.isis.applib.AbstractDomainObject;
+import org.apache.isis.applib.ViewModel;
+import org.apache.isis.applib.annotation.MemberOrder;
+import org.apache.isis.applib.util.TitleBuffer;
+
+
+public class SimpleViewModel extends AbstractDomainObject implements ViewModel {
+
+ public String title() {
+ final TitleBuffer buf = new TitleBuffer();
+ buf.append(name);
+ return buf.toString();
+ }
+
+ // //////////////////////////////////////
+
+ private String name;
+
+ @MemberOrder(sequence = "1")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ // //////////////////////////////////////
+
+ @Override
+ public String viewModelMemento() {
+ return name;
+ }
+
+ @Override
+ public void viewModelInit(final String memento) {
+ setName(memento);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java
new file mode 100644
index 0000000..bd6d8be
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Person.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.xmlos;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+@ObjectType("PER")
+public class Person {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java
new file mode 100644
index 0000000..8c2b01f
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Role.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.xmlos;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+@ObjectType("RLE")
+public class Role {
+
+ // {{ Name (String)
+ public String name;
+ public String getName() {
+ return name;
+ }
+ public void setName(final String name) {
+ this.name = name;
+ }
+ // }}
+
+ // {{ Person (Person)
+ public Person person;
+ public Person getPerson() {
+ return person;
+ }
+ public void setPerson(final Person v) {
+ person = v;
+ }
+ public void modifyPerson(final Person person) {
+ setPerson(person);
+ }
+ public void clearPerson() {
+ setPerson(null);
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java
new file mode 100644
index 0000000..34ce6ea
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/Team.java
@@ -0,0 +1,27 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.xmlos;
+
+import org.apache.isis.applib.annotation.ObjectType;
+
+@ObjectType("TEA")
+public class Team {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java
new file mode 100644
index 0000000..bf6c494
--- /dev/null
+++ b/mothballed/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/xmlos/TeamDomainRepository.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.dom.xmlos;
+
+import java.util.List;
+
+import org.apache.isis.applib.DomainObjectContainer;
+
+public class TeamDomainRepository {
+
+ public List<Person> allPersons() {
+ return container.allInstances(Person.class);
+ }
+
+ public List<Role> allRoles() {
+ return container.allInstances(Role.class);
+ }
+
+ public List<Team> allTeams() {
+ return container.allInstances(Team.class);
+ }
+
+
+ // {{ injected: DomainObjectContainer
+ private DomainObjectContainer container;
+
+ public void setDomainObjectContainer(final DomainObjectContainer container) {
+ this.container = container;
+ }
+ // }}
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-dom/src/main/resources/images/ToDoItem.gif
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-dom/src/main/resources/images/ToDoItem.gif b/mothballed/tck/tck-dom/src/main/resources/images/ToDoItem.gif
new file mode 100644
index 0000000..cc536e1
Binary files /dev/null and b/mothballed/tck/tck-dom/src/main/resources/images/ToDoItem.gif differ
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/pom.xml b/mothballed/tck/tck-fixture/pom.xml
new file mode 100644
index 0000000..82c67b1
--- /dev/null
+++ b/mothballed/tck/tck-fixture/pom.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+--><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-tck-fixture</artifactId>
+ <name>Isis TCK Fixtures</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-dom</artifactId>
+ </dependency>
+ </dependencies>
+
+</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java
new file mode 100644
index 0000000..a815bbc
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/LogonAsSvenFixture.java
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture;
+
+import org.apache.isis.applib.fixtures.LogonFixture;
+
+public class LogonAsSvenFixture extends LogonFixture {
+
+ public LogonAsSvenFixture() {
+ super("sven");
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java
new file mode 100644
index 0000000..2a5e6ad
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/actions/ActionsEntityFixture.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.tck.fixture.actions;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.actions.ActionsEntity;
+import org.apache.isis.core.tck.dom.actions.ActionsEntityRepository;
+import org.apache.isis.core.tck.dom.busrules.BusRulesEntity;
+import org.apache.isis.core.tck.dom.busrules.BusRulesEntityRepository;
+
+public class ActionsEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity(1);
+ createEntity(2);
+ createEntity(3);
+ createEntity(4);
+ createEntity(5);
+ }
+
+ private ActionsEntity createEntity(Integer id) {
+ final ActionsEntity entity = repository.newEntity();
+ entity.setId(id);
+ return entity;
+ }
+
+ // {{ injected: ActionSemanticsEntityRepository
+ private ActionsEntityRepository repository;
+
+ public void setActionSemanticsEntityRepository(final ActionsEntityRepository repository) {
+ this.repository = repository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java
new file mode 100644
index 0000000..39a84c4
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/busrules/BusRulesEntityFixture.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.tck.fixture.busrules;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.busrules.BusRulesEntity;
+import org.apache.isis.core.tck.dom.busrules.BusRulesEntityRepository;
+
+public class BusRulesEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity(1);
+ createEntity(2);
+ createEntity(3);
+ createEntity(4);
+ createEntity(5);
+ }
+
+ private BusRulesEntity createEntity(Integer id) {
+ final BusRulesEntity entity = repository.newEntity();
+ entity.setId(id);
+ return entity;
+ }
+
+ // {{ injected: BusRulesEntityRepository
+ private BusRulesEntityRepository repository;
+
+ public void setBusRulesEntityRepository(final BusRulesEntityRepository repository) {
+ this.repository = repository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java
new file mode 100644
index 0000000..98fc917
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/defaults/WithDefaultsEntityFixture.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.core.tck.fixture.defaults;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.defaults.WithDefaultsEntity;
+import org.apache.isis.core.tck.dom.defaults.WithDefaultsEntityRepository;
+
+public class WithDefaultsEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity("John");
+ createEntity("Mary");
+ createEntity("Bill");
+ createEntity("Sally");
+ createEntity("Diedre");
+ }
+
+ private WithDefaultsEntity createEntity(final String name) {
+ final WithDefaultsEntity entity = repository.newTransientEntity();
+ persist(entity);
+ return entity;
+ }
+
+ // {{ injected: WithDefaultsEntityRepository
+ private WithDefaultsEntityRepository repository;
+
+ public void setWithDefaultsEntityRepository(final WithDefaultsEntityRepository repository) {
+ this.repository = repository;
+ }
+ // }}
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java
new file mode 100644
index 0000000..66e4eae
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/refs/ParentEntitiesFixture.java
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture.refs;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.refs.ParentEntity;
+import org.apache.isis.core.tck.dom.refs.ParentEntityRepository;
+
+public class ParentEntitiesFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity("parent 1");
+ createEntity("parent 2");
+ createEntity("parent 3");
+ createEntity("parent 4");
+ createEntity("parent 5");
+ }
+
+ private ParentEntity createEntity(final String name) {
+ final ParentEntity parent = parentEntityRepository.newEntity(name);
+ parent.newChild("child 1");
+ parent.newChild("child 2");
+ return parent;
+ }
+
+ private ParentEntityRepository parentEntityRepository;
+
+ public void setParentEntityRepository(final ParentEntityRepository parentEntityRepository) {
+ this.parentEntityRepository = parentEntityRepository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java
new file mode 100644
index 0000000..4581d26
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/ApplibValuedEntityFixture.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture.scalars;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.ApplibValuedEntityRepository;
+
+public class ApplibValuedEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ }
+
+ private ApplibValuedEntity createEntity() {
+ return applibValuesEntityRepository.newEntity();
+ }
+
+ private ApplibValuedEntityRepository applibValuesEntityRepository;
+
+ public void setApplibValuesEntityRepository(final ApplibValuedEntityRepository applibValuesEntityRepository) {
+ this.applibValuesEntityRepository = applibValuesEntityRepository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java
new file mode 100644
index 0000000..c77b359
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/DateTimeValuedEntityFixture.java
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture.scalars;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.scalars.DateTimeValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.DateTimeValuedEntityRepository;
+
+public class DateTimeValuedEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ }
+
+ private DateTimeValuedEntity createEntity() {
+ return dateTimeValuesEntityRepository.newEntity();
+ }
+
+ private DateTimeValuedEntityRepository dateTimeValuesEntityRepository;
+
+ public void setDateTimeValuesEntityRepository(final DateTimeValuedEntityRepository dateTimeValuesEntityRepository) {
+ this.dateTimeValuesEntityRepository = dateTimeValuesEntityRepository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java
new file mode 100644
index 0000000..73e5dd1
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JdkValuedEntityFixture.java
@@ -0,0 +1,81 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture.scalars;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.sql.Timestamp;
+import java.util.Date;
+import javax.inject.Inject;
+import org.joda.time.format.DateTimeFormat;
+import org.joda.time.format.DateTimeFormatter;
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.scalars.JdkValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.JdkValuedEntityRepository;
+import org.apache.isis.core.tck.dom.scalars.MyEnum;
+
+public class JdkValuedEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ }
+
+ private JdkValuedEntity createEntity() {
+ final JdkValuedEntity entity = jdkValuesEntityRepository.newEntity();
+ entity.setBigDecimalProperty(new BigDecimal("12345678901234567890.1234567890"));
+ entity.setBigDecimalProperty2(new BigDecimal("123.45"));
+ entity.setBigIntegerProperty(new BigInteger("123456789012345678"));
+ entity.setBigIntegerProperty2(new BigInteger("12345"));
+ entity.setJavaSqlDateProperty(asSqlDate("2014-04-24"));
+ entity.setJavaSqlTimeProperty(asSqlTime("1970-01-01T12:34:45Z"));
+ entity.setJavaSqlTimestampProperty(new Timestamp(1234567890));
+ entity.setJavaUtilDateProperty(asDateTime("2013-05-25T12:34:45Z"));
+ entity.setMyEnum(MyEnum.RED);
+ return entity;
+ }
+
+ private final static DateTimeFormatter yyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd").withZoneUTC();
+ private final static DateTimeFormatter yyyyMMddTHHmmssZ = DateTimeFormat.forPattern("yyyy-MM-dd'T'HH:mm:ssZ").withZoneUTC();
+
+ private static Date asDate(final String text) {
+ return new java.util.Date(yyyyMMdd.parseDateTime(text).getMillis());
+ }
+
+ private static Date asDateTime(final String text) {
+ return new java.util.Date(yyyyMMddTHHmmssZ.parseDateTime(text).getMillis());
+ }
+
+ private static java.sql.Date asSqlDate(final String text) {
+ return new java.sql.Date(yyyyMMdd.parseDateTime(text).getMillis());
+ }
+
+ private static java.sql.Time asSqlTime(final String text) {
+ return new java.sql.Time(yyyyMMddTHHmmssZ.parseDateTime(text).getMillis());
+ }
+
+ @Inject
+ private JdkValuedEntityRepository jdkValuesEntityRepository;
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java
new file mode 100644
index 0000000..42cb18b
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/JodaValuedEntityFixture.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture.scalars;
+
+import org.joda.time.DateTime;
+import org.joda.time.DateTimeZone;
+import org.joda.time.LocalDate;
+import org.joda.time.LocalDateTime;
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.scalars.JodaValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.JodaValuedEntityRepository;
+
+public class JodaValuedEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ }
+
+ private JodaValuedEntity createEntity() {
+ final JodaValuedEntity jve = jodaValuesEntityRepository.newEntity();
+ jve.setLocalDateProperty(new LocalDate(2008,3,21));
+ jve.setLocalDateTimeProperty(new LocalDateTime(2009, 4, 29, 13, 45, 22));
+ jve.setDateTimeProperty(new DateTime(2010, 3, 31, 9, 50, 43, DateTimeZone.UTC));
+ return jve;
+ }
+
+ private JodaValuedEntityRepository jodaValuesEntityRepository;
+
+ public void setJdkValuesEntityRepository(final JodaValuedEntityRepository jodaValuesEntityRepository) {
+ this.jodaValuesEntityRepository = jodaValuesEntityRepository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java
new file mode 100644
index 0000000..e9db111
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/PrimitiveValuedEntityFixture.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture.scalars;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.PrimitiveValuedEntityRepository;
+
+public class PrimitiveValuedEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ }
+
+ private PrimitiveValuedEntity createEntity() {
+ final PrimitiveValuedEntity pve = primitiveValuesEntityRepository.newEntity();
+ pve.setBooleanProperty(true);
+ pve.setByteProperty((byte)123);
+ pve.setShortProperty((short)32123);
+ pve.setCharProperty('a');
+ pve.setIntProperty(987654321);
+ pve.setLongProperty(2345678901234567890L);
+ pve.setFloatProperty(12345678901234567890.1234567890F);
+ pve.setDoubleProperty(12345678901234567890.1234567890);
+ return pve;
+ }
+
+ private PrimitiveValuedEntityRepository primitiveValuesEntityRepository;
+
+ public void setPrimitiveValuesEntityRepository(final PrimitiveValuedEntityRepository primitiveValuesEntityRepository) {
+ this.primitiveValuesEntityRepository = primitiveValuesEntityRepository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java
new file mode 100644
index 0000000..0d9d869
--- /dev/null
+++ b/mothballed/tck/tck-fixture/src/main/java/org/apache/isis/core/tck/fixture/scalars/WrapperValuedEntityFixture.java
@@ -0,0 +1,57 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.core.tck.fixture.scalars;
+
+import org.apache.isis.applib.fixtures.AbstractFixture;
+import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntity;
+import org.apache.isis.core.tck.dom.scalars.WrapperValuedEntityRepository;
+
+public class WrapperValuedEntityFixture extends AbstractFixture {
+
+ @Override
+ public void install() {
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ createEntity();
+ }
+
+ private WrapperValuedEntity createEntity() {
+ final WrapperValuedEntity wve = wrapperValuesEntityRepository.newEntity();
+ wve.setBooleanProperty(true);
+ wve.setByteProperty((byte)123);
+ wve.setShortProperty((short)32123);
+ wve.setCharacterProperty('a');
+ wve.setIntegerProperty(987654321);
+ wve.setLongProperty(2345678901234567890L);
+ wve.setFloatProperty(12345678901234567890.1234567890F);
+ wve.setDoubleProperty(12345678901234567890.1234567890);
+
+ return wve;
+ }
+
+ private WrapperValuedEntityRepository wrapperValuesEntityRepository;
+
+ public void setPrimitiveValuesEntityRepository(final WrapperValuedEntityRepository wrapperValuesEntityRepository) {
+ this.wrapperValuesEntityRepository = wrapperValuesEntityRepository;
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/lib/.gitignore
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/lib/.gitignore b/mothballed/tck/tck-integtests/lib/.gitignore
new file mode 100644
index 0000000..4c21459
--- /dev/null
+++ b/mothballed/tck/tck-integtests/lib/.gitignore
@@ -0,0 +1,24 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# explicitly ignoring Microsoft JDBC4 jar
+# (cannot redistribute, licensing)
+#
+sqljdbc4.jar
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-integtests/pom.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-integtests/pom.xml b/mothballed/tck/tck-integtests/pom.xml
new file mode 100644
index 0000000..dee873d
--- /dev/null
+++ b/mothballed/tck/tck-integtests/pom.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck</artifactId>
+ <version>1.9.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>isis-tck-integtests</artifactId>
+ <name>Isis TCK IntegTests</name>
+
+ <properties>
+ <siteBaseDir>..</siteBaseDir>
+ <relativeUrl>objectstore-jdo-datanucleus/</relativeUrl>
+ </properties>
+
+ <!-- used in Site generation for relative references. -->
+ <url>http://isis.apache.org/${relativeUrl}</url>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ <filtering>false</filtering>
+ <includes>
+ <include>**</include>
+ </includes>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skipTests>true</skipTests>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-unittestsupport</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-runtime</artifactId>
+ </dependency>
+
+ <!-- other modules in this project -->
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-dom</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.tck</groupId>
+ <artifactId>isis-tck-fixture</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-integtestsupport</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <!--
+ <dependency>
+ <groupId>com.microsoft.sqlserver</groupId>
+ <artifactId>jdbc</artifactId>
+ <version>4.0</version>
+ <scope>system</scope>
+ <optional>true</optional>
+ <systemPath>${basedir}/lib/sqljdbc4.jar</systemPath>
+ </dependency>
+ -->
+
+ </dependencies>
+</project>
[04/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
deleted file mode 100644
index dc1f374..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentLength_ok.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentLength_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getDomainServiceResource();
- }
-
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.services();
-
- // when
- final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java
deleted file mode 100644
index 5a42dbe..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_thenResponseHeaders_ContentType_ok.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasParameter;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasSubType;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_ContentType_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getDomainServiceResource();
- }
-
-
- @Test
- public void contentType_and_cacheControl() throws Exception {
- // given
- final Response resp = resource.services();
-
- // when
- final RestfulResponse<ListRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- final MediaType contentType = restfulResponse.getHeader(Header.CONTENT_TYPE);
- assertThat(contentType, hasMediaType("application"));
- assertThat(contentType, hasSubType("json"));
- assertThat(contentType, hasParameter("profile", "urn:org.restfulobjects:repr-types/list"));
- assertThat(contentType, is(RepresentationType.LIST.getMediaType()));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index 988ff31..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "services");
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java
deleted file mode 100644
index 9cee7e4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenQueryArg_xRoFollowLinks_ok.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.hamcrest.CoreMatchers.containsString;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.hamcrest.Matchers.greaterThan;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenQueryArg_xRoFollowLinks_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- private RestfulRequest request;
- private RestfulResponse<ListRepresentation> restfulResponse;
- private ListRepresentation repr;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- }
-
- @Test
- public void noFollow() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "services");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getSelf().getValue(), is(nullValue()));
- assertThat(repr.getUp().getValue(), is(nullValue()));
- }
-
- @Test
- public void self() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "services")
- .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.SELF.getName() + "]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getSelf().getValue(), is(not(nullValue())));
- }
-
- @Test
- public void up() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "services")
- .withArg(RequestParameter.FOLLOW_LINKS, "links[rel=" + Rel.UP.getName() + "]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- assertThat(repr.getUp().getValue(), is(not(nullValue())));
- }
-
- @Test
- public void value_noQualifications_andSoAllOfThemEagerlyReturned() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "services")
- .withArg(RequestParameter.FOLLOW_LINKS, "value[rel=" + Rel.SERVICE.getName() + "]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- request = client.createRequest(RestfulHttpMethod.GET, "services")
- .withArg(RequestParameter.FOLLOW_LINKS, "value");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- // then
- for (final LinkRepresentation link : repr.getValue().arrayIterable(LinkRepresentation.class)) {
-
- assertThat(link, isLink(client)
- .rel(containsString(Rel.SERVICE.getName()))
- .href(containsString(":39393/"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.DOMAIN_OBJECT.getMediaType())
- .value(is(not(nullValue(JsonRepresentation.class))))
- );
- }
-
- }
-
- @Test
- public void value_withQualification_andSoSingleServiceEagerlyReturned() throws Exception {
-
- request = client.createRequest(RestfulHttpMethod.GET, "services")
- .withArg(RequestParameter.FOLLOW_LINKS, "value[rel=" + Rel.SERVICE.getName() + ";serviceId=\"JdkValuedEntities\"]");
- restfulResponse = request.executeT();
- repr = restfulResponse.getEntity();
-
- // then
- int numWithValue = 0;
- int numWithoutValue = 0;
- for (final LinkRepresentation link : repr.getValue().arrayIterable(LinkRepresentation.class)) {
-
- if(isLink(client).value(is(not(nullValue(JsonRepresentation.class)))).build().matches(link)) {
- numWithValue++;
- } else {
- numWithoutValue++;
- }
- }
-
- assertThat(numWithValue, is(1));
- assertThat(numWithoutValue, is(greaterThan(0)));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
deleted file mode 100644
index 2bd52ec..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-public class Get_whenRequestHeaders_Accept_isInvalid_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java
deleted file mode 100644
index 8120709..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Get_whenRequestHeaders_Accept_ok.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.MediaType;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.jboss.resteasy.client.ClientRequest;
-import org.jboss.resteasy.client.ClientResponse;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenRequestHeaders_Accept_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "services");
- }
-
- @Test
- public void applicationJson_noProfile_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
- final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.LIST.getMediaType()));
- }
-
- @Test
- public void applicationJson_profileList_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.LIST.getMediaType());
- final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
- @Test
- public void missingHeader_returns200() throws Exception {
-
- final RestfulResponse<ListRepresentation> restfulResp = request.executeT();
-
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
- }
-
- @Test
- public void applicationJson_profileIncorrect_returns406() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
- final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
- }
-
- @Test
- public void incorrectMediaType_returnsNotAcceptable() throws Exception {
-
- // given
- final ClientRequest clientRequest = client.getClientRequestFactory().createRelativeRequest("services");
- clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
-
- // when
- final ClientResponse<?> resp = clientRequest.get();
- final RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(resp);
-
- // then
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java
deleted file mode 100644
index 4a9a9cf..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Post_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource domainServiceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainServiceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = domainServiceResource.service("ActionsEntities");
- final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation upLink = serviceRepr.getLinkWithRel(Rel.UP);
- final LinkRepresentation postLink = upLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the services resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java
deleted file mode 100644
index 2706a84..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/root/Put_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource domainServiceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainServiceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = domainServiceResource.service("ActionsEntities");
- final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation upLink = serviceRepr.getLinkWithRel(Rel.UP);
- final LinkRepresentation postLink = upLink.withMethod(RestfulHttpMethod.PUT);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the services resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java
deleted file mode 100644
index feb52dc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Delete_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource domainServiceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainServiceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = domainServiceResource.service("ActionsEntities");
- final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting a service resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
deleted file mode 100644
index 266c5de..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
deleted file mode 100644
index 3f0f956..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 0a62815..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_givenHiddenMembers_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-public class Get_givenHiddenMembers_thenRepresentation_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
deleted file mode 100644
index 85b2738..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenRepresentation_ok.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import javax.ws.rs.core.Response;
-import org.hamcrest.Matchers;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectMemberRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.matches;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.*;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.assertThat;
-
-public class Get_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response resp = resource.service("JdkValuedEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
-
- final DomainObjectRepresentation repr = jsonResp.getEntity();
-
- assertThat(repr, isMap());
-
- assertThat(repr.getTitle(), matches("JdkValuedEntities"));
-
- assertThat(repr.getDomainType(), is(nullValue()));
- assertThat(repr.getInstanceId(), is(nullValue()));
-
- assertThat(repr.getServiceId(), is("JdkValuedEntities"));
-
- assertThat(repr.getSelf(), isLink().httpMethod(RestfulHttpMethod.GET).build());
-
- assertThat(repr.getMembers(), isMap());
- assertThat(repr.getMembers().size(), is(2));
- DomainObjectMemberRepresentation listMemberRepr = repr.getAction("list");
-
- assertThat(listMemberRepr.getMemberType(), is("action"));
- assertThat(listMemberRepr.getDisabledReason(), is(nullValue()));
- assertThat(listMemberRepr.getLinks(), isArray());
- assertThat(listMemberRepr.getLinks().size(), is(1));
-
- LinkRepresentation listMemberReprDetailsLink = listMemberRepr.getLinkWithRel(Rel.DETAILS);
- assertThat(listMemberReprDetailsLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/services/JdkValuedEntities/actions/list"))
- .returning(HttpStatusCode.OK)
- .responseEntityWithSelfHref(listMemberReprDetailsLink.getHref()).build());
-
-
- assertThat(repr.getLinks(), isArray());
- assertThat(repr.getLinks().size(), is(3));
-
- // link to self (see above)
- // link to describedby
- LinkRepresentation describedByLink = repr.getLinkWithRel(Rel.DESCRIBEDBY);
- assertThat(describedByLink, isLink(client)
- .httpMethod(RestfulHttpMethod.GET)
- .href(endsWith("/domain-types/JdkValuedEntities")).build()
- );
- assertThat(describedByLink, isLink(client)
- .returning(HttpStatusCode.OK)
- .responseEntityWithSelfHref(describedByLink.getHref()).build());
-
- assertThat(repr.getLinkWithRel(Rel.PERSIST), is(nullValue()));
- assertThat(repr.getLinkWithRel(Rel.UPDATE), is(nullValue()));
- assertThat(repr.getLinkWithRel(Rel.DELETE), is(nullValue()));
-
- assertThat(repr.getExtensions(), isMap());
- assertThat(repr.getOid(), matches("JdkValuedEntities:28"));
- }
-
-
-
- @Test
- public void visibleAndInvocableAction() throws Exception {
-
- // given
- final Response resp = resource.service("BusinessRulesEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = jsonResp.getEntity();
-
- assertThat(repr, isMap());
-
- final DomainObjectMemberRepresentation actionRepr = repr.getAction("visibleAndInvocableAction");
- assertThat(actionRepr, isMap());
-
- assertThat(actionRepr.getDisabledReason(), is(nullValue()));
-
- final LinkRepresentation actionDetailsLink = actionRepr.getLinkWithRel(Rel.DETAILS);
- assertThat(actionDetailsLink, isLink(this.client)
- .rel(Rel.DETAILS)
- .httpMethod(RestfulHttpMethod.GET)
- .href(Matchers.endsWith(":39393/services/BusinessRulesEntities/actions/visibleAndInvocableAction"))
- .returning(HttpStatusCode.OK).build());
- }
-
-
- @Test
- public void visibleButNotInvocableAction() throws Exception {
-
- // given
- final Response resp = resource.service("BusinessRulesEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = jsonResp.getEntity();
-
- final DomainObjectMemberRepresentation actionRepr = repr.getAction("visibleButNotInvocableAction");
- assertThat(actionRepr, isMap());
-
- assertThat(actionRepr.getDisabledReason(), is("Always disabled"));
-
- final LinkRepresentation actionDetailsLink = actionRepr.getLinkWithRel(Rel.DETAILS);
-
- // even though not invocable, still can traverse to its details page
- assertThat(actionDetailsLink, isLink(this.client)
- .href(Matchers.endsWith(":39393/services/BusinessRulesEntities/actions/visibleButNotInvocableAction"))
- .returning(HttpStatusCode.OK).build());
- }
-
- @Test
- public void invisibleAction() throws Exception {
-
- // given
- final Response resp = resource.service("BusinessRulesEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = jsonResp.getEntity();
-
- assertThat(repr.getAction("invisibleAction"), is(nullValue()));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java
deleted file mode 100644
index 41e868c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_CacheControl_ok.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_CacheControl_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.service("JdkValuedEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- assertThat(jsonResp.getHeader(RestfulResponse.Header.CACHE_CONTROL).getMaxAge(), is(24 * 60 * 60));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
deleted file mode 100644
index 625e36b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentLength_ok.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentLength_ok {
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.service("JdkValuedEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(IsisMatchers.greaterThan(1000)));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java
deleted file mode 100644
index 85859b6..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_ContentType_ok.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_ContentType_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.service("JdkValuedEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- assertThat(jsonResp.getHeader(RestfulResponse.Header.CONTENT_TYPE), is(RepresentationType.DOMAIN_OBJECT.getMediaType("x-ro-domain-type", "http://localhost:39393/domain-types/JdkValuedEntities")));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java
deleted file mode 100644
index 5b44c0c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_thenResponseHeaders_eTag_ok.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_eTag_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.service("JdkValuedEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- // TOFIX: ROSPEC: update spec so this that an ETag is not required for services
- assertThat(jsonResp.getHeader(RestfulResponse.Header.ETAG), is(nullValue()));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java
deleted file mode 100644
index a2a2ed2..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_then_200_ok.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_then_200_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void ok() throws Exception {
- // given
- final Response resp = resource.service("JdkValuedEntities");
-
- // when
- final RestfulResponse<DomainObjectRepresentation> jsonResp = RestfulResponse.ofT(resp);
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java
deleted file mode 100644
index d9f758e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenDoesntExistId_thenResponseCode_404.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenDoesntExistId_thenResponseCode_404 {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private DomainServiceResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
-
- resource = client.getDomainServiceResource();
- }
-
- @Test
- public void notFound_usingTemplatedMethod() throws Exception {
-
- // when
- final Response resp = resource.service("nonExistentServiceId");
- final RestfulResponse<JsonRepresentation> jsonResp = RestfulResponse.of(resp);
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.NOT_FOUND));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index e7d13ce..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private RestfulRequest request;
-
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- String href = Util.givenLinkToService(client, "JdkValuedEntities");
- request = client.createRequest(RestfulHttpMethod.GET, href);
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java
deleted file mode 100644
index 0236708..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenQueryArg_xRoFollowLinks_ok.java
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import java.io.IOException;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Get_whenQueryArg_xRoFollowLinks_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- @Test
- public void self() throws Exception {
- final String href = givenHrefToService("WrapperValuedEntities");
-
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "links[rel=self]");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = restfulResponse.getEntity();
-
- assertThat(repr.getSelf().getValue(), is(not(nullValue())));
- }
-
- @Test
- public void toDescribedBy() throws Exception {
- final String href = givenHrefToService("WrapperValuedEntities");
-
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "links[rel=describedby]");
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = restfulResponse.getEntity();
-
- assertThat(repr.getLinkWithRel(Rel.DESCRIBEDBY).getValue(), is(not(nullValue())));
- }
-
- @Test
- public void toMembersDetails() throws Exception {
- final String href = givenHrefToService("WrapperValuedEntities");
-
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members.links[rel=%s]", Rel.DETAILS.getName());
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = restfulResponse.getEntity();
-
- final JsonRepresentation membersList = repr.getMembers();
- assertThat(membersList, isMap());
-
- JsonRepresentation actionRepr;
-
- actionRepr = membersList.getRepresentation("list");
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"]"), is(not(nullValue())));
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"].value"), is(not(nullValue()))); // followed
-
- actionRepr = membersList.getRepresentation("newEntity");
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"]"), is(not(nullValue())));
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.getName()+"].value"), is(not(nullValue()))); // also followed
- }
-
- @Test
- public void singleMember_specified_by_criteria() throws Exception {
-
- final String href = givenHrefToService("WrapperValuedEntities");
-
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s]", "list", Rel.DETAILS.andParam("action", "list"));
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = restfulResponse.getEntity();
-
- final JsonRepresentation membersList = repr.getMembers();
- assertThat(membersList, isMap());
-
- JsonRepresentation actionRepr;
-
- actionRepr = membersList.getRepresentation("list");
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"]"), is(not(nullValue())));
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"].value"), is(not(nullValue()))); // followed
-
- actionRepr = membersList.getRepresentation("newEntity");
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"]"), is(not(nullValue())));
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"].value"), is(nullValue())); // not followed
- }
-
- @Test
- public void toMultipleMembersDetails() throws Exception {
-
- final String href = givenHrefToService("WrapperValuedEntities");
-
- final RestfulRequest request = client.createRequest(RestfulHttpMethod.GET, href).withArg(RequestParameter.FOLLOW_LINKS, "members[%s].links[rel=%s],members[%s].links[rel=%s]", "list", Rel.DETAILS.andParam("action", "list"), "newEntity", Rel.DETAILS.andParam("action", "newEntity"));
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- final DomainObjectRepresentation repr = restfulResponse.getEntity();
-
- final JsonRepresentation membersList = repr.getMembers();
- assertThat(membersList, isMap());
-
- JsonRepresentation actionRepr;
-
- actionRepr = membersList.getRepresentation("list");
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"]"), is(not(nullValue())));
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "list")+"].value"), is(not(nullValue()))); // followed
-
- actionRepr = membersList.getRepresentation("newEntity");
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"]"), is(not(nullValue())));
- assertThat(actionRepr.getRepresentation("links[rel="+Rel.DETAILS.andParam("action", "newEntity")+"].value"), is(not(nullValue()))); // also followed
- }
-
- private String givenHrefToService(final String serviceId) throws IOException {
- return Util.givenHrefToService(client, serviceId);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
deleted file mode 100644
index 51284a6..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_isInvalid_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-public class Get_whenRequestHeaders_Accept_isInvalid_bad_TODO {
-
-}
[23/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
deleted file mode 100644
index 19d4986..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/MovieDomainRepository.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.movies;
-
-import java.util.List;
-
-import org.apache.isis.applib.DomainObjectContainer;
-
-public class MovieDomainRepository {
-
- public List<Person> allPersons() {
- return container.allInstances(Person.class);
- }
-
- public List<Movie> allMovies() {
- return container.allInstances(Movie.class);
- }
-
- public List<Role> allRoles() {
- return container.allInstances(Role.class);
- }
-
-
- // {{ injected: DomainObjectContainer
- private DomainObjectContainer container;
-
- public void setDomainObjectContainer(final DomainObjectContainer container) {
- this.container = container;
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
deleted file mode 100644
index 5eb7cd2..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Person.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.movies;
-
-import java.util.Date;
-
-import org.apache.isis.applib.annotation.ObjectType;
-
-@ObjectType("movies.PERSON")
-public class Person {
-
- public String title() {
- return name;
- }
-
- // {{ name: String
- private String name;
- public String getName() {
- return name;
- }
- public void setName(final String name) {
- this.name = name;
- }
- // }}
-
-
- // {{ Date: java.util.Date
- private Date date;
- public Date getDate() {
- return date;
- }
- public void setDate(final Date date) {
- this.date = date;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
deleted file mode 100644
index 6a8cd32..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Role.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.movies;
-
-import org.apache.isis.applib.annotation.ObjectType;
-
-
-@ObjectType("movies.ROLE")
-public class Role {
-
- public String title() {
- return name;
- }
-
- // {{ name: String
- private String name;
- public String getName() {
- return name;
- }
- public void setName(final String name) {
- this.name = name;
- }
- // }}
-
-
- // {{ actor: Person
- private Person actor;
- public Person getActor() {
- return actor;
- }
- public void setActor(final Person actor) {
- this.actor = actor;
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
deleted file mode 100755
index 1e4c352..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Empty.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.poly;
-
-public interface Empty {
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
deleted file mode 100644
index dd6190f..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/EmptyEntityWithOwnProperty.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.tck.dom.poly;
-
-
-public class EmptyEntityWithOwnProperty implements Empty {
-
- // {{ Special: string
- private String special;
-
- public String getSpecial() {
- return special;
- }
-
- public void setSpecial(final String special) {
- this.special = special;
- }
- // }}
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
deleted file mode 100755
index 3a73ff7..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/ReferencingPolyTypesEntity.java
+++ /dev/null
@@ -1,110 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.poly;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-/**
- * This class is the collection point of all the polymorphism and related tests.
- * There is nothing really special about it, it is just a placeholder for the
- * various tests related to polymorphism or recursion (JIRA ISIS-117 and
- * ISIS-118).
- *
- * @author Kevin
- *
- */
-public class ReferencingPolyTypesEntity extends AbstractDomainObject {
-
- public String title() {
- return string;
- }
-
- // {{ String type
- private String string;
-
- public String getString() {
- return string;
- }
-
- public void setString(final String string) {
- this.string = string;
- }
-
- // }}
-
- // {{ PolyBaseClass collection
- private List<StringBaseEntity> polyBaseClasses = new ArrayList<StringBaseEntity>();
-
- public List<StringBaseEntity> getPolyBaseClasses() {
- return polyBaseClasses;
- }
-
- public void setPolyBaseClasses(final List<StringBaseEntity> polyBaseClasses) {
- this.polyBaseClasses = polyBaseClasses;
- }
-
- // }}
-
- // {{ PolyInterfaceType: Can we store / restore properties by interface?
- private Stringable polyInterfaceType;
-
- public Stringable getPolyInterfaceType() {
- return polyInterfaceType;
- }
-
- public void setPolyInterfaceType(final Stringable polyInterfaceType) {
- this.polyInterfaceType = polyInterfaceType;
- }
-
- // }}
-
- // {{ PolyInterface collection
- private List<Stringable> stringables = new ArrayList<Stringable>();
-
- public List<Stringable> getPolyInterfaces() {
- return stringables;
- }
-
- public void setPolyInterfaces(final List<Stringable> stringables) {
- this.stringables = stringables;
- }
-
- // }}
-
- // {{ PolySelfRefClass: Can we store / restore classes that contain
- // self-referencing collections?
- private SelfReferencingEntity selfReferencingEntity;
-
- public SelfReferencingEntity getPolySelfRefClass() {
- return selfReferencingEntity;
- }
-
- public void setPolySelfRefClass(final SelfReferencingEntity selfReferencingEntity) {
- this.selfReferencingEntity = selfReferencingEntity;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
deleted file mode 100755
index 59a4058..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/SelfReferencingEntity.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.poly;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-/**
- * This test class is used to test that a class can contain a collection of
- * itself.
- *
- * Caveat: Every class instance can only be contained by 1 parent collection,
- * and will only be contained once.
- *
- * @author Kevin
- *
- * @version $Rev$ $Date$
- */
-
-public class SelfReferencingEntity extends AbstractDomainObject {
-
- public String title() {
- return string;
- }
-
- // {{ String type
- private String string;
- public String getString() {
- return string;
- }
- public void setString(final String string) {
- this.string = string;
- }
- // }}
-
- // {{ PolyTestClass collection
- private List<SelfReferencingEntity> polySelfRefClasses = new ArrayList<SelfReferencingEntity>();
-
- public List<SelfReferencingEntity> getPolySelfRefClasses() {
- return polySelfRefClasses;
- }
-
- public void setPolySelfRefClasses(final List<SelfReferencingEntity> polySelfRefClasses) {
- this.polySelfRefClasses = polySelfRefClasses;
- }
-
- public void addToPolySelfRefClasses(final SelfReferencingEntity selfReferencingEntity) {
- // check for no-op
- if (selfReferencingEntity == null || getPolySelfRefClasses().contains(selfReferencingEntity)) {
- return;
- }
- // associate new
- getPolySelfRefClasses().add(selfReferencingEntity);
- }
-
- public void removeFromPolySelfRefClasses(final SelfReferencingEntity selfReferencingEntity) {
- // check for no-op
- if (selfReferencingEntity == null || !getPolySelfRefClasses().contains(selfReferencingEntity)) {
- return;
- }
- // dissociate existing
- getPolySelfRefClasses().remove(selfReferencingEntity);
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
deleted file mode 100755
index 4636a53..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntity.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.poly;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-/**
- * @author Kevin
- *
- */
-public abstract class StringBaseEntity extends AbstractDomainObject {
-
- public String title() {
- return stringBase;
- }
-
- // {{ String type
- private String stringBase;
-
- public String getStringBase() {
- return stringBase;
- }
-
- public void setStringBase(final String string) {
- this.stringBase = string;
- }
-
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
deleted file mode 100755
index 748997c..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySub.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.poly;
-
-/**
- * @author Kevin
- *
- */
-public class StringBaseEntitySub extends StringBaseEntity {
-
- @Override
- public String title() {
- return stringOne;
- }
-
- // {{ String type
- private String stringOne;
-
- public String getStringClassOne() {
- return stringOne;
- }
-
- public void setStringClassOne(final String string) {
- this.stringOne = string;
- }
-
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
deleted file mode 100755
index a208ec2..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubThree.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.poly;
-
-/**
- * @author Kevin
- *
- */
-public class StringBaseEntitySubThree extends StringBaseEntitySubTwo {
-
- // {{ String type
- private String string;
-
- public String getStringClassThree() {
- return string;
- }
-
- public void setStringClassThree(final String string) {
- this.string = string;
- }
-
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
deleted file mode 100755
index 7ffd40b..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringBaseEntitySubTwo.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-/**
- *
- */
-package org.apache.isis.core.tck.dom.poly;
-
-/**
- * @author Kevin
- *
- */
-public class StringBaseEntitySubTwo extends StringBaseEntity {
-
- @Override
- public String title() {
- return stringClassTwo;
- }
-
- // {{ String type
- private String stringClassTwo;
-
- public String getStringClassTwo() {
- return stringClassTwo;
- }
-
- public void setStringClassTwo(final String string) {
- this.stringClassTwo = string;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
deleted file mode 100755
index b3f502f..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/Stringable.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.poly;
-
-public interface Stringable {
- public String getString();
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
deleted file mode 100644
index a3d2b13..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnDerivedProperty.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.tck.dom.poly;
-
-
-public class StringableEntityWithOwnDerivedProperty implements Stringable {
-
- // {{ String
- private String string;
-
- @Override
- public String getString() {
- return string;
- }
-
- public void setString(final String string) {
- this.string = string;
- }
- // }}
-
- public String getSpecial() {
- return "special";
- }
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
deleted file mode 100755
index 41a11ea..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperties.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.poly;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-
-public class StringableEntityWithOwnProperties extends AbstractDomainObject implements Stringable, Empty {
-
- public String title() {
- return string;
- }
-
- // {{ String type
- private String string;
-
- @Override
- public String getString() {
- return string;
- }
-
- public void setString(final String string) {
- this.string = string;
- }
-
- // }}
-
- // {{ Special
- private String special;
-
- public String getSpecial() {
- return special;
- }
-
- public void setSpecial(final String special) {
- this.special = special;
- }
-
- // }}
-
- // {{ Integer
- private Integer integerValue;
-
- @MemberOrder(sequence = "1")
- public Integer getInteger() {
- return integerValue;
- }
-
- public void setInteger(final Integer integerValue) {
- this.integerValue = integerValue;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
deleted file mode 100755
index 460f521..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/poly/StringableEntityWithOwnProperty.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.poly;
-
-import org.apache.isis.applib.AbstractDomainObject;
-
-public class StringableEntityWithOwnProperty extends AbstractDomainObject implements Stringable {
-
- public String title() {
- return string;
- }
-
- // {{ String type
- private String string;
- @Override
- public String getString() {
- return string;
- }
- public void setString(final String string) {
- this.string = string;
- }
- // }}
-
- // {{ Special
- private String special;
- public String getSpecial() {
- return special;
- }
- public void setSpecial(final String special) {
- this.special = special;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
deleted file mode 100644
index dab2309..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/AggregatedEntity.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.Aggregated;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.EmbeddedOnly
-@javax.jdo.annotations.Discriminator("AGGR")
-@Aggregated
-@ObjectType("AGGR")
-public class AggregatedEntity extends BaseEntity {
-
- // {{ Name
- private String name;
-
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
deleted file mode 100644
index e54fd4f..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BaseEntity.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.AbstractContainedObject;
-
-public abstract class BaseEntity extends AbstractContainedObject {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
deleted file mode 100644
index 9a4d524..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListChildEntity.java
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.List;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("BDLC")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("BDLC")
-public class BidirWithListChildEntity extends AbstractDomainObject {
-
- // {{ Parent (title #1)
- private BidirWithListParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public BidirWithListParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final BidirWithListParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
- // {{ moveTo
- @MemberOrder(sequence = "1")
- public BidirWithListChildEntity moveTo(final BidirWithListParentEntity newParent) {
- if (newParent == getParent()) {
- // nothing to do
- return this;
- }
- if (getParent() != null) {
- getParent().removeChild(this);
- }
- newParent.getChildren().add(this);
- this.setParent(newParent);
- return this;
- }
-
- public BidirWithListParentEntity default0MoveTo() {
- return getParent();
- }
-
- public List<BidirWithListParentEntity> choices0MoveTo() {
- return getContainer().allInstances(BidirWithListParentEntity.class);
- }
-
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
deleted file mode 100644
index 9e28e7d..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntity.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Persistent;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("BDLP")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("BDLP")
-public class BidirWithListParentEntity extends BaseEntity {
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
-
- // {{ Children
- @Persistent(mappedBy="parent")
- private List<BidirWithListChildEntity> children = new ArrayList<BidirWithListChildEntity>();
-
- @MemberOrder(sequence = "1")
- public List<BidirWithListChildEntity> getChildren() {
- return children;
- }
-
- public void setChildren(final List<BidirWithListChildEntity> children) {
- this.children = children;
- }
- // }}
-
-
-
- // {{ newChild (action)
- public BidirWithListChildEntity newChild(final String name) {
- final BidirWithListChildEntity childEntity = newTransientInstance(BidirWithListChildEntity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
-
- // {{ removeChild (action)
- public BidirWithListParentEntity removeChild(final BidirWithListChildEntity childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- childEntity.setParent(null);
- }
- return this;
- }
-
- public List<BidirWithListChildEntity> choices0RemoveChild() {
- return getChildren();
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
deleted file mode 100644
index a12eeec..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithListParentEntityRepository.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("BidirWithListParentEntities")
-@ObjectType("BidirWithListParentEntities")
-@DomainService
-public class BidirWithListParentEntityRepository extends AbstractEntityRepository<BidirWithListParentEntity> {
-
- public BidirWithListParentEntityRepository() {
- super(BidirWithListParentEntity.class, "BidirWithListParentEntities");
- }
-
- @MemberOrder(sequence = "2")
- public BidirWithListParentEntity newEntity(final String name) {
- final BidirWithListParentEntity entity = newTransientInstance(BidirWithListParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
deleted file mode 100644
index ecac7fe..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetChildEntity.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.List;
-
-import javax.jdo.annotations.IdentityType;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("BDSC")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("BDSC")
-public class BidirWithSetChildEntity extends AbstractDomainObject {
-
- // {{ Parent (title #1)
- private BidirWithSetParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public BidirWithSetParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final BidirWithSetParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
- // {{ moveTo
- @MemberOrder(sequence = "1")
- public BidirWithSetChildEntity moveTo(final BidirWithSetParentEntity newParent) {
- if (newParent == getParent()) {
- // nothing to do
- return this;
- }
- if (getParent() != null) {
- getParent().removeChild(this);
- }
- newParent.getChildren().add(this);
- this.setParent(newParent);
- return this;
- }
-
- public BidirWithSetParentEntity default0MoveTo() {
- return getParent();
- }
-
- public List<BidirWithSetParentEntity> choices0MoveTo() {
- return getContainer().allInstances(BidirWithSetParentEntity.class);
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
deleted file mode 100644
index f106b39..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntity.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Persistent;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("BDSP")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("BDSP")
-public class BidirWithSetParentEntity extends BaseEntity {
-
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Children
- @Persistent(mappedBy="parent")
- private Set<BidirWithSetChildEntity> children = new HashSet<BidirWithSetChildEntity>();
-
- @MemberOrder(sequence = "1")
- public Set<BidirWithSetChildEntity> getChildren() {
- return children;
- }
-
- public void setChildren(final Set<BidirWithSetChildEntity> children) {
- this.children = children;
- }
- // }}
-
-
- // {{ newChild (action)
- public BidirWithSetChildEntity newChild(final String name) {
- final BidirWithSetChildEntity childEntity = newTransientInstance(BidirWithSetChildEntity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
-
- // {{ removeChild (action)
- public BidirWithSetParentEntity removeChild(final BidirWithSetChildEntity childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- childEntity.setParent(null);
- }
- return this;
- }
-
- public List<BidirWithSetChildEntity> choices0RemoveChild() {
- return Arrays.asList(getChildren().toArray(new BidirWithSetChildEntity[0]));
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
deleted file mode 100644
index 130c27e..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/BidirWithSetParentEntityRepository.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("BidirWithSetParentEntities")
-@ObjectType("BidirWithSetParentEntities")
-@DomainService
-public class BidirWithSetParentEntityRepository extends AbstractEntityRepository<BidirWithSetParentEntity> {
-
- public BidirWithSetParentEntityRepository() {
- super(BidirWithSetParentEntity.class, "BidirWithSetParentEntities");
- }
-
- @MemberOrder(sequence = "2")
- public BidirWithSetParentEntity newEntity(final String name) {
- final BidirWithSetParentEntity entity = newTransientInstance(BidirWithSetParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
deleted file mode 100644
index fb86419..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ChildEntity.java
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@ObjectType("CHLD")
-public class ChildEntity extends AbstractDomainObject {
-
- // {{ Parent (title #1)
- private ParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public ParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final ParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
- // {{ moveTo
- @MemberOrder(sequence = "1")
- public ChildEntity moveTo(final ParentEntity newParent) {
- if (newParent == getParent()) {
- // nothing to do
- return this;
- }
- if (getParent() != null) {
- getParent().removeChild(this);
- }
- newParent.getChildren().add(this);
- this.setParent(newParent);
- return this;
- }
-
- public ParentEntity default0MoveTo() {
- return getParent();
- }
-
- public List<ParentEntity> choices0MoveTo() {
- return getContainer().allInstances(ParentEntity.class);
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
deleted file mode 100644
index 6abc29a..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntity.java
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.NotPersisted;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@ObjectType("PRNT")
-public class ParentEntity extends BaseEntity {
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
- // {{ HomogeneousCollection
- private List<SimpleEntity> homogeneousCollection = new ArrayList<SimpleEntity>();
-
- public List<SimpleEntity> getHomogeneousCollection() {
- return homogeneousCollection;
- }
-
- public void setHomogeneousCollection(final List<SimpleEntity> homogenousCollection) {
- this.homogeneousCollection = homogenousCollection;
- }
-
- // }}
-
- // {{ HeterogeneousCollection
- private List<BaseEntity> heterogeneousCollection = new ArrayList<BaseEntity>();
-
- public List<BaseEntity> getHeterogeneousCollection() {
- return heterogeneousCollection;
- }
-
- public void setHeterogeneousCollection(final List<BaseEntity> hetrogenousCollection) {
- this.heterogeneousCollection = hetrogenousCollection;
- }
-
- // }}
-
- // {{ Children
- private Set<ChildEntity> children = new HashSet<ChildEntity>();
-
- @MemberOrder(sequence = "1")
- public Set<ChildEntity> getChildren() {
- return children;
- }
-
- public void setChildren(final Set<ChildEntity> children) {
- this.children = children;
- }
- // }}
-
-
- // {{ NotPersisted
- @NotPersisted
- public List<SimpleEntity> getNotPersisted() {
- throw new org.apache.isis.applib.NonRecoverableException("unexpected call");
- }
- // }}
-
-
-
- // {{ newChild (action)
- public ChildEntity newChild(final String name) {
- final ChildEntity childEntity = newTransientInstance(ChildEntity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
-
- // {{ removeChild (action)
- public ParentEntity removeChild(final ChildEntity childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- childEntity.setParent(null);
- }
- return this;
- }
-
- public Set<ChildEntity> choices0RemoveChild() {
- return getChildren();
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
deleted file mode 100644
index 25ef44d..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/ParentEntityRepository.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("ParentEntities")
-@ObjectType("ParentEntities")
-@DomainService
-public class ParentEntityRepository extends AbstractEntityRepository<ParentEntity> {
-
- public ParentEntityRepository() {
- super(ParentEntity.class, "ParentEntities");
- }
-
- public BaseEntity someAction() { return null; }
-
- public SimpleEntity someAction2() { return null; }
-
- public ReferencingEntity someAction3() { return null; }
-
- @MemberOrder(sequence = "2")
- public ParentEntity newEntity(final String name) {
- final ParentEntity entity = newTransientInstance(ParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
deleted file mode 100644
index 364b693..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassChildEntity.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.util.List;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PCCH")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PCCH")
-public abstract class PolyClassChildEntity extends AbstractDomainObject {
-
- // {{ Parent (title #1)
- private PolyClassParentEntity parent;
-
- @Title(sequence="1", append="-")
- @MemberOrder(sequence = "1")
- @Optional
- public PolyClassParentEntity getParent() {
- return parent;
- }
-
- public void setParent(final PolyClassParentEntity parent) {
- this.parent = parent;
- }
-
- // }}
-
- // {{ Name (title #2)
- private String name;
-
- @Title(sequence="2")
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
- // {{ moveTo
- @MemberOrder(sequence = "1")
- public PolyClassChildEntity moveTo(final PolyClassParentEntity newParent) {
- if (newParent == getParent()) {
- // nothing to do
- return this;
- }
- if (getParent() != null) {
- getParent().removeChild(this);
- }
- newParent.getChildren().add(this);
- this.setParent(newParent);
- return this;
- }
-
- public PolyClassParentEntity default0MoveTo() {
- return getParent();
- }
-
- public List<PolyClassParentEntity> choices0MoveTo() {
- return getContainer().allInstances(PolyClassParentEntity.class);
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
deleted file mode 100644
index d8f6594..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntity.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import java.math.BigDecimal;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Persistent;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.Optional;
-import org.apache.isis.applib.annotation.Title;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PCPR")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@ObjectType("PCPR")
-public class PolyClassParentEntity extends BaseEntity {
-
-
- // {{ Name (also title)
- private String name;
-
- @Title
- @MemberOrder(sequence = "1")
- @Optional
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- // }}
-
-
- // {{ Children
- @Persistent(mappedBy="parent")
- private Set<PolyClassChildEntity> children = new HashSet<PolyClassChildEntity>();
-
- @MemberOrder(sequence = "1")
- public Set<PolyClassChildEntity> getChildren() {
- return children;
- }
-
- public void setChildren(final Set<PolyClassChildEntity> children) {
- this.children = children;
- }
- // }}
-
-
- // {{ newSubtype1 (action)
- public PolyClassSubtype1Entity newSubtype1(final String name, int foo) {
- final PolyClassSubtype1Entity childEntity = newTransientInstance(PolyClassSubtype1Entity.class);
- childEntity.setName(name);
- childEntity.setFoo(foo);
- childEntity.setParent(this);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ newSubtype2 (action)
- public PolyClassSubtype2Entity newSubtype2(final String name, String bar) {
- final PolyClassSubtype2Entity childEntity = newTransientInstance(PolyClassSubtype2Entity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- childEntity.setBar(bar);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ newSubtype3 (action)
- public PolyClassSubtype3Entity newSubtype3(final String name, BigDecimal boz) {
- final PolyClassSubtype3Entity childEntity = newTransientInstance(PolyClassSubtype3Entity.class);
- childEntity.setName(name);
- childEntity.setParent(this);
- childEntity.setBoz(boz);
- this.getChildren().add(childEntity);
- persistIfNotAlready(childEntity);
- return childEntity;
- }
- // }}
-
- // {{ removeChild (action)
- public PolyClassParentEntity removeChild(final PolyClassChildEntity childEntity) {
- if (getChildren().contains(childEntity)) {
- getChildren().remove(childEntity);
- childEntity.setParent(null);
- }
- return this;
- }
-
- public List<PolyClassChildEntity> choices0RemoveChild() {
- return Arrays.asList(getChildren().toArray(new PolyClassChildEntity[0]));
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
deleted file mode 100644
index a358cfd..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassParentEntityRepository.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("PolyClassParentEntities")
-@ObjectType("PolyClassParentEntities")
-@DomainService
-public class PolyClassParentEntityRepository extends AbstractEntityRepository<PolyClassParentEntity> {
-
- public PolyClassParentEntityRepository() {
- super(PolyClassParentEntity.class, "PolyClassParentEntities");
- }
-
- @MemberOrder(sequence = "2")
- public PolyClassParentEntity newEntity(final String name) {
- final PolyClassParentEntity entity = newTransientInstance(PolyClassParentEntity.class);
- entity.setName(name);
- persist(entity);
- return entity;
- }
-
-
- @Hidden
- public void registerType(PolyClassSubtype1Entity e) { }
-
- @Hidden
- public void registerType(PolyClassSubtype2Entity e) { }
-
- @Hidden
- public void registerType(PolyClassSubtype3Entity e) { }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
deleted file mode 100644
index 91bb8bb..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype1Entity.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PCS1")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.NEW_TABLE)
-@ObjectType("PCS1")
-public class PolyClassSubtype1Entity extends PolyClassChildEntity {
-
-
-
- // {{ Foo (property)
- private int foo;
-
- @MemberOrder(sequence = "1")
- public int getFoo() {
- return foo;
- }
-
- public void setFoo(final int foo) {
- this.foo = foo;
- }
- // }}
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
deleted file mode 100644
index 745f518..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype2Entity.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PCS2")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
-@ObjectType("PCS2")
-public class PolyClassSubtype2Entity extends PolyClassChildEntity {
-
-
- // {{ Bar (property)
- private String bar;
-
- @MemberOrder(sequence = "1")
- public String getBar() {
- return bar;
- }
-
- public void setBar(final String bar) {
- this.bar = bar;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
deleted file mode 100644
index d6fdfe4..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyClassSubtype3Entity.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-import javax.jdo.annotations.IdentityType;
-import javax.jdo.annotations.Inheritance;
-import javax.jdo.annotations.InheritanceStrategy;
-
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-
-@javax.jdo.annotations.PersistenceCapable(identityType=IdentityType.DATASTORE)
-@javax.jdo.annotations.Discriminator("PCS3")
-@javax.jdo.annotations.DatastoreIdentity(strategy=javax.jdo.annotations.IdGeneratorStrategy.IDENTITY)
-@Inheritance(strategy=InheritanceStrategy.SUPERCLASS_TABLE)
-@ObjectType("PCS3")
-public class PolyClassSubtype3Entity extends PolyClassChildEntity {
-
-
-
- // {{ Baz (property)
- private java.math.BigDecimal boz;
-
- @MemberOrder(sequence = "1")
- public java.math.BigDecimal getBoz() {
- return boz;
- }
-
- public void setBoz(final java.math.BigDecimal baz) {
- this.boz = baz;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
deleted file mode 100644
index 888f5f8..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterface.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-
-public interface PolyInterface {
-
- public PolyInterfaceParentEntity getParent();
- public void setParent(PolyInterfaceParentEntity parent);
-
- public String getName();
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
deleted file mode 100644
index c7a258d..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/refs/PolyInterfaceIdentityStrategy.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.refs;
-
-
-public interface PolyInterfaceIdentityStrategy {
-
- public PolyInterfaceIdentityStrategyParentEntity getParent();
- public void setParent(PolyInterfaceIdentityStrategyParentEntity parent);
-
- public String getName();
-
-}
[24/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css b/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css
new file mode 100644
index 0000000..a82d472
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/src/main/java/viewer/wicket/app/application.css
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+#header {
+ background: url('images/banner.png') no-repeat scroll left center transparent;
+}
+div.entitySummary > label.entityTitle {
+ color: maroon;
+ font-size: xx-large;
+ font-weight: bolder;
+}
+.ToDoItem-description .scalarName {
+ color: maroon;
+ font-weight: bolder;
+}
+
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/resources/images/Default.png
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/resources/images/Default.png b/mothballed/tck/tck-viewer-wicket/src/main/resources/images/Default.png
new file mode 100644
index 0000000..8409e46
Binary files /dev/null and b/mothballed/tck/tck-viewer-wicket/src/main/resources/images/Default.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties
new file mode 100644
index 0000000..a6b56f5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/isis.properties
@@ -0,0 +1,60 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+isis.services.prefix = org.apache.isis.tck.objstore.dflt
+isis.services =\
+ scalars.ApplibValuedEntityRepositoryDefault,\
+ scalars.JdkValuedEntityRepositoryDefault,\
+ scalars.PrimitiveValuedEntityRepositoryDefault,\
+ scalars.WrapperValuedEntityRepositoryDefault, \
+ simples.SimpleEntityRepositoryDefault,\
+ assocs.ParentEntityRepositoryDefault
+
+isis.fixtures.prefix= org.apache.isis.tck.fixture
+isis.fixtures=\
+ LogonAsSvenFixture,\
+ scalars.ApplibValuedEntityFixture,\
+ scalars.JdkValuedEntityFixture,\
+ scalars.PrimitiveValuedEntityFixture,\
+ scalars.WrapperValuedEntityFixture,\
+ simples.SimpleEntityFixture,\
+ assocs.ParentAndChildEntityFixture
+
+
+
+isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.dflt.objectfactory.CglibObjectFactory
+#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.javassist.objectfactory.JavassistObjectFactory
+#isis.persistor.object-factory=org.apache.isis.runtimes.dflt.bytecode.identity.objectfactory.ObjectFactoryBasic
+
+
+isis.persistor.domain-object-container=org.apache.isis.core.metamodel.services.container.DomainObjectContainerDefault
+#isis.persistor.domain-object-container=org.apache.isis.progmodel.wrapper.metamodel.DomainObjectContainerWrapperFactory
+
+
+#isis.reflector.facets.include=org.apache.isis.runtimes.dflt.runtime.authorization.standard.AuthorizationFacetFactoryImpl
+#isis.authorization.learn=true
+
+
+
+isis.persistor=in-memory
+#isis.xmlos.dir=/tmp/xml
+
+isis.authentication=bypass
+
+###############################
+# wicket-viewer specific
+###############################
+#isis.reflector.facets.include=org.apache.isis.viewer.wicket.metamodel.wizardpagedesc.WizardPageDescriptionAnnotationFacetFactory
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties
new file mode 100644
index 0000000..f2d65e6
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/logging.properties
@@ -0,0 +1,30 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# apache's log4j is used to provide system logging.
+log4j.rootCategory=INFO, Console
+
+# The console appender
+log4j.appender.Console=org.apache.log4j.ConsoleAppender
+log4j.appender.Console.target=System.out
+log4j.appender.Console.layout=org.apache.log4j.PatternLayout
+log4j.appender.Console.layout.ConversionPattern=%d{ABSOLUTE} [%-20c{1} %-10t %-5p] %m%n
+
+log4j.appender.File=org.apache.log4j.RollingFileAppender
+log4j.appender.File.file=isis.log
+log4j.appender.File.append=false
+log4j.appender.File.layout=org.apache.log4j.PatternLayout
+log4j.appender.File.layout.ConversionPattern=%d [%-20c{1} %-10t %-5p] %m%n
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow
new file mode 100644
index 0000000..928983a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.allow
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords
new file mode 100644
index 0000000..7f07af5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/security_file.passwords
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+sven:pass
+dick:pass
+bob:pass
+joe:pass
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000..27f24b4
--- /dev/null
+++ b/mothballed/tck/tck-viewer-wicket/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <display-name>claims</display-name>
+
+ <filter>
+ <filter-name>wicket.claims</filter-name>
+ <filter-class>org.apache.wicket.protocol.http.WicketFilter</filter-class>
+ <init-param>
+ <param-name>applicationClassName</param-name>
+ <param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketUnsecuredApplication</param-value>
+ <!--
+ <param-value>org.apache.isis.viewer.wicket.viewer.IsisWicketApplication</param-value>
+ <param-value>viewer.wicket.app.ToDoApplication</param-value>
+ -->
+ </init-param>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>wicket.claims</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+
+</web-app>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn b/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn
new file mode 100644
index 0000000..1836bf5
Binary files /dev/null and b/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.pdn differ
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.png
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.png b/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.png
new file mode 100644
index 0000000..3461ffc
Binary files /dev/null and b/mothballed/tck/tck-viewer-wicket/src/main/webapp/images/banner.png differ
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index c81253c..5dde9f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,7 +51,6 @@
</activation>
<modules>
<module>core</module>
- <module>tck</module>
<module>example/application/simpleapp</module>
<module>example/archetype/simpleapp</module>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/pom.xml
----------------------------------------------------------------------
diff --git a/tck/pom.xml b/tck/pom.xml
deleted file mode 100644
index 6f1b2cd..0000000
--- a/tck/pom.xml
+++ /dev/null
@@ -1,226 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- <relativePath>../core/pom.xml</relativePath>
- </parent>
-
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck</artifactId>
-
- <name>Isis TCK App</name>
-
- <packaging>pom</packaging>
-
- <properties>
- <!-- must be consistent with the versions defined by the JDO Objectstore -->
- <jdo-api.version>3.1-rc1</jdo-api.version>
- <datanucleus-core.version>4.0.6</datanucleus-core.version>
- <datanucleus-api-jdo.version>4.0.5</datanucleus-api-jdo.version>
- <datanucleus-jdo-query.version>4.0.4</datanucleus-jdo-query.version>
- <datanucleus-rdbms.version>4.0.11</datanucleus-rdbms.version>
-
- <datanucleus-jodatime.version>4.0.6</datanucleus-jodatime.version>
- <datanucleus-maven-plugin.version>4.0.0-release</datanucleus-maven-plugin.version>
-
- </properties>
-
- <repositories>
- <repository>
- <id>apache.snapshots</id>
- <name>Apache Snapshots</name>
- <url>https://repository.apache.org/content/repositories/snapshots/</url>
- <releases>
- <enabled>false</enabled>
- </releases>
- <snapshots>
- </snapshots>
- </repository>
- </repositories>
-
- <build>
- <pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- <executions>
- <execution>
- <id>source</id>
- <phase>compile</phase>
- </execution>
- <execution>
- <id>test</id>
- <phase>test-compile</phase>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.16</version>
- <configuration>
- <excludes>
- <exclude>**/Test*.java</exclude>
- </excludes>
- <useFile>true</useFile>
- <printSummary>false</printSummary>
- <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- <version>2.16</version>
- <configuration>
- <showSuccess>false</showSuccess>
- </configuration>
- <executions>
- <execution>
- <phase>test</phase>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.mortbay.jetty</groupId>
- <artifactId>maven-jetty-plugin</artifactId>
- <version>${jetty.version}</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-shade-plugin</artifactId>
- <version>2.2</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.7</version>
- <executions>
- <execution>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
- <dependencyManagement>
- <dependencies>
-
- <!-- DataNucleus -->
- <dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo-api</artifactId>
- <version>${jdo-api.version}</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-core</artifactId>
- <version>${datanucleus-core.version}</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-api-jdo</artifactId>
- <version>${datanucleus-api-jdo.version}</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-jdo-query</artifactId>
- <version>${datanucleus-jdo-query.version}</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-rdbms</artifactId>
- <version>${datanucleus-rdbms.version}</version>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-jodatime</artifactId>
- <version>${datanucleus-jodatime.version}</version>
- </dependency>
-
- <!-- TCK -->
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-dom</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-fixture</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-integtests</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck-viewer-restfulobjects</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </dependency>
-
- </dependencies>
-
- </dependencyManagement>
-
- <modules>
- <module>tck-dom</module>
- <module>tck-fixture</module>
- <module>tck-integtests</module>
- <module>tck-viewer-restfulobjects</module>
- <module>tck-viewer-wicket</module>
- </modules>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/.gitignore
----------------------------------------------------------------------
diff --git a/tck/tck-dom/.gitignore b/tck/tck-dom/.gitignore
deleted file mode 100644
index 0a37d92..0000000
--- a/tck/tck-dom/.gitignore
+++ /dev/null
@@ -1,19 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
-.project
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/log4j.properties
----------------------------------------------------------------------
diff --git a/tck/tck-dom/log4j.properties b/tck/tck-dom/log4j.properties
deleted file mode 100644
index 155ae59..0000000
--- a/tck/tck-dom/log4j.properties
+++ /dev/null
@@ -1,40 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-
-
-# Basic logging goes to "datanucleus.log"
-log4j.appender.A1=org.apache.log4j.FileAppender
-log4j.appender.A1.File=datanucleus.log
-log4j.appender.A1.layout=org.apache.log4j.PatternLayout
-log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
-#log4j.appender.A1.Threshold=INFO
-
-# Categories
-# Each category can be set to a "level", and to direct to an appender
-
-# Default to DEBUG level for all DataNucleus categories
-log4j.logger.DataNucleus = DEBUG, A1
-
-log4j.category.com.mchange.v2.c3p0=INFO, A1
-log4j.category.com.mchange.v2.resourcepool=INFO, A1
-log4j.category.org.logicalcobwebs.proxool=INFO,A1
-
-
-# Hbase libs logging
-log4j.category.org.apache.hadoop=INFO,A1
-log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/pom.xml
----------------------------------------------------------------------
diff --git a/tck/tck-dom/pom.xml b/tck/tck-dom/pom.xml
deleted file mode 100644
index cd8b414..0000000
--- a/tck/tck-dom/pom.xml
+++ /dev/null
@@ -1,137 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.isis.tck</groupId>
- <artifactId>isis-tck</artifactId>
- <version>1.9.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>isis-tck-dom</artifactId>
- <name>Isis TCK DOM</name>
-
- <profiles>
- <profile>
- <id>isis-jdo-objectstore</id>
- <activation>
- <property>
- <name>component</name>
- <value>isis-jdo-objectstore</value>
- </property>
- </activation>
- <build>
- <plugins>
- <plugin>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-maven-plugin</artifactId>
- <version>${datanucleus-maven-plugin.version}</version>
- <configuration>
- <fork>false</fork>
- <verbose>true</verbose>
- <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
- </configuration>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>enhance</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- <pluginManagement>
- <plugins>
- <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
- <plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
- <configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>
- org.datanucleus
- </groupId>
- <artifactId>
- datanucleus-maven-plugin
- </artifactId>
- <versionRange>
- [4.0.0-release,)
- </versionRange>
- <goals>
- <goal>enhance</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <ignore/>
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
- </configuration>
- </plugin>
- </plugins>
- </pluginManagement>
- </build>
- </profile>
- </profiles>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.isis.core</groupId>
- <artifactId>isis-core-applib</artifactId>
- </dependency>
-
- <!-- DataNucleus -->
- <dependency>
- <groupId>javax.jdo</groupId>
- <artifactId>jdo-api</artifactId>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-api-jdo</artifactId>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-jdo-query</artifactId>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-rdbms</artifactId>
- </dependency>
- <dependency>
- <groupId>org.datanucleus</groupId>
- <artifactId>datanucleus-jodatime</artifactId>
- </dependency>
-
- </dependencies>
-
-</project>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/appended-resources/supplemental-models.xml
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/appended-resources/supplemental-models.xml b/tck/tck-dom/src/main/appended-resources/supplemental-models.xml
deleted file mode 100644
index bbf2a84..0000000
--- a/tck/tck-dom/src/main/appended-resources/supplemental-models.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<supplementalDataModels
- xmlns="http://maven.apache.org/supplemental-model/1.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/supplemental-model/1.0.0
- http://maven.apache.org/xsd/supplemental-model-1.0.0.xsd">
-
-</supplementalDataModels>
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
deleted file mode 100644
index d6b6a24..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/AbstractEntityRepository.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom;
-
-import java.util.List;
-import java.util.Map;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Programmatic;
-import org.apache.isis.applib.annotation.QueryOnly;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.query.Query;
-import org.apache.isis.applib.query.QueryDefault;
-
-public abstract class AbstractEntityRepository<T> extends AbstractFactoryAndRepository {
-
- private final Class<T> entityClass;
- private final String serviceId;
-
- public AbstractEntityRepository(Class<T> entityClass, String serviceId) {
- this.entityClass = entityClass;
- this.serviceId = serviceId;
- }
-
- @Override
- public final String getId() {
- return serviceId;
- }
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public List<T> list() {
- return allInstances(entityClass);
- }
-
- @MemberOrder(sequence = "2")
- public T newEntity() {
- final T entity = newTransientInstance(entityClass);
- persist(entity);
- return entity;
- }
-
- @Programmatic
- public T findByNamedQueryFirstOnly(String queryName, Map<String, Object> argumentByParameterName) {
- final Query<T> query = new QueryDefault<T>(entityClass, queryName, argumentByParameterName);
- return this.firstMatch(query);
- }
-
- @Programmatic
- public List<T> findByNamedQueryAll(String queryName, Map<String, Object> argumentByParameterName) {
- final Query<T> query = new QueryDefault<T>(entityClass, queryName, argumentByParameterName);
- return this.allMatches(query);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
deleted file mode 100644
index 2f4ed64..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntity.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.actions;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("RTNE")
-@ObjectType("RTNE")
-public class ActionsEntity extends AbstractDomainObject {
-
- // {{ Id (Integer)
- private Integer id;
-
- @javax.jdo.annotations.PrimaryKey // must be on the getter.
- public Integer getId() {
- return id;
- }
-
- public void setId(final Integer id) {
- this.id = id;
- }
- // }}
-
- // {{ Title
- public String title() {
- return null;
- }
- // }}
-
-
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public ActionsEntity visibleAndInvokableAction() {
- return this;
- }
-
- @Disabled
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public ActionsEntity visibleButUninvokableAction() {
- return this;
- }
-
- @Hidden
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public ActionsEntity invisibleAction() {
- return this;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
deleted file mode 100644
index f53bca0..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/actions/ActionsEntityRepository.java
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.actions;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.spec.Specification;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("ActionsEntities")
-@ObjectType("ActionsEntities")
-@DomainService
-public class ActionsEntityRepository extends AbstractEntityRepository<ActionsEntity> {
-
- public ActionsEntityRepository() {
- super(ActionsEntity.class, "ActionsEntities");
- }
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public ActionsEntity findById(@Named("id") int id) {
- return findByIdIfAny(id);
- }
-
- @ActionSemantics(Of.IDEMPOTENT)
- @MemberOrder(sequence = "1")
- public ActionsEntity findByIdIdempotent(@Named("id") int id) {
- return findByIdIfAny(id);
- }
-
- @ActionSemantics(Of.NON_IDEMPOTENT)
- @MemberOrder(sequence = "1")
- public ActionsEntity findByIdNotIdempotent(@Named("id") int id) {
- return findByIdIfAny(id);
- }
-
- private ActionsEntity findByIdIfAny(int id) {
- List<ActionsEntity> subList = subList(id, id+1);
- return subList.isEmpty()?null:subList.get(0);
- }
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public List<ActionsEntity> subList(
- @MustSatisfy(IntegerCannotBeNegative.class)
- @Named("from") int from,
- @MustSatisfy(IntegerCannotBeNegative.class)
- @Named("to") int to) {
- List<ActionsEntity> list = list();
- int toChecked = Math.min(to, list.size());
- int fromChecked = Math.min(from, toChecked);
- return list.subList(fromChecked, toChecked);
- }
- public String validateSubList(final int from, final int to) {
- if(from > to) {
- return "'from' cannot be larger than 'to'";
- }
- return null;
- }
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public boolean contains(@Named("searchFor") ActionsEntity entity, @Named("from") int from, @Named("to") int to) {
- List<ActionsEntity> list = subList(from, to);
- return list.contains(entity);
- }
-
- public static class IntegerCannotBeNegative implements Specification {
- @Override
- public String satisfies(Object obj) {
- if(!(obj instanceof Integer)) {
- return null;
- }
- Integer integer = (Integer) obj;
- return integer.intValue() < 0? "Cannot be less than zero": null;
- }
- }
-
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public List<ActionsEntity> subListWithOptionalRange(
- @Optional
- @MustSatisfy(IntegerCannotBeNegative.class)
- @Named("from") Integer from,
- @Optional
- @MustSatisfy(IntegerCannotBeNegative.class)
- @Named("to") Integer to) {
- return subList(valueElseDefault(from, 0), valueElseDefault(to, Integer.MAX_VALUE));
- }
-
- public String validateSubListWithOptionalRange(final Integer from, final Integer to) {
- return validateSubList(valueElseDefault(from, 0), valueElseDefault(to, Integer.MAX_VALUE));
- }
-
- private static int valueElseDefault(Integer value, int i) {
- return value != null? value: i;
- }
-
- @ActionSemantics(Of.IDEMPOTENT)
- @MemberOrder(sequence = "90")
- public String concatenate(@Named("str1") String str1, @Named("str2") String str2) {
- return str1 + str2;
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
deleted file mode 100644
index 3894d1a..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntity.java
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.busrules;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.ActionSemantics;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.Hidden;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.ObjectType;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("BSRL")
-@javax.jdo.annotations.Query(
- name="prmv_findByIntProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.busrules.BusRulesEntity WHERE intProperty == :i")
-@ObjectType("BSRL")
-public class BusRulesEntity extends AbstractDomainObject {
-
- // {{ Id (Integer)
- private Integer id;
-
- @javax.jdo.annotations.PrimaryKey // must be on the getter.
- public Integer getId() {
- return id;
- }
-
- public void setId(final Integer id) {
- this.id = id;
- }
- // }}
-
- // {{ Title
- public String title() {
- return null;
- }
- // }}
-
-
- // {{ visibleAndEditableProperty
- private int visibleAndEditableProperty;
-
- @MemberOrder(sequence = "1")
- public int getVisibleAndEditableProperty() {
- return visibleAndEditableProperty;
- }
-
- public void setVisibleAndEditableProperty(final int intProperty) {
- this.visibleAndEditableProperty = intProperty;
- }
- // }}
-
-
- // {{ visibleButNotEditableProperty
- private int visibleButNotEditableProperty;
-
- @Disabled
- @MemberOrder(sequence = "2")
- public int getVisibleButNotEditableProperty() {
- return visibleButNotEditableProperty;
- }
-
- public void setVisibleButNotEditableProperty(final int intProperty) {
- this.visibleButNotEditableProperty = intProperty;
- }
- // }}
-
- // {{ invisibleProperty
- private int invisibleProperty;
-
- @Hidden
- @MemberOrder(sequence = "3")
- public int getInvisibleProperty() {
- return invisibleProperty;
- }
-
- public void setInvisibleProperty(final int intProperty) {
- this.invisibleProperty = intProperty;
- }
- // }}
-
-
- // {{ VisibleAndEditableCollection (Collection)
- private List<BusRulesEntityChild> editableCollection = new ArrayList<BusRulesEntityChild>();
-
- @MemberOrder(sequence = "11")
- public List<BusRulesEntityChild> getVisibleAndEditableCollection() {
- return editableCollection;
- }
-
- public void setVisibleAndEditableCollection(final List<BusRulesEntityChild> children) {
- this.editableCollection = children;
- }
- // }}
-
-
- // {{ VisibleButNotEditableCollection (Collection)
- private List<BusRulesEntityChild> notEditableCollection = new ArrayList<BusRulesEntityChild>();
-
- @MemberOrder(sequence = "11")
- public List<BusRulesEntityChild> getVisibleButNotEditableCollection() {
- return notEditableCollection;
- }
-
- public void setVisibleButNotEditableCollection(final List<BusRulesEntityChild> children) {
- this.notEditableCollection = children;
- }
- // }}
-
- // {{ InvisibleCollection (Collection)
- private List<BusRulesEntityChild> invisibleCollection = new ArrayList<BusRulesEntityChild>();
-
- @Hidden
- @MemberOrder(sequence = "11")
- public List<BusRulesEntityChild> getInvisibleCollection() {
- return invisibleCollection;
- }
-
- public void setInvisibleCollection(final List<BusRulesEntityChild> children) {
- this.invisibleCollection = children;
- }
- // }}
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public BusRulesEntity visibleAndInvokableAction() {
- return this;
- }
-
- @Disabled
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public BusRulesEntity visibleButUninvokableAction() {
- return this;
- }
-
- @Hidden
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public BusRulesEntity invisibleAction() {
- return this;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
deleted file mode 100644
index 5011c23..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityChild.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.busrules;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.ObjectType;
-
-@javax.jdo.annotations.PersistenceCapable
-@javax.jdo.annotations.Discriminator("BSRC")
-@javax.jdo.annotations.Query(
- name="prmv_findByIntProperty", language="JDOQL",
- value="SELECT FROM org.apache.isis.tck.dom.busrules.BusRulesEntityChild WHERE intProperty == :i")
-@ObjectType("BSRC")
-public class BusRulesEntityChild extends AbstractDomainObject {
-
-
- // {{ Id (Integer)
- private Integer id;
-
- @javax.jdo.annotations.PrimaryKey // must be on the getter.
- public Integer getId() {
- return id;
- }
-
- public void setId(final Integer id) {
- this.id = id;
- }
- // }}
-
- // {{ Title
- public String title() {
- return null;
- }
- // }}
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
deleted file mode 100644
index e13664c..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/busrules/BusRulesEntityRepository.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.busrules;
-
-import org.apache.isis.applib.annotation.*;
-import org.apache.isis.applib.annotation.ActionSemantics.Of;
-import org.apache.isis.applib.query.Query;
-import org.apache.isis.applib.query.QueryDefault;
-import org.apache.isis.core.tck.dom.AbstractEntityRepository;
-
-@Named("BusinessRulesEntities")
-@ObjectType("BusinessRulesEntities")
-@DomainService
-public class BusRulesEntityRepository extends AbstractEntityRepository<BusRulesEntity> {
-
- public BusRulesEntityRepository() {
- super(BusRulesEntity.class, "BusinessRulesEntities");
- }
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public BusRulesEntity findById(int id) {
- final Query<BusRulesEntity> query =
- new QueryDefault<BusRulesEntity>(BusRulesEntity.class, BusRulesEntity.class.getName() + "#pk", "id", id);
- return this.firstMatch(query);
- }
-
-
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public BusRulesEntity visibleAndInvocableAction(@Named("id") int id) {
- return this.findById(id);
- }
-
- @Disabled
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public BusRulesEntity visibleButNotInvocableAction(@Named("id") int id) {
- return this.findById(id);
- }
-
- @Hidden
- @ActionSemantics(Of.SAFE)
- @MemberOrder(sequence = "1")
- public BusRulesEntity invisibleAction(int id) {
- return this.findById(id);
- }
-
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
deleted file mode 100644
index ac84e44..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Approver.java
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.claims;
-
-public interface Approver {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
deleted file mode 100644
index 09af5eb..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claim.java
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.claims;
-
-import java.math.BigDecimal;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.value.Color;
-import org.apache.isis.applib.value.Date;
-
-public class Claim extends AbstractDomainObject {
-
- // {{ Title
- public String title() {
- return getStatus() + " - " + getDate();
- }
-
- // }}
-
- // {{ Lifecycle
- public void created() {
- status = "New";
- date = new Date();
- }
-
- // }}
-
- // {{ Description
- private String description;
-
- @MemberOrder(sequence = "1")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(final String description) {
- this.description = description;
- }
-
- public String defaultDescription() {
- return "enter a description here";
- }
-
- // }}
-
- // {{ Date
- private Date date;
-
- @MemberOrder(sequence = "2")
- public Date getDate() {
- return date;
- }
-
- public void setDate(final Date date) {
- this.date = date;
- }
-
- // }}
-
- // {{ Status
- private String status;
-
- @Disabled
- @MemberOrder(sequence = "3")
- public String getStatus() {
- return status;
- }
-
- public void setStatus(final String status) {
- this.status = status;
- }
-
- // }}
-
- // {{ Claimant
- private Claimant claimant;
-
- @Disabled
- @MemberOrder(sequence = "4")
- public Claimant getClaimant() {
- return claimant;
- }
-
- public void setClaimant(final Claimant claimant) {
- this.claimant = claimant;
- }
-
- // }}
-
- // {{ BigDecimal
- private BigDecimal bigDecimal;
-
- @MemberOrder(sequence = "9")
- public BigDecimal getBigDecimal() {
- return bigDecimal;
- }
-
- public void setBigDecimal(final BigDecimal bigDecimal) {
- this.bigDecimal = bigDecimal;
- }
-
- public void modifyBigDecimal(final BigDecimal bigDecimal) {
- // check for no-op
- if (bigDecimal == null || bigDecimal.equals(getBigDecimal())) {
- return;
- }
- // associate new
- setBigDecimal(bigDecimal);
- // additional business logic
- onModifyBigDecimal(bigDecimal);
- }
-
- public void clearBigDecimal() {
- // check for no-op
- if (getBigDecimal() == null) {
- return;
- }
- // dissociate existing
- setBigDecimal(null);
- // additional business logic
- onClearBigDecimal();
- }
-
- protected void onModifyBigDecimal(final BigDecimal bigDecimal) {
- }
-
- protected void onClearBigDecimal() {
- }
-
- // }}
-
- // {{ Color
- private Color color;
-
- @MemberOrder(sequence = "8")
- public Color getColor() {
- return color;
- }
-
- public void setColor(final Color color) {
- this.color = color;
- }
-
- public void modifyColor(final Color color) {
- // check for no-op
- if (color == null || color.equals(getColor())) {
- return;
- }
- // associate new
- setColor(color);
- // additional business logic
- onModifyColor(color);
- }
-
- public void clearColor() {
- // check for no-op
- if (getColor() == null) {
- return;
- }
- // dissociate existing
- setColor(null);
- // additional business logic
- onClearColor();
- }
-
- protected void onModifyColor(final Color color) {
- }
-
- protected void onClearColor() {
- }
-
- // }}
-
- // {{ Approver
- private Approver approver;
-
- @Disabled
- @MemberOrder(sequence = "5")
- public Approver getApprover() {
- return approver;
- }
-
- public void setApprover(final Approver approver) {
- this.approver = approver;
- }
-
- // }}
-
- // {{ Items
- private final List<ClaimItem> items = new ArrayList<ClaimItem>();
-
- @MemberOrder(sequence = "6")
- public List<ClaimItem> getItems() {
- return items;
- }
-
- public void addToItems(final ClaimItem item) {
- items.add(item);
- }
-
- // }}
-
- // {{ action: Submit
- public void submit(final Approver approver) {
- setStatus("Submitted");
- setApprover(approver);
- }
-
- public String disableSubmit() {
- return getStatus().equals("New") ? null : "Claim has already been submitted";
- }
-
- public Object[] defaultSubmit() {
- return new Object[] { getClaimant().getApprover() };
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
deleted file mode 100644
index 0c80cb8..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimItem.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.claims;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.value.Date;
-import org.apache.isis.applib.value.Money;
-
-public class ClaimItem extends AbstractDomainObject {
-
- // {{ Title
- public String title() {
- return getDescription();
- }
-
- // }}
-
- // {{ DateIncurred
- private Date dateIncurred;
-
- @MemberOrder(sequence = "1")
- public Date getDateIncurred() {
- return dateIncurred;
- }
-
- public void setDateIncurred(final Date dateIncurred) {
- this.dateIncurred = dateIncurred;
- }
-
- // }}
-
- // {{ Description
- private String description;
-
- @MemberOrder(sequence = "2")
- public String getDescription() {
- return description;
- }
-
- public void setDescription(final String description) {
- this.description = description;
- }
-
- // }}
-
- // {{ Amount
- private Money amount;
-
- @MemberOrder(sequence = "3")
- public Money getAmount() {
- return amount;
- }
-
- public void setAmount(final Money price) {
- this.amount = price;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
deleted file mode 100644
index b743ecd..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepository.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.claims;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.Named;
-
-@Named("Claims")
-public interface ClaimRepository {
-
- public List<Claim> allClaims();
-
- public List<Claim> findClaims(@Named("Description") String description);
-
- public List<Claim> claimsFor(Claimant claimant);
-
- public Claim newClaim(Claimant claimant);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
deleted file mode 100644
index 6bd83cd..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/ClaimRepositoryImpl.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.claims;
-
-import java.util.List;
-
-public class ClaimRepositoryImpl implements ClaimRepository {
-
- @Override
- public List<Claim> allClaims() {
- return null;
- }
-
- @Override
- public List<Claim> findClaims(final String description) {
- return null;
- }
-
- @Override
- public List<Claim> claimsFor(final Claimant claimant) {
- return null;
- }
-
- @Override
- public Claim newClaim(final Claimant claimant) {
- return null;
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
deleted file mode 100644
index 707796a..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/claims/Claimant.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.claims;
-
-public interface Claimant {
-
- Approver getApprover();
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
deleted file mode 100644
index 49fb002..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/Employee.java
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.employees;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.Disabled;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.When;
-import org.apache.isis.core.tck.dom.claimapp.claims.Approver;
-import org.apache.isis.core.tck.dom.claimapp.claims.Claimant;
-
-public class Employee extends AbstractDomainObject implements Claimant, Approver {
-
- // {{ Title
- public String title() {
- return getName();
- }
-
- // }}
-
- // {{ Name
- private String name;
-
- @MemberOrder(sequence = "1")
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public void modifyName(final String name) {
- setName(name);
- }
-
- public void clearName() {
- setName(null);
- }
-
- public boolean whetherHideName;
-
- public boolean hideName() {
- return whetherHideName;
- }
-
- public String reasonDisableName;
-
- public String disableName() {
- return reasonDisableName;
- }
-
- public String reasonValidateName;
-
- public String validateName(final String name) {
- return reasonValidateName;
- }
-
- // }}
-
- // {{ Password
- private String password;
-
- @MemberOrder(sequence = "2")
- @Disabled(when = When.ONCE_PERSISTED)
- public String getPassword() {
- return password;
- }
-
- public void setPassword(final String password) {
- this.password = password;
- }
-
- // }}
-
- // {{ Approver
- private Approver approver;
-
- @Override
- @MemberOrder(sequence = "2")
- public Approver getApprover() {
- return approver;
- }
-
- public void setApprover(final Approver approver) {
- this.approver = approver;
- }
-
- // }}
-
- // {{ injected: EmployeeRepository
- private EmployeeRepository employeeRepository;
-
- public EmployeeRepository getEmployeeRepository() {
- return employeeRepository;
- }
-
- public void setEmployeeRepository(final EmployeeRepository employeeRepository) {
- this.employeeRepository = employeeRepository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
deleted file mode 100644
index d17f228..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepository.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.employees;
-
-import java.util.List;
-
-import org.apache.isis.applib.annotation.Named;
-
-@Named("Employees")
-public interface EmployeeRepository {
-
- public List<Employee> allEmployees();
-
- public List<Employee> findEmployees(@Named("Name") String name);
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
deleted file mode 100644
index 4f58cd5..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/claimapp/employees/EmployeeRepositoryImpl.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.claimapp.employees;
-
-import java.util.List;
-
-public class EmployeeRepositoryImpl implements EmployeeRepository {
-
- @Override
- public List<Employee> allEmployees() {
- return null;
- }
-
- @Override
- public List<Employee> findEmployees(final String name) {
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
deleted file mode 100644
index 0383050..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/HiddenRepository.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.core.tck.dom.defaults;
-
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.Hidden;
-
-@Hidden
-@DomainService
-public class HiddenRepository {
-
- public String someAction() {
- return null;
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
deleted file mode 100644
index b05f698..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntity.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.defaults;
-
-import java.util.List;
-
-import org.apache.isis.applib.AbstractDomainObject;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Title;
-
-public class WithDefaultsEntity extends AbstractDomainObject {
-
- // {{ Name (string, title)
- private String name;
-
- @MemberOrder(sequence = "1")
- @Title
- public String getName() {
- return name;
- }
-
- public void setName(final String name) {
- this.name = name;
- }
-
- public String defaultName() {
- return "default-name";
- }
-
- // }}
-
- // {{ Flag (boolean)
- private boolean flag;
-
- @MemberOrder(sequence = "1")
- public boolean getFlag() {
- return flag;
- }
-
- public void setFlag(final boolean flag) {
- this.flag = flag;
- }
-
- public boolean defaultFlag() {
- return true;
- }
-
- // }}
-
- // {{ AnInt (int)
- private int anInt;
-
- @MemberOrder(sequence = "1")
- public int getAnInt() {
- return anInt;
- }
-
- public void setAnInt(final int anInt) {
- this.anInt = anInt;
- }
-
- public int defaultAnInt() {
- return 42;
- }
-
- // }}
-
- // {{ Other (property)
- private WithDefaultsEntity other;
-
- @MemberOrder(sequence = "1")
- public WithDefaultsEntity getOther() {
- return other;
- }
-
- public void setOtherEntity(final WithDefaultsEntity withDefaultsEntity) {
- this.other = withDefaultsEntity;
- }
-
- public WithDefaultsEntity defaultOther() {
- final List<WithDefaultsEntity> list = repository.list();
- return list.size() > 0 ? list.get(list.size() - 1) : null;
- }
-
- // }}
-
- // {{ injected: WithDefaultsEntityRepository
- private WithDefaultsEntityRepository repository;
-
- public void setWithDefaultsEntityRepository(final WithDefaultsEntityRepository repository) {
- this.repository = repository;
- }
- // }}
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
deleted file mode 100644
index 158f949..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/defaults/WithDefaultsEntityRepository.java
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.defaults;
-
-import java.util.List;
-
-import org.apache.isis.applib.AbstractFactoryAndRepository;
-import org.apache.isis.applib.annotation.DomainService;
-import org.apache.isis.applib.annotation.MemberOrder;
-import org.apache.isis.applib.annotation.Named;
-import org.apache.isis.applib.annotation.QueryOnly;
-import org.apache.isis.applib.filter.Filter;
-
-@Named("Simples")
-@DomainService
-public class WithDefaultsEntityRepository extends AbstractFactoryAndRepository {
-
- @Override
- public String getId() {
- return "withDefaultsEntities";
- }
-
- @MemberOrder(sequence = "1")
- @QueryOnly
- public List<WithDefaultsEntity> list() {
- final Filter<Object> filterPersistentOnly = new Filter<Object>() {
-
- @Override
- public boolean accept(final Object t) {
- return getContainer().isPersistent(t);
- }
- };
- return allMatches(WithDefaultsEntity.class, filterPersistentOnly);
- }
-
- @MemberOrder(sequence = "3")
- public WithDefaultsEntity newTransientEntity() {
- return newTransientInstance(WithDefaultsEntity.class);
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
----------------------------------------------------------------------
diff --git a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java b/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
deleted file mode 100644
index c92e560..0000000
--- a/tck/tck-dom/src/main/java/org/apache/isis/core/tck/dom/movies/Movie.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.isis.core.tck.dom.movies;
-
-import java.util.List;
-
-import com.google.common.collect.Lists;
-
-import org.apache.isis.applib.annotation.ObjectType;
-
-@ObjectType("movies.MOVIE")
-public class Movie {
-
- public String title() {
- return name;
- }
-
- // {{ name: String
- private String name;
- public String getName() {
- return name;
- }
- public void setName(final String name) {
- this.name = name;
- }
- // }}
-
- // {{ director: Person
- private Person director;
- public Person getDirector() {
- return director;
- }
- public void setDirector(final Person director) {
- this.director = director;
- }
-
- // }}
-
- // {{ roles: List
- private final List<Role> roles = Lists.newArrayList();
- public List<Role> getRoles() {
- return roles;
- }
- public void addToRoles(final Role role) {
- roles.add(role);
- }
- public void removeFromRoles(final Role role) {
- roles.remove(role);
- }
- // }}
-}
[11/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java
deleted file mode 100644
index b7cd86d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistColl_thenResponseCode_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenDoesntExistColl_thenResponseCode_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java
deleted file mode 100644
index 30e4f2a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Post_whenDoesntExistOid_thenResponseCode_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Post_whenDoesntExistOid_thenResponseCode_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java
deleted file mode 100644
index 51b51b1..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenDisabled_then_403_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_givenDisabled_then_403_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java
deleted file mode 100644
index fff78cc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_givenEntityAlreadyInCollection_whenArgsValid_thenNoChange_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java
deleted file mode 100644
index 1c7a858..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_givenEntityNotInCollection_whenArgsValid_thenEntityAddedFromCollection_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
deleted file mode 100644
index 0113bd7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
deleted file mode 100644
index d6ed467..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java
deleted file mode 100644
index 911a131..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenHidden_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_givenHidden_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
deleted file mode 100644
index 16bffce..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_givenListSemantics_whenHrefArg_thenResponseCode_205_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java
deleted file mode 100644
index 61fa66b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index b8e9a79..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 26ff03c..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 0a35e97..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Put_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index 6e82ce0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_thenResponseHeaders_eTag_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java
deleted file mode 100644
index 26b4a44..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_then_200_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_then_200_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
deleted file mode 100644
index 70f225a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
deleted file mode 100644
index 63a4bd7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java
deleted file mode 100644
index eaffae2..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgIsMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenArgIsMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java
deleted file mode 100644
index 7ca2491..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgMandatoryButMissing_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenArgMandatoryButMissing_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
deleted file mode 100644
index b1cb4ba..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValid_thenEntityAddedToCollection_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Put_whenArgValid_thenEntityAddedToCollection_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
deleted file mode 100644
index 1eab1d8..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenArgValueIsInvalid_andQueryArg_XRoValidateOnly_4xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java
deleted file mode 100644
index 8a49792..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsInvalid_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenArgValueIsInvalid_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
deleted file mode 100644
index 6d1f856..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenArgValueIsValid_andQueryArg_XRoValidateOnly_2xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java
deleted file mode 100644
index 542e42b..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistColl_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenDoesntExistColl_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java
deleted file mode 100644
index fe75fc5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/collection/Put_whenDoesntExistOid_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.collection;
-
-public class Put_whenDoesntExistOid_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java
deleted file mode 100644
index 587f9cc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenDisabled_then_203_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Delete_givenDisabled_then_203_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
deleted file mode 100644
index d6eda398..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_givenEtag_whenIfMatchHeaderDoesMatch_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
deleted file mode 100644
index c51c878..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Delete_givenEtag_whenIfMatchHeaderDoesNotMatch_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java
deleted file mode 100644
index 98bc3f3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenHidden_thenResponseCode_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Delete_givenHidden_thenResponseCode_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java
deleted file mode 100644
index c5c7262..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_givenViewModel_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_givenViewModel_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java
deleted file mode 100644
index 91029fc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenPropertyValueCleared_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_thenPropertyValueCleared_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java
deleted file mode 100644
index b9005f4..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenRepresentation_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_thenRepresentation_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index e018ef0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Delete_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 62e8304..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Delete_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 4dd2285..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Delete_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index ec60e2a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_thenResponseHeaders_eTag_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java
deleted file mode 100644
index d9573b1..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_then_200_ok_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Delete_then_200_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
- /**
- * Tests change state, so discard such that will be recreated by next test.
- */
- @After
- public void tearDown() throws Exception {
- webServerRule.discardWebApp();
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java
deleted file mode 100644
index 1770b18..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenArgs_thenResponseCode_4xx_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Delete_whenArgs_thenResponseCode_4xx_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java
deleted file mode 100644
index 59ff384..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistOid_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Delete_whenDoesntExistOid_then_404_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java
deleted file mode 100644
index 8b79a0a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobject/oid/property/Delete_whenDoesntExistProp_then_404_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainobject.oid.property;
-
-public class Delete_whenDoesntExistProp_then_404_TODO {
-
-}
[30/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java
new file mode 100644
index 0000000..c9c3e99
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoArgRequired_whenNoArgProvided_ok.java
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenNoArgRequired_whenNoArgProvided_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "list");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/list/invoke"))
+ .arguments(JsonRepresentation.newMap())
+ .build());
+
+ // when
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink);
+
+ // then
+ then(restfulResponse);
+ }
+
+ private static void then(final RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
+ final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
+ assertThat(listRepr.getValue().size(), is(5));
+ }
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "list", null);
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ then(restfulResponse);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java
new file mode 100644
index 0000000..23a06f9
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO.java
@@ -0,0 +1,56 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenNoValidatableArgs_whenQueryArg_XroValidateOnly_ok_TODO {
+
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void success() throws Exception {
+ // should return 204 (13.3)
+ }
+
+ @Ignore
+ @Test
+ public void failure() throws Exception {
+ // should return 422, etc
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java
new file mode 100644
index 0000000..89a673e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenOptionalArg_whenNoArgProvided_ok.java
@@ -0,0 +1,159 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenOptionalArg_whenNoArgProvided_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow_whenExplicitlySetToNull() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args.mapPut("from.value", (Integer)null);
+ args.mapPut("to.value", (Integer)null);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ then(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy_whenExplicitlySetToNull() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from.value", (Integer)null);
+ args.mapPut("to.value", (Integer)null);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+ @Test
+ public void usingClientFollow_whenImplicitlySetToNull() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subListWithOptionalRange");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subListWithOptionalRange/invoke"))
+ .build());
+
+ // when
+ JsonRepresentation args = JsonRepresentation.newMap();
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ then(restfulResponse);
+ }
+
+
+ @Test
+ public void usingResourceProxy_whenImplicitlySetToNull() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subListWithOptionalRange", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+ }
+
+
+ private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
+
+ final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
+
+ assertThat(listRepr.getValue().size(), is(5));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java
new file mode 100644
index 0000000..752b0c5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad.java
@@ -0,0 +1,121 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasStatus;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenRefArg_whenArgIsHrefAndLinksToNonExistentEntity_bad {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given a reference to a non-existent entity
+ LinkRepresentation nonExistentEntityLink = new LinkRepresentation()
+ .withHref("http://localhost:39393/objects/NONEXISTENT/123");
+
+ // and given a representation of the 'contains' action accepting a entity href
+ final JsonRepresentation containsAction = Util.givenAction(client, "ActionsEntities", "contains");
+ final ObjectActionRepresentation containsActionRepr = containsAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = containsActionRepr.getInvoke();
+ final JsonRepresentation args = invokeLink.getArguments();
+
+ // when query the 'contains' action passing in the reference to the non-existent entity
+ args.mapPut("searchFor.value", nonExistentEntityLink);
+ args.mapPut("from.value", 0);
+ args.mapPut("to.value", 1);
+
+ RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ then(args, restfulResponse);
+ }
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given a reference to a non-existent entity
+ LinkRepresentation nonExistentEntityLink = new LinkRepresentation()
+ .withHref("http://localhost:39393/objects/NONEXISTENT/123");
+
+ // when query the 'contains' action passing in the reference to the non-existent entity
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("searchFor.value", nonExistentEntityLink);
+ args.mapPut("from.value", 0);
+ args.mapPut("to.value", 3);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(args, restfulResponse);
+ }
+
+ private static void then(final JsonRepresentation args, RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ // then the response is an error
+ assertThat(restfulResponse, hasStatus(HttpStatusCode.VALIDATION_FAILED));
+ assertThat(restfulResponse.getHeader(Header.WARNING), is("Validation failed, see body for details"));
+
+ // hmmm... what is the media type, though? the spec doesn't say. testing for a generic one.
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(MediaType.APPLICATION_JSON));
+
+ RestfulResponse<JsonRepresentation> restfulResponseOfError = restfulResponse.wraps(JsonRepresentation.class);
+ JsonRepresentation repr = restfulResponseOfError.getEntity();
+
+ assertThat(repr.getString("searchFor.value.href"), is(args.getString("searchFor.value.href")));
+ assertThat(repr.getString("searchFor.invalidReason"), is("'href' does not reference a known entity"));
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java
new file mode 100644
index 0000000..74845d5
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whenArgProvided_ok.java
@@ -0,0 +1,168 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ScalarValueRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenRefArg_whenArgProvided_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given a reference to the first entity
+ final ListRepresentation subListRepr = givenSublistActionInvoked(0, 1);
+ assertThat(subListRepr.getValue().size(), is(1));
+
+ LinkRepresentation firstEntityLink = subListRepr.getValue().arrayGet(0).asLink();
+
+ // and given a representation of the 'contains' action accepting a entity href
+ final JsonRepresentation containsAction = Util.givenAction(client, "ActionsEntities", "contains");
+ final ObjectActionRepresentation containsActionRepr = containsAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = containsActionRepr.getInvoke();
+ final JsonRepresentation args = invokeLink.getArguments();
+ assertThat(args.size(), is(3));
+
+ // when query the 'contains' action passing in the entity
+ // (for a range where the entity is contained in the range)
+ args.mapPut("searchFor.value", firstEntityLink);
+ args.mapPut("from.value", 0);
+ args.mapPut("to.value", 3);
+
+ RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsScalarValueOf(restfulResponse, true);
+
+
+ // and when query the 'contains' action for a different range which does not
+ // contain the entity
+ args.mapPut("searchFor.value", firstEntityLink);
+ args.mapPut("from.value", 3);
+ args.mapPut("to.values", 5);
+
+ restfulResponse = client.followT(invokeLink, args);
+
+ // then
+ thenResponseIsScalarValueOf(restfulResponse, false);
+ }
+
+
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given a reference to the first entity
+ final ListRepresentation subListRepr = givenSublistActionInvoked(0, 1);
+ LinkRepresentation firstEntityLink = subListRepr.getValue().arrayGet(0).asLink();
+
+ // when query the 'contains' action passing in the entity
+ // (for a range where the entity is contained in the range)
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("searchFor.value", firstEntityLink);
+ args.mapPut("from.value", 0);
+ args.mapPut("to.value", 3);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "contains", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ thenResponseIsScalarValueOf(restfulResponse, true);
+ }
+
+ private void thenResponseIsScalarValueOf(RestfulResponse<ActionResultRepresentation> restfulResponse, boolean value) throws IOException {
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+ assertThat(actionResultRepr.getResultType(), is(ResultType.SCALAR_VALUE));
+ JsonRepresentation resultRepr = actionResultRepr.getResult();
+ assertThat(resultRepr, is(not(nullValue())));
+
+ ScalarValueRepresentation scalarValueRepr = resultRepr.as(ScalarValueRepresentation.class);
+
+ LinkRepresentation returnTypeLink = scalarValueRepr.getLinkWithRel(Rel.RETURN_TYPE);
+ assertThat(returnTypeLink, is(not(nullValue())));
+ assertThat(returnTypeLink, isLink(client)
+ .rel(Rel.RETURN_TYPE)
+ .href(Matchers.endsWith(":39393/domain-types/boolean"))
+ .returning(HttpStatusCode.OK)
+ .build());
+
+ assertThat(scalarValueRepr.getValue().asBoolean(), is(value));
+ }
+
+
+ private ListRepresentation givenSublistActionInvoked(int from, int to) throws Exception {
+ final JsonRepresentation givenSubListAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenSubListAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+ final JsonRepresentation args = invokeLink.getArguments();
+
+ // when
+ args.mapPut("from.value", from);
+ args.mapPut("to.value", to);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+ return actionResultRepr.getResult().as(ListRepresentation.class);
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java
new file mode 100644
index 0000000..9dba3f3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.isis.core.webserver.WebServer;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+
+public class Get_givenRefArg_whnArgIsHrefAndLinksToEntityOfWrongType_ok_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ protected RestfulClient client;
+
+ @Before
+ public void setUp() throws Exception {
+ final WebServer webServer = webServerRule.getWebServer();
+ client = new RestfulClient(webServer.getBase());
+ }
+
+ @Ignore
+ @Test
+ public void success() throws Exception {
+ // should return 204 (13.3)
+ }
+
+ @Ignore
+ @Test
+ public void failure() throws Exception {
+ // should return 422, etc
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..7c6d289
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBigDecimal_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..a99d75a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBigDecimal_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..0dec01e
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBigInteger_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..f8d7c95
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBigInteger_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..d80e5fd
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBlob_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..fe637fa
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBlob_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBlob_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..8708e17
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBoolean_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..e858c7a
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgBoolean_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgBoolean_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..00676c3
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgClob_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgClob_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..c2b72f9
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgDateTime_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..8b2d4ae
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDateTime_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgDateTime_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..e42a304
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgDate_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..d7a633f
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDate_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgDate_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..d805010
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgDecimal_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..ec6bd33
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgDecimal_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgDecimal_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..2519e5c
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenScalarArgInteger_whenArgMalformed_bad_TODO {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args.mapPut("from.value", 1);
+ args.mapPut("to.value", 3);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ then(restfulResponse);
+ }
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from.value", 1);
+ args.mapPut("to.value", 3);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+ }
+
+ private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
+
+ final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
+
+ assertThat(listRepr.getValue().size(), is(2));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java
new file mode 100644
index 0000000..c3cb3bb
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgInteger_whenArgProvided_ok.java
@@ -0,0 +1,120 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+import java.io.IOException;
+import javax.ws.rs.core.Response;
+import org.hamcrest.Matchers;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.Rel;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
+import org.apache.isis.viewer.restfulobjects.applib.RestfulMediaType;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
+import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ActionResultRepresentation.ResultType;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ObjectActionRepresentation;
+import org.apache.isis.viewer.restfulobjects.applib.util.UrlEncodingUtils;
+import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
+import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
+import org.apache.isis.viewer.restfulobjects.tck.Util;
+
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaTypeProfile;
+import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+public class Get_givenScalarArgInteger_whenArgProvided_ok {
+
+ @Rule
+ public IsisWebServerRule webServerRule = new IsisWebServerRule();
+
+ private RestfulClient client;
+
+ private DomainServiceResource serviceResource;
+
+ @Before
+ public void setUp() throws Exception {
+ client = webServerRule.getClient();
+
+ serviceResource = client.getDomainServiceResource();
+ }
+
+ @Test
+ public void usingClientFollow() throws Exception {
+
+ // given
+ final JsonRepresentation givenAction = Util.givenAction(client, "ActionsEntities", "subList");
+ final ObjectActionRepresentation actionRepr = givenAction.as(ObjectActionRepresentation.class);
+
+ final LinkRepresentation invokeLink = actionRepr.getInvoke();
+
+ assertThat(invokeLink, isLink(client)
+ .rel(Rel.INVOKE)
+ .httpMethod(RestfulHttpMethod.GET)
+ .href(Matchers.endsWith(":39393/services/ActionsEntities/actions/subList/invoke"))
+ .build());
+
+ JsonRepresentation args =invokeLink.getArguments();
+ assertThat(args.size(), is(2));
+ assertThat(args, RestfulMatchers.mapHas("from"));
+ assertThat(args, RestfulMatchers.mapHas("to"));
+
+ // when
+ args.mapPut("from.value", 1);
+ args.mapPut("to.value", 3);
+
+ final RestfulResponse<ActionResultRepresentation> restfulResponse = client.followT(invokeLink, args);
+
+ then(restfulResponse);
+ }
+
+ @Test
+ public void usingResourceProxy() throws Exception {
+
+ // given, when
+ JsonRepresentation args = JsonRepresentation.newMap();
+ args.mapPut("from.value", 1);
+ args.mapPut("to.value", 3);
+ Response response = serviceResource.invokeActionQueryOnly("ActionsEntities", "subList", UrlEncodingUtils.urlEncode(args));
+ RestfulResponse<ActionResultRepresentation> restfulResponse = RestfulResponse.ofT(response);
+
+ // then
+ then(restfulResponse);
+ }
+
+ private static void then(RestfulResponse<ActionResultRepresentation> restfulResponse) throws IOException {
+ assertThat(restfulResponse.getHeader(Header.CONTENT_TYPE), hasMediaTypeProfile(RestfulMediaType.APPLICATION_JSON_ACTION_RESULT));
+ final ActionResultRepresentation actionResultRepr = restfulResponse.getEntity();
+
+ assertThat(actionResultRepr.getResultType(), is(ResultType.LIST));
+
+ final ListRepresentation listRepr = actionResultRepr.getResult().as(ListRepresentation.class);
+
+ assertThat(listRepr.getValue().size(), is(2));
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..dcfa4dd
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgString_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..2c6f778
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgString_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgString_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..a14ea36
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgTime_whenArgMalformed_bad_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java
new file mode 100644
index 0000000..ed84e0b
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgTime_whenArgProvided_ok_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgTime_whenArgProvided_ok_TODO {
+
+}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java
new file mode 100644
index 0000000..602fcfb
--- /dev/null
+++ b/mothballed/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainobjectorservice/id/action/invoke/Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO.java
@@ -0,0 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.viewer.restfulobjects.tck.domainobjectorservice.id.action.invoke;
+
+public class Get_givenScalarArgUtcMillisec_whenArgMalformed_bad_TODO {
+
+}
[03/48] isis git commit: ISIS-1178: mothballing the tck tests.
Posted by da...@apache.org.
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java
deleted file mode 100644
index 8b10d6a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Get_whenRequestHeaders_Accept_ok.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.MediaType;
-
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.ListRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-import org.jboss.resteasy.client.ClientRequest;
-import org.jboss.resteasy.client.ClientResponse;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_whenRequestHeaders_Accept_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private RestfulRequest request;
-
- private String href;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- href = Util.givenLinkToService(client, "JdkValuedEntities");
- request = client.createRequest(RestfulHttpMethod.GET, href);
- }
-
- @Test
- public void applicationJson_noProfile_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, MediaType.APPLICATION_JSON_TYPE);
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
- @Test
- public void applicationJson_profileDomainObject_returns200() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.DOMAIN_OBJECT.getMediaType());
- final RestfulResponse<DomainObjectRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
- @Test
- public void missingHeader_returns200() throws Exception {
-
- final RestfulResponse<DomainObjectRepresentation> restfulResp = request.executeT();
-
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.OK));
- }
-
- @Test
- public void applicationJson_profileIncorrect_returns406() throws Exception {
-
- request.withHeader(RestfulRequest.Header.ACCEPT, RepresentationType.VERSION.getMediaType());
- final RestfulResponse<ListRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
- }
-
- @Test
- public void incorrectMediaType_returnsNotAcceptable() throws Exception {
-
- // given
- final ClientRequest clientRequest = client.getClientRequestFactory().createRequest(href);
- clientRequest.accept(MediaType.APPLICATION_ATOM_XML_TYPE);
-
- // when
- final ClientResponse<?> resp = clientRequest.get();
- final RestfulResponse<JsonRepresentation> restfulResp = RestfulResponse.of(resp);
-
- // then
- assertThat(restfulResp.getStatus(), is(HttpStatusCode.NOT_ACCEPTABLE));
- }
-
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java
deleted file mode 100644
index b425b4a..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Post_then_405_bad.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource domainServiceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainServiceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = domainServiceResource.service("ActionsEntities");
- final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final DomainObjectRepresentation servicesRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = servicesRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to a service resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java
deleted file mode 100644
index 3a73c44..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/domainservice/serviceId/Put_then_405_bad.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.domainservice.serviceId;
-
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainServiceResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.Util;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private DomainServiceResource domainServiceResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- domainServiceResource = client.getDomainServiceResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
-
- // given
- final Response serviceResp = domainServiceResource.service("ActionsEntities");
- final RestfulResponse<DomainObjectRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final DomainObjectRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.PUT);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to a service resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java
deleted file mode 100644
index 54d7964..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Delete_then_405_bad.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Delete_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private HomePageResource homePageResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- homePageResource = client.getHomePageResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = homePageResource.homePage();
- final RestfulResponse<HomePageRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final HomePageRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the home page resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
deleted file mode 100644
index 5db4480..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private HomePageResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getHomePageResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
deleted file mode 100644
index 5685315..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private HomePageResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getHomePageResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java
deleted file mode 100644
index df7e573..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Post_then_405_bad.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Post_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private HomePageResource homePageResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- homePageResource = client.getHomePageResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = homePageResource.homePage();
- final RestfulResponse<HomePageRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final HomePageRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation postLink = selfLink.withMethod(RestfulHttpMethod.POST);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(postLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Posting to the home page resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java
deleted file mode 100644
index d07d5e7..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/homepage/root/Put_then_405_bad.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.homepage.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainObjectRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.homepage.HomePageResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-public class Put_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
- private HomePageResource homePageResource;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- homePageResource = client.getHomePageResource();
- }
-
- @Test
- public void followLink() throws Exception {
-
- // given
- final Response serviceResp = homePageResource.homePage();
- final RestfulResponse<HomePageRepresentation> serviceJsonResp = RestfulResponse.ofT(serviceResp);
- final HomePageRepresentation serviceRepr = serviceJsonResp.getEntity();
- final LinkRepresentation selfLink = serviceRepr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation putLink = selfLink.withMethod(RestfulHttpMethod.PUT);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(putLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Putting to the home page resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java
deleted file mode 100644
index 0417dc0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Delete_then_405_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Delete_then_405_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java
deleted file mode 100644
index 575d206..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Get_then_405_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Get_then_405_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java
deleted file mode 100644
index 0e09ec5..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_ok_TODO.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java
deleted file mode 100644
index 2e4e4a1..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_CacheControl_ok_TODO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_thenResponseHeaders_CacheControl_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java
deleted file mode 100644
index 6a3f280..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentLength_ok_TODO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_thenResponseHeaders_ContentLength_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java
deleted file mode 100644
index 2e59d4e..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_ContentType_ok_TODO.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-import org.junit.Before;
-import org.junit.Rule;
-
-import org.apache.isis.core.webserver.WebServer;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Post_thenResponseHeaders_ContentType_ok_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- protected RestfulClient client;
-
- @Before
- public void setUp() throws Exception {
- final WebServer webServer = webServerRule.getWebServer();
- client = new RestfulClient(webServer.getBase());
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java
deleted file mode 100644
index ccf8b70..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_Location_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_thenResponseHeaders_Location_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java
deleted file mode 100644
index 2931252..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_thenResponseHeaders_eTag_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_thenResponseHeaders_eTag_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java
deleted file mode 100644
index 2fab7fc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_then_201_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_then_201_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
deleted file mode 100644
index 0860425..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_whenArgIsHrefAndLinksToEntityOfWrongType_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
deleted file mode 100644
index b25a7aa..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_whenArgIsHrefAndLinksToNonExistentEntity_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java
deleted file mode 100644
index 6637f14..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMalformed_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_whenArgsMalformed_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java
deleted file mode 100644
index 9166228..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsMandatoryButMissing_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_whenArgsMandatoryButMissing_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java
deleted file mode 100644
index ffddefc..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Post_whenArgsValid_thenPersistsObject_ok_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Post_whenArgsValid_thenPersistsObject_ok_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java
deleted file mode 100644
index 8a8f5f3..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/objectsoftype/Put_then_405_bad_TODO.java
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.objectsoftype;
-
-public class Put_then_405_bad_TODO {
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java
deleted file mode 100644
index a20063d..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Delete_then_405_bad.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import javax.ws.rs.core.Response;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.*;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
-import static org.hamcrest.CoreMatchers.*;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-public class Delete_then_405_bad {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private UserResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getUserResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response resp = resource.user();
-
- final RestfulResponse<UserRepresentation> jsonResp = RestfulResponse.ofT(resp);
- final UserRepresentation repr = jsonResp.getEntity();
- final LinkRepresentation selfLink = repr.getLinkWithRel(Rel.SELF);
- final LinkRepresentation deleteLink = selfLink.withMethod(RestfulHttpMethod.DELETE);
-
- // when
- final RestfulResponse<JsonRepresentation> restfulResponse = client.follow(deleteLink);
-
- // then
- assertThat(restfulResponse.getStatus(), is(RestfulResponse.HttpStatusCode.METHOD_NOT_ALLOWED));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("Deleting the user resource is not allowed."));
- }
-
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
deleted file mode 100644
index acaabfb..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsFormal_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private UserResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getUserResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
deleted file mode 100644
index 5516779..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_givenDomainModelSchemeIsSimple_thenRepresentation_TODO {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private UserResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getUserResource();
- }
-
- @Ignore
- @Test
- public void representation() throws Exception {
-
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java
deleted file mode 100644
index 6578b26..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenRepresentation_ok.java
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.assertThat;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isArray;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isLink;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.isMap;
-import static org.hamcrest.CoreMatchers.endsWith;
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.CoreMatchers.not;
-import static org.hamcrest.CoreMatchers.nullValue;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-import javax.ws.rs.core.Response.Status.Family;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.Rel;
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenRepresentation_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private UserResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getUserResource();
- }
-
- @Test
- public void representation() throws Exception {
-
- // given
- final Response resp = resource.user();
-
- // when
- final RestfulResponse<UserRepresentation> jsonResp = RestfulResponse.ofT(resp);
- assertThat(jsonResp.getStatus().getFamily(), is(Family.SUCCESSFUL));
-
- // then
- assertThat(jsonResp.getStatus(), is(HttpStatusCode.OK));
-
- final UserRepresentation repr = jsonResp.getEntity();
- assertThat(repr, is(not(nullValue())));
- assertThat(repr.isMap(), is(true));
-
- assertThat(repr.getSelf(), isLink(client)
- .rel(Rel.SELF)
- .href(endsWith(":39393/user"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.USER.getMediaType())
- .returning(HttpStatusCode.OK)
- );
-
- assertThat(repr.getUp(), isLink(client)
- .rel(Rel.UP)
- .href(endsWith(":39393/"))
- .httpMethod(RestfulHttpMethod.GET)
- .type(RepresentationType.HOME_PAGE.getMediaType())
- .returning(HttpStatusCode.OK)
- );
- assertThat(repr.getUserName(), is(not(nullValue())));
-
- // TODO: change fixture so populated
- assertThat(repr.getFriendlyName(), is(nullValue()));
- assertThat(repr.getEmail(), is(nullValue()));
- assertThat(repr.getRoles(), is(not(nullValue())));
-
- assertThat(repr.getLinks(), isArray());
- assertThat(repr.getExtensions(), isMap());
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java
deleted file mode 100644
index 358cba1..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_CacheControl_ok.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMaxAge;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.CacheControl;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_CacheControl_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private UserResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getUserResource();
- }
-
-
- @Test
- public void ok() throws Exception {
-
- // given
- final Response resp = resource.user();
-
- // when
- final RestfulResponse<UserRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- final CacheControl cacheControl = restfulResponse.getHeader(Header.CACHE_CONTROL);
- assertThat(cacheControl, hasMaxAge(60 * 60));
- assertThat(cacheControl.getMaxAge(), is(60 * 60));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
deleted file mode 100644
index 7a094f0..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentLength_ok.java
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import static org.apache.isis.core.commons.matchers.IsisMatchers.greaterThan;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.Response;
-
-import org.apache.isis.core.commons.matchers.IsisMatchers;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-public class Get_thenResponseHeaders_ContentLength_ok {
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private UserResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getUserResource();
- }
-
-
- @Test
- public void ok() throws Exception {
-
- // given
- final Response resp = resource.user();
-
- // when
- final RestfulResponse<UserRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- assertThat(restfulResponse.getHeader(Header.CONTENT_LENGTH), is(greaterThan(100)));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java
deleted file mode 100644
index a737f94..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_thenResponseHeaders_ContentType_ok.java
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasParameter;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasSubType;
-import static org.apache.isis.viewer.restfulobjects.tck.RestfulMatchers.hasMediaType;
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.RepresentationType;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.Header;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserResource;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_thenResponseHeaders_ContentType_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private UserResource resource;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- resource = client.getUserResource();
- }
-
-
- @Test
- public void ok() throws Exception {
-
- // given
- final Response resp = resource.user();
-
- // when
- final RestfulResponse<UserRepresentation> restfulResponse = RestfulResponse.ofT(resp);
-
- // then
- final MediaType contentType = restfulResponse.getHeader(Header.CONTENT_TYPE);
- assertThat(contentType, hasMediaType("application"));
- assertThat(contentType, hasSubType("json"));
- assertThat(contentType, hasParameter("profile", "urn:org.restfulobjects:repr-types/user"));
- assertThat(contentType, is(RepresentationType.USER.getMediaType()));
- }
-}
http://git-wip-us.apache.org/repos/asf/isis/blob/93a1d5cc/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java
----------------------------------------------------------------------
diff --git a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java b/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java
deleted file mode 100644
index 2054529..0000000
--- a/tck/tck-viewer-restfulobjects/src/test/java/org/apache/isis/viewer/restfulobjects/tck/user/root/Get_whenQueryArg_xRoDomainModel_ok.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.viewer.restfulobjects.tck.user.root;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.junit.Assert.assertThat;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-
-import org.apache.isis.viewer.restfulobjects.applib.RestfulHttpMethod;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulClient;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulRequest.RequestParameter;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse;
-import org.apache.isis.viewer.restfulobjects.applib.client.RestfulResponse.HttpStatusCode;
-import org.apache.isis.viewer.restfulobjects.applib.user.UserRepresentation;
-import org.apache.isis.viewer.restfulobjects.tck.IsisWebServerRule;
-
-public class Get_whenQueryArg_xRoDomainModel_ok {
-
- @Rule
- public IsisWebServerRule webServerRule = new IsisWebServerRule();
-
- private RestfulClient client;
- private RestfulRequest request;
-
- @Before
- public void setUp() throws Exception {
- client = webServerRule.getClient();
- request = client.createRequest(RestfulHttpMethod.GET, "user");
- }
-
- @Test
- public void simple_rejected() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "simple");
- final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.BAD_REQUEST));
- assertThat(restfulResponse.getHeader(RestfulResponse.Header.WARNING), is("x-ro-domain-model of 'simple' is not supported"));
- }
-
- @Test
- public void formal_accepted() throws Exception {
-
- request.withArg(RequestParameter.DOMAIN_MODEL, "formal");
- final RestfulResponse<UserRepresentation> restfulResponse = request.executeT();
-
- assertThat(restfulResponse.getStatus(), is(HttpStatusCode.OK));
- }
-
-}