Package gov.nasa.arc.mct.platform.spi

Examples of gov.nasa.arc.mct.platform.spi.PlatformAccess


    public void setup() throws Exception {
        MockitoAnnotations.initMocks(this);
       
        // Mock OSGIRuntime and Platform
        setSingleton(OSGIRuntimeImpl.class, mockRuntime);
        new PlatformAccess().setPlatform(mockPlatform);

        // Some tests want housings to refuse to be closed,
        // but most presume that they are removed by closeHousing call.
        doRemoveHousings = true;
        clearRegistry();
View Full Code Here


    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();
        new PlatformAccess().setPlatform(mockPlatform);
    Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockProvider);
  }
View Full Code Here

    Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockProvider);
  }
 
  @AfterMethod
  public void teardown() {
    new PlatformAccess().setPlatform(null);
  }
View Full Code Here

    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);
   
    a0 = new MockFeedComponent();
    zeroDimensional = new TableStructure(TableType.ZERO_DIMENSIONAL, a0);

    a1 = new MockLeafComponent();
View Full Code Here

        MockitoAnnotations.initMocks(this);
    }
   
    @BeforeMethod
    public void setupBeforeTestMethod() {
        access = new PlatformAccess();
        Mockito.when(platform.getPolicyManager()).thenReturn(policyManager);
        access.setPlatform(platform);
    }
View Full Code Here

        Mockito.when(mockPlatform.getPolicyManager()).thenReturn(mockManager);
        Mockito.when(mockPlatform.getWindowManager()).thenReturn(mockWindowManager);
        Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockPersistenceService);
        Mockito.when(mockPersistenceService.getReferencedComponents(Mockito.any(AbstractComponent.class))).thenReturn(Collections.<AbstractComponent>emptyList());

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

        Assert.assertEquals(clonedEp.getProperty("value",String.class),"value");
    }
   
    @Test
    public void addDelegateComponentsTest() {
        (new PlatformAccess()).setPlatform(mockPlatform);
        BaseComponentSub2 comp = new BaseComponentSub2();
        BaseComponentSub2 comp2 = new BaseComponentSub2();
        comp.addDelegateComponent(comp2);
       
        Assert.assertEquals(comp.getComponents().size(), 1);
View Full Code Here

            public Collection<FeedProvider> getVisibleFeedProviders() {
                return Collections.singleton(getFeedProvider(getManifestedComponent()));
            }
        };

        new PlatformAccess().setPlatform(platform);
    }
View Full Code Here

    }


    @AfterMethod
    public void tearDown() {
        new PlatformAccess().releasePlatform();
    }
View Full Code Here

                            long startTime, long endTime) {
                return expectedValues;
            }
           
        });
        new PlatformAccess().setPlatform(platform);
    }
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.platform.spi.PlatformAccess

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.