Examples of MyAction


Examples of com.gwtplatform.mvp.client.proxy.AsyncEventPresenterTestUtil.MyAction

    @Test
    public void shouldSetLoadingAndNullOnSuccessfulServerCall() {
        // given
        TestDispatchAsync spy = spy(new TestDispatchAsync(service, injector));
        AsyncEventPresenterTestUtil presenter = new AsyncEventPresenterTestUtil(eventBus, view, proxy, spy);
        willAnswer(new GetAsynchronousAnswer()).given(spy).execute(eq(new MyAction()),
                Matchers.<AsyncCallback<MyResult>>any());

        // when
        presenter.onBind();
        presenter.executeAsync();
View Full Code Here

Examples of com.gwtplatform.mvp.client.proxy.AsyncEventPresenterTestUtil.MyAction

    @Test
    public void shouldSetLoadingAndFailureOnFailedServerCall() {
        // given
        TestDispatchAsync spy = spy(new TestDispatchAsync(service, injector));
        AsyncEventPresenterTestUtil presenter = new AsyncEventPresenterTestUtil(eventBus, view, proxy, spy);
        willAnswer(new GetAsynchronousFailureAnswer()).given(spy).execute(eq(new MyAction()),
                Matchers.<AsyncCallback<MyResult>>any());

        // when
        presenter.onBind();
        presenter.executeAsync();
View Full Code Here

Examples of gnu.testlet.javax.swing.AbstractAction.MyAction

  private void testConstructor1(TestHarness harness)
  {
    harness.checkPoint("JMenuItem(Action)");
   
    // check for bug parade 4304129
    MyAction a = new MyAction();
    a.putValue(Action.NAME, "Action 1");
    a.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke('A'));
    a.putValue(Action.MNEMONIC_KEY, new Integer(50));
    a.putValue(Action.ACTION_COMMAND_KEY, "ActionCommand");
    JMenuItem item = new JMenuItem(a);
    harness.check(item.getText(), "Action 1");
    harness.check(item.getAccelerator(), KeyStroke.getKeyStroke('A'));
    harness.check(item.getMnemonic(), 50);
    harness.check(item.getActionCommand(), "ActionCommand");
View Full Code Here

Examples of javax.swing.JPopupMenuTest.MyAction

            }
        }
        ;
        Icon icon = createNewIcon();
        String text = "texttext";
        MyAction action = new MyAction(text, icon);
        JMenuItem menuItem1 = menu.createActionComponent(action);
        assertEquals("icon ", icon, menuItem1.getIcon());
        assertEquals("text ", text, menuItem1.getText());
        assertNull("action", menuItem1.getAction());
        assertEquals("command ", text, menuItem1.getActionCommand());
View Full Code Here

Examples of javax.swing.JPopupMenuTest.MyAction

     * Test method for 'javax.swing.JMenu.insert(Action, int)'
     */
    public void testInsertActionInt() {
        Icon icon = createNewIcon();
        String text = "texttext";
        MyAction action1 = new MyAction(text, icon);
        MyAction action2 = new MyAction(text, icon);
        JMenuItem item = menu.insert(action1, 0);
        assertEquals(1, menu.getItemCount());
        JMenuItem menuItem = menu.getItem(0);
        assertSame(item, menuItem);
        assertEquals("icon ", icon, menuItem.getIcon());
View Full Code Here

Examples of javax.swing.JPopupMenuTest.MyAction

            }
        }
        ;
        Icon icon = createNewIcon();
        String text = "texttext";
        MyAction action = new MyAction(text, icon);
        button = menuItem = menu = new JMenu(action);
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", text, menuItem.getText());
        assertEquals("action", action, menuItem.getAction());
        assertEquals("command ", command, menuItem.getActionCommand());
        assertFalse("selected ", menuItem.isSelected());
        assertTrue("enabled ", menuItem.isEnabled());
        assertNull("accelerator ", menuItem.getAccelerator());
        assertTrue(menuItem.isFocusable());
        assertEquals(200, menu.getDelay());
        action.setEnabled(false);
        button = menuItem = menu = new JMenu(action);
        assertEquals("icon ", icon, menuItem.getIcon());
        assertEquals("text ", text, menuItem.getText());
        assertEquals("action", action, menuItem.getAction());
        assertEquals("command ", command, menuItem.getActionCommand());
View Full Code Here

Examples of javax.swing.JPopupMenuTest.MyAction

            }
        }
        ;
        Icon icon = createNewIcon();
        String text = "texttext";
        MyAction action = new MyAction(text, icon);
        JMenuItem menuItem1 = menu.createActionComponent(action);
        assertEquals("icon ", icon, menuItem1.getIcon());
        assertEquals("text ", text, menuItem1.getText());
        assertNull("action", menuItem1.getAction());
        assertEquals("command ", text, menuItem1.getActionCommand());
View Full Code Here

Examples of javax.swing.JPopupMenuTest.MyAction

     * Test method for 'javax.swing.JMenu.insert(Action, int)'
     */
    public void testInsertActionInt() {
        Icon icon = createNewIcon();
        String text = "texttext";
        MyAction action1 = new MyAction(text, icon);
        MyAction action2 = new MyAction(text, icon);
        JMenuItem item = menu.insert(action1, 0);
        assertEquals(1, menu.getItemCount());
        JMenuItem menuItem = menu.getItem(0);
        assertSame(item, menuItem);
        assertEquals("icon ", icon, menuItem.getIcon());
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.