Search in sources :

Example 1 with Option

use of org.apache.karaf.features.FeaturesService.Option in project ddf by codice.

the class ApplicationServiceBeanTest method testUninstallFeatureCallIsPrivileged.

@Test
public void testUninstallFeatureCallIsPrivileged() throws Exception {
    StackCaptor stackCaptor = new StackCaptor();
    stackCaptor.doCaptureStack().when(mockSyncInstaller).uninstallFeatures(ArgumentMatchers.<EnumSet<Option>>any(), anyString());
    ApplicationServiceBean serviceBean = newApplicationServiceBean();
    serviceBean.uninstallFeature("profile-name");
    assertThat(stackCaptor.getStack(), stackContainsDoPrivilegedCall());
}
Also used : StackCaptor(org.codice.mockito.StackCaptor) Option(org.apache.karaf.features.FeaturesService.Option) LinkOption(java.nio.file.LinkOption) Test(org.junit.Test)

Aggregations

LinkOption (java.nio.file.LinkOption)1 Option (org.apache.karaf.features.FeaturesService.Option)1 StackCaptor (org.codice.mockito.StackCaptor)1 Test (org.junit.Test)1