Search in sources :

Example 6 with MatchPair

use of com.alibaba.dubbo.registry.common.route.RouteRule.MatchPair in project dubbo by alibaba.

the class RouteRuleTest method test_MatchPair_copy.

@org.junit.Test
public void test_MatchPair_copy() throws Exception {
    MatchPair copy = pair.copy();
    assertEquals(pair, copy);
    copy.matches.remove("+a");
    assertFalse(pair.equals(copy));
    copy = pair.copy();
    copy.matches.add("+z");
    assertFalse(pair.equals(copy));
}
Also used : MatchPair(com.alibaba.dubbo.registry.common.route.RouteRule.MatchPair)

Aggregations

MatchPair (com.alibaba.dubbo.registry.common.route.RouteRule.MatchPair)6 Route (com.alibaba.dubbo.registry.common.domain.Route)5 HashSet (java.util.HashSet)3 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 Set (java.util.Set)2 Access (com.alibaba.dubbo.registry.common.domain.Access)1 Consumer (com.alibaba.dubbo.registry.common.domain.Consumer)1 ParseException (java.text.ParseException)1 Map (java.util.Map)1