Search in sources :

Example 6 with PluginManager

use of org.apache.logging.log4j.plugins.util.PluginManager in project logging-log4j2 by apache.

the class ValidHostValidatorTest method setUp.

@SuppressWarnings("unchecked")
@BeforeEach
public void setUp() throws Exception {
    final PluginManager manager = new PluginManager("Test");
    manager.collectPlugins();
    plugin = (PluginType<HostAndPort>) manager.getPluginType("HostAndPort");
    assertNotNull(plugin, "Rebuild this module to ensure annotation processing has been done.");
    node = new Node(null, "HostAndPort", plugin);
}
Also used : PluginManager(org.apache.logging.log4j.plugins.util.PluginManager) HostAndPort(org.apache.logging.log4j.plugins.test.validation.HostAndPort) Node(org.apache.logging.log4j.plugins.Node) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 7 with PluginManager

use of org.apache.logging.log4j.plugins.util.PluginManager in project logging-log4j2 by apache.

the class RequiredValidatorTest method setUp.

@SuppressWarnings("unchecked")
@BeforeEach
public void setUp() throws Exception {
    final PluginManager manager = new PluginManager("Test");
    manager.collectPlugins();
    plugin = (PluginType<ValidatingPlugin>) manager.getPluginType("Validator");
    assertNotNull(plugin, "Rebuild this module to make sure annotation processing kicks in.");
    node = new Node(null, "Validator", plugin);
}
Also used : PluginManager(org.apache.logging.log4j.plugins.util.PluginManager) ValidatingPlugin(org.apache.logging.log4j.plugins.test.validation.ValidatingPlugin) Node(org.apache.logging.log4j.plugins.Node) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 8 with PluginManager

use of org.apache.logging.log4j.plugins.util.PluginManager in project logging-log4j2 by apache.

the class ValidatingPluginWithGenericBuilderTest method setUp.

@SuppressWarnings("unchecked")
@BeforeEach
public void setUp() throws Exception {
    final PluginManager manager = new PluginManager("Test");
    manager.collectPlugins();
    plugin = (PluginType<ValidatingPluginWithGenericBuilder>) manager.getPluginType("ValidatingPluginWithGenericBuilder");
    assertNotNull(plugin, "Rebuild this module to make sure annotation processing kicks in.");
    node = new Node(null, "Validator", plugin);
}
Also used : PluginManager(org.apache.logging.log4j.plugins.util.PluginManager) Node(org.apache.logging.log4j.plugins.Node) ValidatingPluginWithGenericBuilder(org.apache.logging.log4j.plugins.test.validation.ValidatingPluginWithGenericBuilder) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 9 with PluginManager

use of org.apache.logging.log4j.plugins.util.PluginManager in project logging-log4j2 by apache.

the class ValidatingPluginWithTypedBuilderTest method setUp.

@SuppressWarnings("unchecked")
@BeforeEach
public void setUp() throws Exception {
    final PluginManager manager = new PluginManager("Test");
    manager.collectPlugins();
    plugin = (PluginType<ValidatingPluginWithTypedBuilder>) manager.getPluginType("ValidatingPluginWithTypedBuilder");
    assertNotNull(plugin, "Rebuild this module to make sure annotation processing kicks in.");
    node = new Node(null, "Validator", plugin);
}
Also used : PluginManager(org.apache.logging.log4j.plugins.util.PluginManager) ValidatingPluginWithTypedBuilder(org.apache.logging.log4j.plugins.test.validation.ValidatingPluginWithTypedBuilder) Node(org.apache.logging.log4j.plugins.Node) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

PluginManager (org.apache.logging.log4j.plugins.util.PluginManager)9 Node (org.apache.logging.log4j.plugins.Node)8 BeforeEach (org.junit.jupiter.api.BeforeEach)7 ArrayList (java.util.ArrayList)2 PluginType (org.apache.logging.log4j.plugins.util.PluginType)2 PropertiesUtil (org.apache.logging.log4j.util.PropertiesUtil)2 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 Serializable (java.io.Serializable)1 WeakReference (java.lang.ref.WeakReference)1 URISyntaxException (java.net.URISyntaxException)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 HashSet (java.util.HashSet)1 LinkedHashMap (java.util.LinkedHashMap)1 List (java.util.List)1 Map (java.util.Map)1