Package org.graylog2.plugin.inputs

Examples of org.graylog2.plugin.inputs.Converter.convert()


        assertEquals("lol no IP in here", hc.convert("lol no IP in here"));
        assertEquals("127.0.1", hc.convert("127.0.1"));
        assertEquals("127.0.0.xxx", hc.convert("127.0.0.xxx"));

        assertEquals("127.0.0.xxx", hc.convert("127.0.0.1"));
        assertEquals("127.0.0.xxx foobar 192.168.1.xxx test", hc.convert("127.0.0.1 foobar 192.168.1.100 test"));
    }

}
View Full Code Here


public class SyslogPriFacilityConverterTest {

    @Test
    public void testConvert() throws Exception {
        Converter hc = new SyslogPriFacilityConverter(new HashMap<String, Object>());
        assertNull(hc.convert(null));
        assertEquals("", hc.convert(""));
        assertEquals("lol no number", hc.convert("lol no number"));

        assertEquals("user-level", hc.convert("14")); // user-level
        assertEquals("kernel", hc.convert("5")); // kernel
View Full Code Here

    @Test
    public void testConvert() throws Exception {
        Converter hc = new SyslogPriFacilityConverter(new HashMap<String, Object>());
        assertNull(hc.convert(null));
        assertEquals("", hc.convert(""));
        assertEquals("lol no number", hc.convert("lol no number"));

        assertEquals("user-level", hc.convert("14")); // user-level
        assertEquals("kernel", hc.convert("5")); // kernel
        assertEquals("security/authorization", hc.convert("87")); // security/authorization
View Full Code Here

    @Test
    public void testConvert() throws Exception {
        Converter hc = new SyslogPriFacilityConverter(new HashMap<String, Object>());
        assertNull(hc.convert(null));
        assertEquals("", hc.convert(""));
        assertEquals("lol no number", hc.convert("lol no number"));

        assertEquals("user-level", hc.convert("14")); // user-level
        assertEquals("kernel", hc.convert("5")); // kernel
        assertEquals("security/authorization", hc.convert("87")); // security/authorization
    }
View Full Code Here

        Converter hc = new SyslogPriFacilityConverter(new HashMap<String, Object>());
        assertNull(hc.convert(null));
        assertEquals("", hc.convert(""));
        assertEquals("lol no number", hc.convert("lol no number"));

        assertEquals("user-level", hc.convert("14")); // user-level
        assertEquals("kernel", hc.convert("5")); // kernel
        assertEquals("security/authorization", hc.convert("87")); // security/authorization
    }

}
View Full Code Here

        assertNull(hc.convert(null));
        assertEquals("", hc.convert(""));
        assertEquals("lol no number", hc.convert("lol no number"));

        assertEquals("user-level", hc.convert("14")); // user-level
        assertEquals("kernel", hc.convert("5")); // kernel
        assertEquals("security/authorization", hc.convert("87")); // security/authorization
    }

}
View Full Code Here

        assertEquals("", hc.convert(""));
        assertEquals("lol no number", hc.convert("lol no number"));

        assertEquals("user-level", hc.convert("14")); // user-level
        assertEquals("kernel", hc.convert("5")); // kernel
        assertEquals("security/authorization", hc.convert("87")); // security/authorization
    }

}
View Full Code Here

    @Test
    public void testConvert() throws Exception {
        Converter c = new LowercaseConverter(new HashMap<String, Object>());

        assertNull(c.convert(null));
        assertEquals("", c.convert(""));
        assertEquals("foobar", c.convert("foobar"));
        assertEquals("foo bar", c.convert("foo BAR"));
        assertEquals("foobar", c.convert("FooBar"));
        assertEquals("foobar ", c.convert("foobar "));
View Full Code Here

    @Test
    public void testConvert() throws Exception {
        Converter c = new LowercaseConverter(new HashMap<String, Object>());

        assertNull(c.convert(null));
        assertEquals("", c.convert(""));
        assertEquals("foobar", c.convert("foobar"));
        assertEquals("foo bar", c.convert("foo BAR"));
        assertEquals("foobar", c.convert("FooBar"));
        assertEquals("foobar ", c.convert("foobar "));
        assertEquals(" foobar", c.convert(" foobar"));
View Full Code Here

    public void testConvert() throws Exception {
        Converter c = new LowercaseConverter(new HashMap<String, Object>());

        assertNull(c.convert(null));
        assertEquals("", c.convert(""));
        assertEquals("foobar", c.convert("foobar"));
        assertEquals("foo bar", c.convert("foo BAR"));
        assertEquals("foobar", c.convert("FooBar"));
        assertEquals("foobar ", c.convert("foobar "));
        assertEquals(" foobar", c.convert(" foobar"));
        assertEquals("foobar", c.convert("FOOBAR"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.