Search in sources :

Example 6 with LibraryBundlificationRule

use of org.jetbrains.osgi.jps.model.LibraryBundlificationRule in project intellij-plugins by JetBrains.

the class LibraryBundlificationRuleTest method testValidation.

@Test
public void testValidation() throws Exception {
    LibraryBundlificationRule rule = new LibraryBundlificationRule();
    rule.validate();
    rule.setRuleRegex("lib[Jj");
    try {
        rule.validate();
        fail();
    } catch (IllegalArgumentException e) {
    }
    rule.setRuleRegex(".*");
    rule.setAdditionalProperties("\\u1wtf");
    try {
        rule.validate();
        fail();
    } catch (IllegalArgumentException e) {
    }
}
Also used : LibraryBundlificationRule(org.jetbrains.osgi.jps.model.LibraryBundlificationRule) Test(org.junit.Test)

Aggregations

LibraryBundlificationRule (org.jetbrains.osgi.jps.model.LibraryBundlificationRule)6 File (java.io.File)2 Test (org.junit.Test)2 JarFile (java.util.jar.JarFile)1 NotNull (org.jetbrains.annotations.NotNull)1 Nullable (org.jetbrains.annotations.Nullable)1 BndWrapper (org.jetbrains.osgi.jps.build.BndWrapper)1