Package gov.nasa.arc.mct.gui

Examples of gov.nasa.arc.mct.gui.ActionContext


    (new ComponentRegistryAccess()).setRegistry(componentRegistry);
  }

  @Test
  public void testNoSelections() {
    ActionContext context = new TestContext(ownedView);
    Mockito.when(componentRegistry.isCreatable(Mockito.<Class<?>>any())).thenReturn(true);
    expect(exportThisAction, true, true, context);
    expect(exportAction, false, true, context);
  }
View Full Code Here


    expect(exportAction, false, true, context);
  }

  @Test
  public void testNoSelectionsUncreatable() {
    ActionContext context = new TestContext(uncreatableView);
    Mockito.when(componentRegistry.isCreatable(Mockito.<Class<?>>any())).thenReturn(false);
    expect(exportThisAction, true, false, context);
    expect(exportAction, false, false, context);
  }
View Full Code Here

    expect(exportAction, false, false, context);
  }

  @Test
  public void testMultiselectionCreatable() {
    ActionContext context = new TestContext(ownedView, otherView, ownedView);
    Mockito.when(componentRegistry.isCreatable(Mockito.<Class<?>>any())).thenReturn(true);
    expect(exportAction, true, true, context);
  }
View Full Code Here

    expect(exportAction, true, true, context);
  }

  @Test
  public void testMultiselectionUncreatable() {
    ActionContext context = new TestContext(ownedView, otherView, ownedView);
    Mockito.when(componentRegistry.isCreatable(Mockito.<Class<?>>any())).thenReturn(false);
    expect(exportAction, true, false, context);
  }
View Full Code Here

    expect(exportAction, true, false, context);
  }
 
  @Test
  public void testMultiselectionMixed() {
    ActionContext context = new TestContext(ownedView, otherView, ownedView);
    Mockito.when(componentRegistry.isCreatable(Mockito.<Class<?>>any())).thenReturn(true).thenReturn(false).thenReturn(true);
    expect(exportAction, true, false, context);
  }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.gui.ActionContext

Copyright © 2018 www.massapicom. 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.