Package org.graylog2.plugin.inputs

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


        assertNull(c.convert(null));
        assertEquals(null, c.convert(""));
        assertEquals(null, c.convert("foo"));

        // Using startsWith here to avoid time zone problems in tests.
        assertTrue(c.convert("2014-3-12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("2014-3-12 12:27").toString().startsWith("2014-03-12T12:27:00.000"));
        assertTrue(c.convert("Mar 12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("Mar 12 2pm").toString().startsWith("2014-03-12T14:00:00.000"));
        assertTrue(c.convert("Mar 12 14:45:38").toString().startsWith("2014-03-12T14:45:38.000"));
        assertTrue(c.convert("Mar 2 13:48:18").toString().startsWith("2014-03-02T13:48:18.000"));
View Full Code Here


        assertEquals(null, c.convert(""));
        assertEquals(null, c.convert("foo"));

        // Using startsWith here to avoid time zone problems in tests.
        assertTrue(c.convert("2014-3-12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("2014-3-12 12:27").toString().startsWith("2014-03-12T12:27:00.000"));
        assertTrue(c.convert("Mar 12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("Mar 12 2pm").toString().startsWith("2014-03-12T14:00:00.000"));
        assertTrue(c.convert("Mar 12 14:45:38").toString().startsWith("2014-03-12T14:45:38.000"));
        assertTrue(c.convert("Mar 2 13:48:18").toString().startsWith("2014-03-02T13:48:18.000"));
    }
View Full Code Here

        assertEquals(null, c.convert("foo"));

        // Using startsWith here to avoid time zone problems in tests.
        assertTrue(c.convert("2014-3-12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("2014-3-12 12:27").toString().startsWith("2014-03-12T12:27:00.000"));
        assertTrue(c.convert("Mar 12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("Mar 12 2pm").toString().startsWith("2014-03-12T14:00:00.000"));
        assertTrue(c.convert("Mar 12 14:45:38").toString().startsWith("2014-03-12T14:45:38.000"));
        assertTrue(c.convert("Mar 2 13:48:18").toString().startsWith("2014-03-02T13:48:18.000"));
    }
View Full Code Here

        // Using startsWith here to avoid time zone problems in tests.
        assertTrue(c.convert("2014-3-12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("2014-3-12 12:27").toString().startsWith("2014-03-12T12:27:00.000"));
        assertTrue(c.convert("Mar 12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("Mar 12 2pm").toString().startsWith("2014-03-12T14:00:00.000"));
        assertTrue(c.convert("Mar 12 14:45:38").toString().startsWith("2014-03-12T14:45:38.000"));
        assertTrue(c.convert("Mar 2 13:48:18").toString().startsWith("2014-03-02T13:48:18.000"));
    }

}
View Full Code Here

        // Using startsWith here to avoid time zone problems in tests.
        assertTrue(c.convert("2014-3-12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("2014-3-12 12:27").toString().startsWith("2014-03-12T12:27:00.000"));
        assertTrue(c.convert("Mar 12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("Mar 12 2pm").toString().startsWith("2014-03-12T14:00:00.000"));
        assertTrue(c.convert("Mar 12 14:45:38").toString().startsWith("2014-03-12T14:45:38.000"));
        assertTrue(c.convert("Mar 2 13:48:18").toString().startsWith("2014-03-02T13:48:18.000"));
    }

}
View Full Code Here

        assertTrue(c.convert("2014-3-12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("2014-3-12 12:27").toString().startsWith("2014-03-12T12:27:00.000"));
        assertTrue(c.convert("Mar 12").toString().startsWith("2014-03-12T"));
        assertTrue(c.convert("Mar 12 2pm").toString().startsWith("2014-03-12T14:00:00.000"));
        assertTrue(c.convert("Mar 12 14:45:38").toString().startsWith("2014-03-12T14:45:38.000"));
        assertTrue(c.convert("Mar 2 13:48:18").toString().startsWith("2014-03-02T13:48:18.000"));
    }

}
View Full Code Here

    @Test
    public void testConvert() throws Exception {
        Converter c = new UppercaseConverter(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 UppercaseConverter(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 UppercaseConverter(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

        Converter c = new UppercaseConverter(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.