Search in sources :

Example 11 with PluginConfigImpl

use of org.walkmod.conf.entities.impl.PluginConfigImpl in project walkmod-core by walkmod.

the class PluginsConfigurationProviderTest method testInvalidPlugins.

@Test
public void testInvalidPlugins() {
    IvyConfigurationProvider provider = new IvyConfigurationProvider();
    Configuration conf = new ConfigurationImpl();
    provider.init(conf);
    PluginConfig pc = new PluginConfigImpl();
    pc.setGroupId("foo");
    pc.setArtifactId("bar");
    pc.setVersion("10");
    conf.setPlugins(new LinkedList());
    conf.getPlugins().add(pc);
    Exception exception = null;
    try {
        provider.load();
    } catch (ConfigurationException e) {
        exception = e;
    }
    Assert.assertNotNull(exception);
}
Also used : PluginConfig(org.walkmod.conf.entities.PluginConfig) Configuration(org.walkmod.conf.entities.Configuration) ConfigurationException(org.walkmod.conf.ConfigurationException) PluginConfigImpl(org.walkmod.conf.entities.impl.PluginConfigImpl) ConfigurationImpl(org.walkmod.conf.entities.impl.ConfigurationImpl) LinkedList(java.util.LinkedList) ConfigurationException(org.walkmod.conf.ConfigurationException) Test(org.junit.Test)

Aggregations

PluginConfigImpl (org.walkmod.conf.entities.impl.PluginConfigImpl)11 PluginConfig (org.walkmod.conf.entities.PluginConfig)10 LinkedList (java.util.LinkedList)7 Configuration (org.walkmod.conf.entities.Configuration)5 File (java.io.File)4 Test (org.junit.Test)4 ConfigurationImpl (org.walkmod.conf.entities.impl.ConfigurationImpl)4 NodeList (org.w3c.dom.NodeList)3 ConfigurationException (org.walkmod.conf.ConfigurationException)3 V2_AsciiTable (de.vandermeer.asciitable.v2.V2_AsciiTable)2 IOException (java.io.IOException)2 Element (org.w3c.dom.Element)2 Node (org.w3c.dom.Node)2 WalkModFacade (org.walkmod.WalkModFacade)2 JSONArray (com.alibaba.fastjson.JSONArray)1 JSONObject (com.alibaba.fastjson.JSONObject)1 DefaultJSONParser (com.alibaba.fastjson.parser.DefaultJSONParser)1 JsonProcessingException (com.fasterxml.jackson.core.JsonProcessingException)1 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 InputStream (java.io.InputStream)1