Package com.alibaba.otter.canal.filter.aviater

Examples of com.alibaba.otter.canal.filter.aviater.AviaterRegexFilter.filter()


                                                           "u\\..*,uvw\\..*,uv\\..*,a\\.x,a\\.xyz,a\\.xy,abc\\.x,abc\\.xyz,abc\\.xy,ab\\.x,ab\\.xyz,ab\\.xy");

        boolean result = filter.filter("u.abc");
        Assert.assertEquals(true, result);

        result = filter.filter("ab.x");
        Assert.assertEquals(true, result);

        result = filter.filter("ab.xyz1");
        Assert.assertEquals(false, result);

View Full Code Here


        Assert.assertEquals(true, result);

        result = filter.filter("ab.x");
        Assert.assertEquals(true, result);

        result = filter.filter("ab.xyz1");
        Assert.assertEquals(false, result);

        result = filter.filter("abc.xyz");
        Assert.assertEquals(true, result);
View Full Code Here

        Assert.assertEquals(true, result);

        result = filter.filter("ab.xyz1");
        Assert.assertEquals(false, result);

        result = filter.filter("abc.xyz");
        Assert.assertEquals(true, result);

        result = filter.filter("uv.xyz");
        Assert.assertEquals(true, result);
View Full Code Here

        Assert.assertEquals(false, result);

        result = filter.filter("abc.xyz");
        Assert.assertEquals(true, result);

        result = filter.filter("uv.xyz");
        Assert.assertEquals(true, result);

    }

    @Test
View Full Code Here

    }

    private void doRegexTest() {
        AviaterRegexFilter filter3 = new AviaterRegexFilter("otter2.otter_stability1|otter1.otter_stability1|"
                                                            + RandomStringUtils.randomAlphabetic(200));
        boolean result = filter3.filter("otter1.otter_stability1");
        Assert.assertEquals(true, result);
        result = filter3.filter("otter2.otter_stability1");
        Assert.assertEquals(true, result);
    }
View Full Code Here

    private void doRegexTest() {
        AviaterRegexFilter filter3 = new AviaterRegexFilter("otter2.otter_stability1|otter1.otter_stability1|"
                                                            + RandomStringUtils.randomAlphabetic(200));
        boolean result = filter3.filter("otter1.otter_stability1");
        Assert.assertEquals(true, result);
        result = filter3.filter("otter2.otter_stability1");
        Assert.assertEquals(true, result);
    }

}
View Full Code Here

    }

    @Test
    public void test_regex() {
        AviaterRegexFilter filter = new AviaterRegexFilter("s1\\..*,s2\\..*");
        boolean result = filter.filter("s1.t1");
        Assert.assertEquals(true, result);

        result = filter.filter("s1.t2");
        Assert.assertEquals(true, result);

View Full Code Here

    public void test_regex() {
        AviaterRegexFilter filter = new AviaterRegexFilter("s1\\..*,s2\\..*");
        boolean result = filter.filter("s1.t1");
        Assert.assertEquals(true, result);

        result = filter.filter("s1.t2");
        Assert.assertEquals(true, result);

        result = filter.filter("");
        Assert.assertEquals(true, result);

View Full Code Here

        Assert.assertEquals(true, result);

        result = filter.filter("s1.t2");
        Assert.assertEquals(true, result);

        result = filter.filter("");
        Assert.assertEquals(true, result);

        result = filter.filter("s12.t1");
        Assert.assertEquals(false, result);
View Full Code Here

        Assert.assertEquals(true, result);

        result = filter.filter("");
        Assert.assertEquals(true, result);

        result = filter.filter("s12.t1");
        Assert.assertEquals(false, result);

        result = filter.filter("s2.t2");
        Assert.assertEquals(true, result);
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.