Package gov.nasa.arc.mct.fastplot.access

Examples of gov.nasa.arc.mct.fastplot.access.PolicyManagerAccess


    Mockito.when(feed2.getTimeService()).thenReturn(timeService);
   
      Mockito.when(parentComponent.getComponents()).thenReturn(
                 Collections.<AbstractComponent> emptyList());
   
    access = new PolicyManagerAccess();
    access.setPolicyManager(policyManager);
    PolicyContext context = new PolicyContext();
        result = new ExecutionResult(context, true, "");
        Mockito.when(policyManager.execute(Mockito.anyString(), Mockito.any(PolicyContext.class))).thenReturn(result)
        mockComponent = new DummyComponent();
View Full Code Here


    Assert.assertFalse(PlotViewPolicy.isCompoundComponentWithCompoundChildrenThatRequirePlots(compoundComponent));
  }
 
  @Test
  public void testGetNonCompoundPlotComponents() {
    (new PolicyManagerAccess()).setPolicyManager(mockPolicyManager);
    Mockito.when(mockPolicyManager.execute(Mockito.anyString(), Mockito.any(PolicyContext.class))).thenReturn(
        new ExecutionResult(null,true,"test"));
   
    AbstractComponent[][] components = PlotViewPolicy.getPlotComponents(leafWithAFeedComponent, true);
    Assert.assertEquals(components.length,1);
View Full Code Here

    Mockito.when(compoundComponent.getComponents()).thenReturn(childComponents);
  }
 
  @Test
  public void testGetCompoundPlotComponents() {
    (new PolicyManagerAccess()).setPolicyManager(mockPolicyManager);
    Mockito.when(mockPolicyManager.execute(Mockito.anyString(), Mockito.any(PolicyContext.class))).thenReturn(
        new ExecutionResult(null,true,"test"));
    // setup compound components with a child that requires a plot.
    List<AbstractComponent> childComponents = new ArrayList<AbstractComponent>();
    childComponents.add(leafWithAFeedComponent)
View Full Code Here

    return comp;
  }
 
  @Test
  public void testRejectCanvasView() throws Exception {
    (new PolicyManagerAccess()).setPolicyManager(mockPolicyManager);
    AbstractComponent comp = Mockito.mock(AbstractComponent.class);
    PlotViewPolicy policy = new PlotViewPolicy();
    PolicyContext context = new PolicyContext();
    context.setProperty(PolicyContext.PropertyName.TARGET_VIEW_INFO.getName(), new ViewInfo(PlotViewManifestation.class,"",ViewType.CENTER));
    Method m = policy.getClass().getDeclaredMethod("rejectCanvasView", PolicyContext.class, AbstractComponent.class);
View Full Code Here

  }
 
  @Test
  public void testGetCompoundPlotComponentsWithChildren() {
    (new PolicyManagerAccess()).setPolicyManager(mockPolicyManager);
    Mockito.when(mockPolicyManager.execute(Mockito.anyString(), Mockito.any(PolicyContext.class))).thenReturn(
        new ExecutionResult(null,true,"test"));
    // setup compound components with a child that requires a plot.
    List<AbstractComponent> childComponents = new ArrayList<AbstractComponent>();
    String start = "A";
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.fastplot.access.PolicyManagerAccess

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.