Package com.alibaba.cobar.client.router.rules.ibatis

Examples of com.alibaba.cobar.client.router.rules.ibatis.IBatisNamespaceRule.action()


@Test
public class IBatisNamespaceRuleTest{
    public void testNamespaceRuleNormally() {
        IBatisNamespaceRule rule = new IBatisNamespaceRule("com.alibaba.cobar.client.entity.Tweet",
                "p1, p2");
        List<String> shardIds = rule.action();
        assertNotNull(shardIds);
        assertEquals(2, shardIds.size());

        IBatisRoutingFact fact = new IBatisRoutingFact(
                "com.alibaba.cobar.client.entity.Tweet.update", null);
View Full Code Here


    public void testNamespaceRuleNormallyWithCustomActionPatternSeparator() {
        IBatisNamespaceRule rule = new IBatisNamespaceRule("com.alibaba.cobar.client.entity.Tweet",
                "p1, p2");
        rule.setActionPatternSeparator(";");
        List<String> shards = rule.action();
        assertTrue(CollectionUtils.isNotEmpty(shards));
        assertEquals(1, shards.size());

        rule = new IBatisNamespaceRule("com.alibaba.cobar.client.entity.Tweet", "p1; p2");
        rule.setActionPatternSeparator(";");
View Full Code Here

        assertEquals(1, shards.size());

        rule = new IBatisNamespaceRule("com.alibaba.cobar.client.entity.Tweet", "p1; p2");
        rule.setActionPatternSeparator(";");
        shards = null;
        shards = rule.action();
        assertTrue(CollectionUtils.isNotEmpty(shards));
        assertEquals(2, shards.size());

        IBatisRoutingFact fact = new IBatisRoutingFact(
                "com.alibaba.cobar.client.entity.Tweet.update", null);
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.