Package gov.nasa.arc.mct.platform.core.access

Examples of gov.nasa.arc.mct.platform.core.access.PlatformAccess


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


   
    @BeforeMethod
    public void setup() {
        provider = new CoreComponentProvider();
        mockPlatform = Mockito.mock(Platform.class);
        new PlatformAccess().setPlatform(mockPlatform);
    }
View Full Code Here

        Platform mockPlatform = Mockito.mock(Platform.class);
        Mockito.when(mockPlatform.getPolicyManager()).thenReturn(mockPolicyManager);
        Mockito.when(mockPlatform.getPersistenceProvider()).thenReturn(mockPersistenceProvider);
        Mockito.when(mockPersistenceProvider.getReferencedComponents(Mockito.any(AbstractComponent.class))).thenReturn(Collections.<AbstractComponent>emptyList());
       
        new PlatformAccess().setPlatform(mockPlatform);
        new gov.nasa.arc.mct.platform.spi.PlatformAccess().setPlatform(mockPlatform);
    }
View Full Code Here

        new gov.nasa.arc.mct.platform.spi.PlatformAccess().setPlatform(mockPlatform);
    }
   
    @AfterClass
    public void restorePlatform() {
        new PlatformAccess().setPlatform(oldPlatform);
        new gov.nasa.arc.mct.platform.spi.PlatformAccess().setPlatform(oldPlatform);
    }
View Full Code Here

        Mockito.when(mockPrivateComponent.getOwner()).thenReturn(USER);
        Mockito.when(mockPrivateComponentWithDifferentOwner.getOwner()).thenReturn("some other user");

       
        Mockito.when(mockPlatform.getCurrentUser()).thenReturn(user);
        (new PlatformAccess()).setPlatform(mockPlatform);
    }
View Full Code Here

    }
   
    @BeforeMethod
    public void setup() {
        MockitoAnnotations.initMocks(this);      
        new PlatformAccess().setPlatform(mockPlatform);       
    }
View Full Code Here

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

TOP

Related Classes of gov.nasa.arc.mct.platform.core.access.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.