@InterceptorBinding @Inherited @Target(value={METHOD,TYPE}) @Retention(value=RUNTIME) public @interface InSessionScope
@Test
@InSessionScope
// This test will be run within the context of a session
void testStart() {
starship.start();
}
Remember to add an implementation of HttpServletRequest to your test e.g.
@Produces
HttpServletRequest getRequest() {
return new DummyHttpRequest();
}
Copyright © 2017–2018. All rights reserved.