Examples of PlatformAccess


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

               
        reset();
       
        Platform mockPlatform = Mockito.mock(Platform.class);

        PlatformAccess access = new PlatformAccess();
        access.setPlatform(mockPlatform);
        Mockito.when(mockPlatform.getRootComponent()).thenReturn(rootComponent);  
        Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockPersistence);
    }
View Full Code Here

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

   

    @AfterMethod
    public void tearDown() {
        PolicyManagerImpl.getInstance().refreshExtendedPolicies(Collections.<ExtendedComponentProvider>emptyList());
        PlatformAccess access = new PlatformAccess();
        access.releasePlatform();   

    }
View Full Code Here

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

    selected.add(viewManifestation2);

    Mockito.when(ac.getSelectedManifestations()).thenReturn(selected)
    Mockito.when(ac.getSelectedManifestations()).thenReturn(selected)
    Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockPersistence);
    new PlatformAccess().setPlatform(mockPlatform);
  }
View Full Code Here

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

    new PlatformAccess().setPlatform(mockPlatform);
  }
 
  @AfterTest
  public void teardown() {
    new PlatformAccess().setPlatform(mockPlatform);
  }
View Full Code Here

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

        oldPlatform = PlatformAccess.getPlatform();
    }
   
    @AfterClass
    public void restorePlatform() {
        new PlatformAccess().setPlatform(oldPlatform);
    }
View Full Code Here

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

    }
   
    @BeforeMethod   
    public void setup() {
        MockitoAnnotations.initMocks(this);
        new PlatformAccess().setPlatform(mockPlatform);
       
        // Common setup
        Mockito.when(mockNode.getParentTree())
            .thenReturn(new PseudoJTree());
        Mockito.when(mockHousing.getSelectionProvider())
View Full Code Here

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

   
    @AfterClass
    public void restoreRuntime() throws Exception {
        // Restore original runtime/platform
        setSingleton(OSGIRuntimeImpl.class, originalRuntime);      
        new PlatformAccess().setPlatform(originalPlatform);
       
        // Flush out the registry, since we can't mock it
        clearRegistry();
    }
View Full Code Here

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

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

    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

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

    Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockProvider);
  }
 
  @AfterMethod
  public void teardown() {
    new PlatformAccess().setPlatform(null);
  }
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.