Examples of ViewInfo


Examples of gov.nasa.arc.mct.services.component.ViewInfo

 
  @Override
  public ExecutionResult execute(PolicyContext context) {
    boolean result = true;
   
    ViewInfo viewInfo = context.getProperty(PolicyContext.PropertyName.TARGET_VIEW_INFO.getName(), ViewInfo.class);
 
    if (viewInfo.getViewClass().equals(PlotViewManifestation.class)) {
      AbstractComponent targetComponent = context.getProperty(PolicyContext.PropertyName.TARGET_COMPONENT.getName(), AbstractComponent.class);
     
      if (targetComponent.isLeaf() && !hasFeed(targetComponent)) {
        String message = "Leaf is not a feed.";
        return new ExecutionResult(context, false, message);
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

                );
    }
   
    private View mockView(AbstractComponent ac, ViewType vt) {
        View view = Mockito.mock(View.class);
        ViewInfo viewInfo = Mockito.mock(ViewInfo.class);
        Mockito.when(viewInfo.getViewType()).thenReturn(vt);
        Mockito.when(view.getInfo()).thenReturn(viewInfo);
        Mockito.when(view.getManifestedComponent()).thenReturn(ac);
        return view;
    }
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

  public void testSettingPersistance() {     
        // Test SetupPlot
      final String anyTimeSystem = "anyTimeSystem";
          MockitoAnnotations.initMocks(this);
      TestersComponent component = new TestersComponent("x");
      PlotViewManifestation originalPlotMan = new PlotViewManifestation(component, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
     
      GregorianCalendar now = new GregorianCalendar();
      GregorianCalendar nowPlus = new GregorianCalendar();
      nowPlus.add(Calendar.MINUTE, 1);
           
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

              }
            };

            PlotViewManifestation plot;

            plot = new PlotViewManifestation(component, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
            Assert.assertEquals(plot.getCurrentMCTTime(), t); // First non-predictive;
          }
        });

  }
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

  @SuppressWarnings({ "unchecked", "serial" })
  @Test
  public void testUpdateFromDataFeed() throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException {

    final ExtendedProperties viewProps = new ExtendedProperties();
    PlotViewManifestation panel = new PlotViewManifestation(mockComponent,new ViewInfo(PlotViewManifestation.class,"", ViewType.OBJECT)) {
      @Override
      public ExtendedProperties getViewProperties() {
        return viewProps;
      }
    };
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

  }
   
  @Test
  public void testSetupChart() {
    TestersComponent component = new TestersComponent("x");
    PlotViewManifestation panel = new PlotViewManifestation(component, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
    PlotView originalPlot = new PlotView.Builder(ShellPlotPackageImplementation.class).build();
   
    panel.setPlot(originalPlot);
   
    GregorianCalendar minTime = new GregorianCalendar();
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

               PlotLineConnectionType.STEP_X_THEN_Y));
  }
   
  @Test
  public void testUpdateFromDataFeedNoData() {
    PlotViewManifestation panel = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
    panel.setPlot(new PlotView.Builder(ShellPlotPackageImplementation.class).build());
   
    // Robust to no data.
    panel.updateFromFeed(null)
  }
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

  }
 
  @SuppressWarnings("unchecked")
  @Test
  public void testRobustToNoDataForAFeed() throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException {
    PlotViewManifestation panel = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
    panel.setPlot(new PlotView.Builder(ShellPlotPackageImplementation.class).build());
   
    panel.getPlot().addDataSet("PUI1");
   
    // Robust to no data for feed.
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

  }
 
 
  @Test (enabled = false)
  public void testUpdateDataAndThatUpdateFromFeedCachesWhileLockedOut() {
    PlotViewManifestation panel = new PlotViewManifestation(parentComponent,new ViewInfo(PlotViewManifestation.class,"",ViewType.CENTER));
    panel.setPlot(new PlotView.Builder(ShellPlotPackageImplementation.class).build());
   
    panel.getPlot().addDataSet("PUI1");
     
    List<Map<String, String>> dataSetAUpdateFromFeed = new ArrayList<Map<String, String>>();
View Full Code Here

Examples of gov.nasa.arc.mct.services.component.ViewInfo

 
  @SuppressWarnings("serial")
  @Test
  public void testSynchronizeTime() {
    final ExtendedProperties viewProps = new ExtendedProperties();
    PlotViewManifestation panel = new PlotViewManifestation(mockComponent,new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT)) {
      @Override
      public ExtendedProperties getViewProperties() {
        return viewProps;
      }
    };
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.