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

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


  @Mock User user;

  @BeforeMethod
  public void testSetup() {
    MockitoAnnotations.initMocks(this);
    (new PlatformAccess()).setPlatform(mockPlatform);
    Mockito.when(mockPlatform.getCurrentUser()).thenReturn(user);
  }
View Full Code Here


    public void setup() {
        platform = PlatformAccess.getPlatform();

       
        mockPlatform = Mockito.mock(Platform.class);
        new PlatformAccess().setPlatform(mockPlatform);
       
        PolicyManager mockPolicyManager = Mockito.mock(PolicyManager.class);
       
        Mockito.when(mockPlatform.getPolicyManager()).thenReturn(mockPolicyManager);
       
View Full Code Here

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

               
        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

   

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

    }
View Full Code Here

    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

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

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

    }
   
    @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

   
    @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

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.