Search in sources :

Example 6 with PluginType

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

the class PluginProcessorTest method testFakePluginAliasesContainSameInformation.

@Test
public void testFakePluginAliasesContainSameInformation() throws Exception {
    final PluginAliases aliases = FakePlugin.class.getAnnotation(PluginAliases.class);
    for (final String alias : aliases.value()) {
        final List<PluginType<?>> list = pluginService.getCategory(p.category());
        assertNotNull(list);
        final PluginEntry fake = getEntry(list, alias);
        assertNotNull(fake);
        verifyFakePluginEntry(alias, fake);
    }
}
Also used : PluginAliases(org.apache.logging.log4j.plugins.PluginAliases) PluginEntry(org.apache.logging.log4j.plugins.processor.PluginEntry) PluginType(org.apache.logging.log4j.plugins.util.PluginType) Test(org.junit.Test)

Example 7 with PluginType

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

the class PluginProcessorTest method testFakePluginFoundWithCorrectInformation.

@Test
public void testFakePluginFoundWithCorrectInformation() throws Exception {
    final List<PluginType<?>> list = pluginService.getCategory(p.category());
    assertNotNull(list);
    final PluginEntry fake = getEntry(list, p.name());
    assertNotNull(fake);
    verifyFakePluginEntry(p.name(), fake);
}
Also used : PluginEntry(org.apache.logging.log4j.plugins.processor.PluginEntry) PluginType(org.apache.logging.log4j.plugins.util.PluginType) Test(org.junit.Test)

Aggregations

PluginType (org.apache.logging.log4j.plugins.util.PluginType)7 ArrayList (java.util.ArrayList)2 PluginEntry (org.apache.logging.log4j.plugins.processor.PluginEntry)2 PluginManager (org.apache.logging.log4j.plugins.util.PluginManager)2 PropertiesUtil (org.apache.logging.log4j.util.PropertiesUtil)2 Test (org.junit.Test)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 ParameterizedType (java.lang.reflect.ParameterizedType)1 Type (java.lang.reflect.Type)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