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

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


   
    @BeforeClass
    public void setup() {
        oldPlatform = PlatformAccess.getPlatform();       
        mockPlatform = Mockito.mock(Platform.class);
        new PlatformAccess().setPlatform(mockPlatform);
    }
View Full Code Here


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

    @Mock private Platform mockPlatform;
    @Mock private PolicyManager mockPolicyManager;
   
    @AfterMethod
    protected void tearDown() {
        (new PlatformAccess()).setPlatform(null);
    }
View Full Code Here

        }, null);
        if(GraphicsEnvironment.isHeadless()) {
            return;
        }
        MockitoAnnotations.initMocks(this);
        (new PlatformAccess()).setPlatform(mockPlatform);
        Mockito.when(mockPlatform.getPolicyManager()).thenReturn(mockPolicyManager);
        Mockito.when(mockPlatform.getRootComponent()).thenReturn(rootComponent);
        Mockito.when(mockPolicyManager.execute(Mockito.anyString(), Mockito.any(PolicyContext.class))).thenReturn(new ExecutionResult(null,true,""));
        TestSetupUtilities.setUpActiveHousing();
View Full Code Here

        ActionManager.registerMenu(ObjectsMenu.class, "OBJECTS_MENU");
        ActionManager.registerMenu(ViewMenu.class, "VIEW_MENU");
        ActionManager.registerMenu(WindowsMenu.class, "WINDOWS_MENU");
        ActionManager.registerMenu(ConveniencesMenu.class, "CONVENIENCES_MENU");
        ActionManager.registerMenu(HelpMenu.class, "HELP_MENU");
        new PlatformAccess().setPlatform(mockPlatform);
        Mockito.when(mockPlatform.getRootComponent()).thenReturn(rootComponent);
    }
View Full Code Here

        Mockito.when(mockPlatform.getRootComponent()).thenReturn(rootComponent);
    }
   
    @AfterMethod
    protected void teardown() {
        new PlatformAccess().setPlatform(null);
    }
View Full Code Here

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

    @BeforeMethod
    public void setup() {
        MockitoAnnotations.initMocks(this);
       
        // Mocking the platform
        new PlatformAccess().setPlatform(mockPlatform);
       
        Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockPersistence);
        Mockito.when(mockPlatform.getWindowManager()).thenReturn(mockWindowManager);
        Mockito.when(mockPlatform.getComponentRegistry()).thenReturn(mockRegistry);
        Mockito.when(mockPlatform.getPolicyManager()).thenReturn(mockPolicyManager);
View Full Code Here

        originalPlatform = PlatformAccess.getPlatform();
       
        // Can't mock Swing components reliably, so create a real one
        view = new View(mockComponent, mockViewInfo) {};
       
        new PlatformAccess().setPlatform(mockPlatform);
       
        inspectorPropertyChangeListener = null;
       
        Mockito.when(mockComponent.getViewInfos(Mockito.<ViewType>any()))
            .thenReturn(Collections.singleton(mockViewInfo));
View Full Code Here

       
    }
   
    @AfterMethod
    public void teardownMethod() {
        new PlatformAccess().setPlatform(originalPlatform);
    }
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.