Package gov.nasa.arc.mct.services.component

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


 
  @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

   
  }

  @Test
  public void testRobustToMissingData() {
    PlotViewManifestation panel = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
    panel.setPlot(new PlotView.Builder(ShellPlotPackageImplementation.class).build());



    // Robust to no data for feed.
View Full Code Here

 
  @Test
  public void testEqualsAndHashCode() {
   
    // if two objects are equal, then their hashCode values must be equal as well
    PlotViewManifestation panelA = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
    PlotViewManifestation panelPlotEqual = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
    PlotViewManifestation panelNotEqualA = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
   
    PlotView panelAsPlot = new PlotView.Builder(ShellPlotPackageImplementation.class).build();
    PlotView notPanelAsPlot = new PlotView.Builder(ShellPlotPackageImplementation.class).build();
   
    panelA.setPlot(panelAsPlot);
View Full Code Here

  public void testExpandData(Map<String, List<Map<String, String>>> expandedData,
      long startTime, long endTime, Long[] expectedTimes) throws Exception {
    final FeedProvider fp = Mockito.mock(FeedProvider.class);
    final String feedId = "feedId";
    Mockito.when(fp.getSubscriptionId()).thenReturn(feedId);
    PlotViewManifestation manifestation = new PlotViewManifestation(mockComponent,new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT)) {
      private static final long serialVersionUID = 1L;

      @Override
      public Collection<FeedProvider> getVisibleFeedProviders() {
        return Collections.singleton(fp);
View Full Code Here

    Assert.assertEquals(plotTimeOnYMaxAtBottom.getMinTime(), 0)
  }
 
  @Test
  public void testInitializeControlManifestation() {
    PlotViewManifestation pvm = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
   
    JComponent controlMan = pvm.initializeControlManifestation();
    Assert.assertNotNull(controlMan);
  }
View Full Code Here

 
 
  private String naming;
  @Test
  public void testNamingContext() throws Exception{
    PlotViewManifestation manifestation = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
   
    Field f = PlotViewManifestation.class.getDeclaredField("plotLabelingAlgorithm");
    f.setAccessible(true);
    f.set(manifestation, new AbbreviatingPlotLabelingAlgorithm() {
      @Override
View Full Code Here

    };
  }
 
  @Test (dataProvider = "timeSystems")
  public void testMultipleFeedProviders(String setting) {
    PlotViewManifestation manifestation = new PlotViewManifestation(mockComponent, new ViewInfo(PlotViewManifestation.class,"",ViewType.OBJECT));
   
    manifestation.getViewProperties().setProperty(PlotConstants.TIME_SYSTEM_SETTING, setting);
   
    List<FeedProvider> fps = new ArrayList<FeedProvider>();
    for (String timeSys : TEST_TIME_SYSTEMS) {
View Full Code Here

        setTitleFromManifestation(manifestationInfo);
       
        String manifestedViewType = manifestationInfo.getManifestedViewType();
        AbstractComponent comp = wrappedManifestation.getManifestedComponent();
        Collection<ViewInfo> embeddedViews = comp.getViewInfos(ViewType.EMBEDDED);
        ViewInfo matchedVi = null;
        for (ViewInfo vi : embeddedViews) {
            if (manifestedViewType.equals(vi.getType())) {
                matchedVi = vi;
                break;
            }
View Full Code Here

    MockitoAnnotations.initMocks(this);
    Mockito.when(mockPlatform.getPolicyManager()).thenReturn(mockPolicyManager);
    Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockPersistenceProvider);
    Mockito.when(mockPlatform.getComponentRegistry()).thenReturn(mockComponentRegistry);
    Mockito.when(mockComponentRegistry.getViewInfos(Mockito.anyString(), Mockito.any(ViewType.class)))
      .thenReturn(Collections.singleton(new ViewInfo(TableViewManifestation.class,"","",ViewType.EMBEDDED)));
    Mockito.when(mockPolicyManager.execute(Mockito.anyString(), Mockito.any(PolicyContext.class))).thenReturn(new ExecutionResult(null, true, ""));
        Mockito.when(mockPersistenceProvider.getReferencedComponents(Mockito.any(AbstractComponent.class))).thenReturn(Collections.<AbstractComponent>emptyList());

    (new PlatformAccess()).setPlatform(mockPlatform);
   
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.services.component.ViewInfo

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.