Search in sources :

Example 1 with SyslogPriority

use of loghub.processors.SyslogPriority in project LogHub by fbacchella.

the class TestConfigurations method testBadFields3.

// Ensure that multi-fields processor don't access a success sub-pipeline
@Test
public void testBadFields3() {
    SyslogPriority processor = new SyslogPriority();
    processor.setException(new Identity());
    processor.setFields(new String[] { "a", "b" });
    Assert.assertFalse(processor.configure(new Properties(Collections.emptyMap())));
}
Also used : SyslogPriority(loghub.processors.SyslogPriority) Identity(loghub.processors.Identity) Test(org.junit.Test)

Example 2 with SyslogPriority

use of loghub.processors.SyslogPriority in project LogHub by fbacchella.

the class TestConfigurations method testBadFields2.

// Ensure that multi-fields processor don't access a success sub-pipeline
@Test
public void testBadFields2() {
    SyslogPriority processor = new SyslogPriority();
    processor.setFailure(new Identity());
    processor.setFields(new String[] { "a", "b" });
    Assert.assertFalse(processor.configure(new Properties(Collections.emptyMap())));
}
Also used : SyslogPriority(loghub.processors.SyslogPriority) Identity(loghub.processors.Identity) Test(org.junit.Test)

Example 3 with SyslogPriority

use of loghub.processors.SyslogPriority in project LogHub by fbacchella.

the class TestConfigurations method testBadFields1.

// Ensure that multi-fields processor don't access a success sub-pipeline
@Test
public void testBadFields1() {
    SyslogPriority processor = new SyslogPriority();
    processor.setSuccess(new Identity());
    processor.setFields(new String[] { "a", "b" });
    Assert.assertFalse(processor.configure(new Properties(Collections.emptyMap())));
}
Also used : SyslogPriority(loghub.processors.SyslogPriority) Identity(loghub.processors.Identity) Test(org.junit.Test)

Aggregations

Identity (loghub.processors.Identity)3 SyslogPriority (loghub.processors.SyslogPriority)3 Test (org.junit.Test)3