List list = m_rule.calculateDialPatterns("305"); assertEquals(3, list.size()); DialPattern pattern = (DialPattern) list.get(0); assertEquals("91305xxxx", pattern.calculatePattern()); pattern = (DialPattern) list.get(1); assertEquals("1305xxxx", pattern.calculatePattern()); pattern = (DialPattern) list.get(2); assertEquals("305xxxx", pattern.calculatePattern());
m_rule.setLongDistancePrefixOptional(true); List<DialPattern> list = m_rule.calculateDialPatterns("305"); assertEquals(4, list.size()); assertEquals("91305xxxx", list.get(0).calculatePattern()); assertEquals("1305xxxx", list.get(1).calculatePattern()); assertEquals("9305xxxx", list.get(2).calculatePattern()); assertEquals("305xxxx", list.get(3).calculatePattern());
    public void testCalculateDialPatterns() {        List list = m_rule.calculateDialPatterns("305");        assertEquals(3, list.size());        DialPattern pattern = (DialPattern) list.get(0);        assertEquals("91305xxxx", pattern.calculatePattern());        pattern = (DialPattern) list.get(1);        assertEquals("1305xxxx", pattern.calculatePattern());        pattern = (DialPattern) list.get(2);        assertEquals("305xxxx", pattern.calculatePattern());    }