コード例 #1
0
 @Before
 public void setUp() throws Exception {
   createProgrammes();
   TVProgrammeMetadataServer mockServer = mock(TVProgrammeMetadataServer.class);
   when(mockServer.getProgrammeStore()).thenReturn(store);
   Application.setCurrent(mockServer);
 }
コード例 #2
0
ファイル: Engine.java プロジェクト: florhaf/ravent
 /** Clears the thread local variables set by the Restlet API and engine. */
 public static void clearThreadLocalVariables() {
   Response.setCurrent(null);
   Context.setCurrent(null);
   org.restlet.routing.VirtualHost.setCurrent(null);
   org.restlet.Application.setCurrent(null);
 }