Examples of wasExecuted()


Examples of com.eclipsesource.tabris.internal.ui.TestAction.wasExecuted()

  public void testSelectionEvent_executeAction() {
    mockUI( mock( ActionListener.class ) );
    control.notifyListeners( SWT.Selection, new Event() );

    TestAction action = ( TestAction )actionDescriptor.getAction();
    assertTrue( action.wasExecuted() );
  }

  @Test
  public void testSelectionEventNotifiesListeners() {
    ActionListener listener = mock( ActionListener.class );
View Full Code Here

Examples of org.springframework.core.task.MockRunnable.wasExecuted()

    RequestContextHolder.getRequestAttributes().registerDestructionCallback(
        "test", runnable, RequestAttributes.SCOPE_REQUEST);

    listener.requestDestroyed(new ServletRequestEvent(context, request));
    assertNull(RequestContextHolder.getRequestAttributes());
    assertTrue(runnable.wasExecuted());
  }

  public void testRequestContextListenerWithSameThreadAndAttributesGone() {
    RequestContextListener listener = new RequestContextListener();
    MockServletContext context = new MockServletContext();
View Full Code Here

Examples of org.springframework.core.task.MockRunnable.wasExecuted()

        "test", runnable, RequestAttributes.SCOPE_REQUEST);

    request.clearAttributes();
    listener.requestDestroyed(new ServletRequestEvent(context, request));
    assertNull(RequestContextHolder.getRequestAttributes());
    assertTrue(runnable.wasExecuted());
  }

  public void testRequestContextListenerWithDifferentThread() {
    final RequestContextListener listener = new RequestContextListener();
    final MockServletContext context = new MockServletContext();
View Full Code Here

Examples of org.springframework.core.task.MockRunnable.wasExecuted()

    }
    catch (InterruptedException ex) {
    }
    // Still bound to original thread, but at least completed.
    assertNotNull(RequestContextHolder.getRequestAttributes());
    assertTrue(runnable.wasExecuted());

    // Check that a repeated execution in the same thread works and performs cleanup.
    listener.requestInitialized(new ServletRequestEvent(context, request));
    listener.requestDestroyed(new ServletRequestEvent(context, request));
    assertNull(RequestContextHolder.getRequestAttributes());
View Full Code Here

Examples of org.springframework.core.task.MockRunnable.wasExecuted()

    RequestContextHolder.getRequestAttributes().registerDestructionCallback(
        "test", runnable, RequestAttributes.SCOPE_REQUEST);

    listener.requestDestroyed(new ServletRequestEvent(context, request));
    assertNull(RequestContextHolder.getRequestAttributes());
    assertTrue(runnable.wasExecuted());
  }

  public void testRequestContextListenerWithSameThreadAndAttributesGone() {
    RequestContextListener listener = new RequestContextListener();
    MockServletContext context = new MockServletContext();
View Full Code Here

Examples of org.springframework.core.task.MockRunnable.wasExecuted()

        "test", runnable, RequestAttributes.SCOPE_REQUEST);

    request.clearAttributes();
    listener.requestDestroyed(new ServletRequestEvent(context, request));
    assertNull(RequestContextHolder.getRequestAttributes());
    assertTrue(runnable.wasExecuted());
  }

  public void testRequestContextListenerWithDifferentThread() {
    final RequestContextListener listener = new RequestContextListener();
    final MockServletContext context = new MockServletContext();
View Full Code Here

Examples of org.springframework.core.task.MockRunnable.wasExecuted()

    }
    catch (InterruptedException ex) {
    }
    // Still bound to original thread, but at least completed.
    assertNotNull(RequestContextHolder.getRequestAttributes());
    assertTrue(runnable.wasExecuted());

    // Check that a repeated execution in the same thread works and performs cleanup.
    listener.requestInitialized(new ServletRequestEvent(context, request));
    listener.requestDestroyed(new ServletRequestEvent(context, request));
    assertNull(RequestContextHolder.getRequestAttributes());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.