use of org.atmosphere.runtime.AtmosphereRequest in project atmosphere by Atmosphere.
the class ManagedAtmosphereHandlerTest method testNamed.
@Test
public void testNamed() throws IOException, ServletException {
AtmosphereRequest request = new AtmosphereRequestImpl.Builder().pathInfo("/named").method("GET").build();
framework.doCometSupport(request, AtmosphereResponseImpl.newInstance());
assertNotNull(r.get());
r.get().resume();
assertNotNull(r.get().getBroadcaster());
assertEquals(r.get().getBroadcaster().getID(), "/test");
}
use of org.atmosphere.runtime.AtmosphereRequest in project atmosphere by Atmosphere.
the class ManagedAtmosphereHandlerTest method testMessage.
@Test
public void testMessage() throws IOException, ServletException {
AtmosphereRequest request = new AtmosphereRequestImpl.Builder().pathInfo("/e").method("GET").build();
framework.doCometSupport(request, AtmosphereResponseImpl.newInstance());
assertNotNull(r.get());
r.get().resume();
assertNotNull(message.get());
assertEquals(message.get(), "message");
}
use of org.atmosphere.runtime.AtmosphereRequest in project atmosphere by Atmosphere.
the class ManagedAtmosphereHandlerTest method testDelete.
@Test
public void testDelete() throws IOException, ServletException {
AtmosphereRequest request = new AtmosphereRequestImpl.Builder().pathInfo("/c").method("DELETE").build();
framework.doCometSupport(request, AtmosphereResponseImpl.newInstance());
assertNotNull(r.get());
r.get().resume();
}
use of org.atmosphere.runtime.AtmosphereRequest in project atmosphere by Atmosphere.
the class ManagedAtmosphereHandlerTest method testMessageWithResource.
@Test
public void testMessageWithResource() throws IOException, ServletException {
AtmosphereRequest request = new AtmosphereRequestImpl.Builder().pathInfo("/k").method("GET").build();
framework.doCometSupport(request, AtmosphereResponseImpl.newInstance());
assertNotNull(r.get());
r.get().resume();
assertNotNull(message.get());
assertEquals(message.get(), "message");
}
use of org.atmosphere.runtime.AtmosphereRequest in project atmosphere by Atmosphere.
the class ManagedAtmosphereHandlerTest method testReaderMessage.
@Test
public void testReaderMessage() throws IOException, ServletException {
AtmosphereRequest request = new AtmosphereRequestImpl.Builder().pathInfo("/readerInjection").method("GET").build();
framework.doCometSupport(request, AtmosphereResponseImpl.newInstance());
assertNotNull(r.get());
r.get().resume();
assertNotNull(message.get());
assertEquals(message.get(), "message");
}
Aggregations