Search in sources :

Example 16 with IFeatureRootAdvice

use of org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice in project tycho by eclipse.

the class FeatureRootAdvicePermissionsTest method testSpecificPermissionsButNoFiles.

@Test(expected = IllegalArgumentException.class)
public void testSpecificPermissionsButNoFiles() throws Exception {
    Properties buildProperties = createBuildPropertiesWithDefaultRootFiles();
    buildProperties.put("root." + LINUX_SPEC_FOR_PROPERTIES_KEY + ".permissions.644", "file2.txt");
    IFeatureRootAdvice advice = createAdvice(buildProperties);
    callGetDescriptorsForAllConfigurations(advice);
}
Also used : IFeatureRootAdvice(org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice) Properties(java.util.Properties) Test(org.junit.Test)

Example 17 with IFeatureRootAdvice

use of org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice in project tycho by eclipse.

the class FeatureRootAdviceTest method testDescriptorIsNullIfNoRootFiles.

@Test
public void testDescriptorIsNullIfNoRootFiles() throws Exception {
    Properties buildProperties = createBuildPropertiesWithoutRootKeys();
    IFeatureRootAdvice advice = createAdvice(buildProperties);
    assertNull(advice.getDescriptor(GLOBAL_SPEC));
    assertNull(advice.getDescriptor(LINUX_SPEC_FOR_ADVICE));
}
Also used : IFeatureRootAdvice(org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice) Properties(java.util.Properties) Test(org.junit.Test)

Aggregations

IFeatureRootAdvice (org.eclipse.equinox.p2.publisher.actions.IFeatureRootAdvice)17 Test (org.junit.Test)15 Properties (java.util.Properties)14 File (java.io.File)1 ArrayList (java.util.ArrayList)1 IPath (org.eclipse.core.runtime.IPath)1 Path (org.eclipse.core.runtime.Path)1 IPublisherAdvice (org.eclipse.equinox.p2.publisher.IPublisherAdvice)1 BuildPropertiesParserForTesting (org.eclipse.tycho.test.util.BuildPropertiesParserForTesting)1