Package gov.nasa.arc.mct.gui

Examples of gov.nasa.arc.mct.gui.ContextAwareAction.actionPerformed()


        Mockito.verifyZeroInteractions(mockWindowManager);
        Mockito.verifyZeroInteractions(mockContentArea);
        Mockito.verifyZeroInteractions(mockViewInfo);
       
        // Perform action
        refresh.actionPerformed(mockEvent);
       
        // Verify that view was updated
        Mockito.verify(mockViewInfo).createView(newerComponent);
        Mockito.verify(mockContentArea).setOwnerComponentCanvasManifestation(newerView);
       
View Full Code Here


        Mockito.verifyZeroInteractions(mockWindowManager);
        Mockito.verifyZeroInteractions(mockContentArea);
        Mockito.verifyZeroInteractions(mockViewInfo);       
              
        // Perform action
        refresh.actionPerformed(mockEvent);

        // Verify that dialog was invoked
        Mockito.verify(mockWindowManager).showInputDialog(Mockito.anyString(), Mockito.anyString(), Mockito.<Object[]>any(), Mockito.any(), Mockito.<Map<String,Object>>any());
       
        // Verify that view was updated only if confirmed
View Full Code Here

        ContextAwareAction refresh = new RefreshAction();
        Assert.assertTrue(refresh.canHandle(mockContext));
        Assert.assertTrue(refresh.isEnabled());
       
        // Verify actionPerformed triggers appropriate method
        refresh.actionPerformed(mockEvent);
        Mockito.verify(mockInspector).setHousedViewManifestation(mockViewInfo);
    }
}
View Full Code Here

       
        // Already tested in testQuitEnabled, but also need to obey action's life cycle
        Assert.assertEquals(quit.canHandle(mockActionContext), housings > 0);
       
        // Trigger the action - this is the method we are testing
        quit.actionPerformed(mockEvent);
       
        // A dialog should have been requested
        Mockito.verify(mockWindowManager, Mockito.times(1)).showInputDialog(Mockito.anyString(), Mockito.anyString(), Mockito.<Object[]>any(), Mockito.any(), Mockito.<Map<String,Object>>any());
       
        // All housings should be closed, iff dialog was confirmed
View Full Code Here

       
        // Already tested in testQuitEnabled, but also need to obey action's life cycle
        Assert.assertEquals(quit.canHandle(mockActionContext), housings > 0);
       
        // Trigger the action - this is the method we are testing
        quit.actionPerformed(mockEvent);
       
        // A dialog should have been requested
        Mockito.verify(mockWindowManager, Mockito.times(1)).showInputDialog(Mockito.anyString(), Mockito.anyString(), Mockito.<Object[]>any(), Mockito.any(), Mockito.<Map<String,Object>>any());
       
        // All housings should be closed, iff dialog was confirmed
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.