@RequestMapping(value = "/programs.htm", method = RequestMethod.GET) public String programs(final Model model) { final List<Meta> knownClasses = executionService.getKnownClasses(); final Map map = TransformedMap.decorate(new MultiValueMap(), TransformerUtils.invokerTransformer("getProgram"), TransformerUtils.nopTransformer()); for (final Meta meta : knownClasses) { map.put(meta, meta); } model.addAttribute("programmap", map); return "programs"; }
public final void testLoadPxtSessionWhenPxtSessionIdIsNull() { setUpLoadPxtSession(); context().checking(new Expectations() { { allowing(mockRequest).getCookies(); will(returnValue(null)); } }); pxtSessionDelegate.setCreatePxtSessionCallback( TransformerUtils.constantTransformer(getPxtSession())); pxtSessionDelegate.loadPxtSession(getRequest()); }
public final void testLoadPxtSessionWhenPxtSessionIdIsInvalid() { setUpLoadPxtSession(); context().checking(new Expectations() { { allowing(mockRequest).getCookies(); will(returnValue(new Cookie[] {getPxtCookie()})); } }); pxtSessionDelegate.setCreatePxtSessionCallback( TransformerUtils.constantTransformer(getPxtSession())); pxtSessionDelegate.loadPxtSession(getRequest()); }
PxtSessionDelegateImplStub() { findPxtSessionByIdCallback = TransformerUtils.nullTransformer(); createPxtSessionCallback = TransformerUtils.nullTransformer(); }