lantunes / fixd

An HTTP Server Fixture for Testing HTTP Clients and mocking web services, and a Java Micro Web Framework
http://bigtesting.org/fixd
Apache License 2.0
41 stars 6 forks source link

Requests for an Upon handler result in broadcasts to any and all subscribers #22

Closed lantunes closed 10 years ago

lantunes commented 10 years ago

Given the following setup:

server.handle(Method.GET, "/subscr1")
          .with(200, "text/plain", "message1")
          .upon(Method.GET, "/broadc1");

server.handle(Method.GET, "/subscr2")
          .with(200, "text/plain", "message2")
          .upon(Method.GET, "/broadc2");

A request for "broadc2" will result in a client suspended on "/subscr1" getting a response of "message1". Broadcasts should only be made for requests to the corresponding Upon handlers.