Class HyperstateTests

0

tests

0

failures

0

ignored

-

duration

-

successful

Tests

Test Duration Result

Standard output

Feature: Service Exposer
    In order minimise the code I need to write to produce a service
    and to ensure consistency for the services I create
    As a service developer
    I want to have REST services automatically created for my domain entity classes
2016-07-01 04:02:42.306 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "GET /hyperstateTest HTTP/1.1[\r][\n]"
2016-07-01 04:02:42.310 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Accept: application/json, application/json, application/*+json, application/*+json[\r][\n]"
2016-07-01 04:02:42.311 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Host: localhost:35601[\r][\n]"
2016-07-01 04:02:42.312 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 04:02:42.313 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 04:02:42.313 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "[\r][\n]"
2016-07-01 04:02:42.379  INFO 2903 --- [o-auto-2-exec-4] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring FrameworkServlet 'dispatcherServlet'
2016-07-01 04:02:42.380  INFO 2903 --- [o-auto-2-exec-4] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization started
2016-07-01 04:02:42.395  INFO 2903 --- [o-auto-2-exec-4] o.s.web.servlet.DispatcherServlet        : FrameworkServlet 'dispatcherServlet': initialization completed in 14 ms
2016-07-01 04:02:42.773 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 04:02:42.774 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 04:02:42.782 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 04:02:42.782 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 04:02:42.782 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-07-01 04:02:42.782 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 04:02:42.783 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Date: Fri, 01 Jul 2016 04:02:42 GMT[\r][\n]"
2016-07-01 04:02:42.783 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:42.820 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "de[\r][\n]"
2016-07-01 04:02:42.822 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "{"class":["HyperstateRootEntity"],"links":[{"href":"https://localhost:35601/hyperstateTest/accounts","rel":["accounts"]},{"href":"https://localhost:35601/hyperstateTest","rel":["self"]}],"title":"HyperstateTestController"}[\r][\n]"
2016-07-01 04:02:42.823 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "0[\r][\n]"
2016-07-01 04:02:42.824 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:42.998 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "GET /hyperstateTest HTTP/1.1[\r][\n]"
2016-07-01 04:02:42.998 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Accept: application/json, application/json, application/*+json, application/*+json[\r][\n]"
2016-07-01 04:02:42.998 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Host: localhost:35601[\r][\n]"
2016-07-01 04:02:42.999 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 04:02:42.999 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 04:02:42.999 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "[\r][\n]"
2016-07-01 04:02:43.090 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 04:02:43.090 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Date: Fri, 01 Jul 2016 04:02:42 GMT[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "de[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "{"class":["HyperstateRootEntity"],"links":[{"href":"https://localhost:35601/hyperstateTest/accounts","rel":["accounts"]},{"href":"https://localhost:35601/hyperstateTest","rel":["self"]}],"title":"HyperstateTestController"}[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "0[\r][\n]"
2016-07-01 04:02:43.091 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:43.166 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 >> "GET /hyperstateTest/accounts HTTP/1.1[\r][\n]"
2016-07-01 04:02:43.166 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 >> "Accept: application/vnd.siren+json[\r][\n]"
2016-07-01 04:02:43.166 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 >> "Host: localhost:35601[\r][\n]"
2016-07-01 04:02:43.166 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 04:02:43.166 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 >> "User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 04:02:43.166 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 >> "Accept-Encoding: gzip,deflate[\r][\n]"
2016-07-01 04:02:43.166 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 >> "[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "Content-Type: application/vnd.siren+json;charset=UTF-8[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "Date: Fri, 01 Jul 2016 04:02:42 GMT[\r][\n]"
2016-07-01 04:02:43.223 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:43.236 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "7d[\r][\n]"
2016-07-01 04:02:43.237 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "{"class":["Accounts"],"links":[{"href":"https://localhost:35601/hyperstateTest/accounts","rel":["self"]}],"title":"Accounts"}"
2016-07-01 04:02:43.246 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:43.247 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "0[\r][\n]"
2016-07-01 04:02:43.247 DEBUG 2903 --- [    Test worker] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:43.300 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "GET /hyperstateTest/test/testAccount HTTP/1.1[\r][\n]"
2016-07-01 04:02:43.300 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Accept: application/json, application/json, application/*+json, application/*+json[\r][\n]"
2016-07-01 04:02:43.300 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Host: localhost:35601[\r][\n]"
2016-07-01 04:02:43.300 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "Connection: Keep-Alive[\r][\n]"
2016-07-01 04:02:43.300 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "User-Agent: Apache-HttpAsyncClient/4.1.2 (Java/1.8.0_51)[\r][\n]"
2016-07-01 04:02:43.300 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 >> "[\r][\n]"
2016-07-01 04:02:43.326 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "HTTP/1.1 200 OK[\r][\n]"
2016-07-01 04:02:43.326 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Server: Apache-Coyote/1.1[\r][\n]"
2016-07-01 04:02:43.326 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "X-Application-Context: HyperstateTest:integration:0[\r][\n]"
2016-07-01 04:02:43.326 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Vary: Accept[\r][\n]"
2016-07-01 04:02:43.327 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Content-Type: application/json;charset=UTF-8[\r][\n]"
2016-07-01 04:02:43.327 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Transfer-Encoding: chunked[\r][\n]"
2016-07-01 04:02:43.327 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "Date: Fri, 01 Jul 2016 04:02:42 GMT[\r][\n]"
2016-07-01 04:02:43.327 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"
2016-07-01 04:02:43.327 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "c3[\r][\n]"
2016-07-01 04:02:43.327 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "{"class":["Account"],"properties":{"creationDate":"2016/01/15","username":"tom"},"links":[{"href":"https://localhost:35601/hyperstateTest/test/testAccount","rel":["self"]}],"title":"The Account"}[\r][\n]"
2016-07-01 04:02:43.328 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "0[\r][\n]"
2016-07-01 04:02:43.328 DEBUG 2903 --- [/O dispatcher 1] org.apache.http.wire                     : http-outgoing-0 << "[\r][\n]"

  Scenario: Expose single domain entity                                                                                        ?[90m# serviceExposer.feature:21?[0m
    ?[32mGiven ?[0m?[32man "?[0m?[32m?[1mAccount?[0m?[32m" domain entity with?[0m                                                                                      ?[90m# StepDefs.an_domain_entity_with(String,String,String>)?[0m
    ?[32mAnd ?[0m?[32mit has no actions?[0m                                                                                                      ?[90m# StepDefs.it_has_no_actions()?[0m
    ?[32mAnd ?[0m?[32mit's only link is self link referencing "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m"?[0m                                             ?[90m# StepDefs.it_s_only_link_is_self_link_referencing(String)?[0m
    ?[32mAnd ?[0m?[32mit is exposed at "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m"?[0m                                                                    ?[90m# StepDefs.it_is_exposed_at(String)?[0m
    ?[32mWhen ?[0m?[32mrequest is made to "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m" for an "?[0m?[32m?[1mau.com.mountainpass.hyperstate.server.entities.Account?[0m?[32m"?[0m ?[90m# StepDefs.request_is_made_to_for_an(String,String)?[0m
    ?[32mThen ?[0m?[32mthe response will be an "?[0m?[32m?[1mAccount?[0m?[32m" domain entity with?[0m                                                                  ?[90m# StepDefs.the_response_will_be_an_domain_entity_with(String,String,String>)?[0m
    ?[32mAnd ?[0m?[32mit will have no actions?[0m                                                                                                ?[90m# StepDefs.it_will_have_no_actions()?[0m
    ?[32mAnd ?[0m?[32mit will have no links apart from "?[0m?[32m?[1mself?[0m?[32m"?[0m                                                                                ?[90m# StepDefs.it_will_have_no_links_apart_from(String)?[0m
    ?[32mAnd ?[0m?[32mit will have a self link referencing "?[0m?[32m?[1m/hyperstateTest/test/testAccount?[0m?[32m"?[0m                                                ?[90m# StepDefs.it_will_have_a_self_link_referencing(String)?[0m

3 Scenarios (?[32m3 passed?[0m)
18 Steps (?[32m18 passed?[0m)
0m1.533s