1 18 package org.apache.activemq.filter; 19 20 import org.apache.activemq.test.TestSupport; 21 22 public class DestinationPathTest extends TestSupport { 23 24 public void testPathParse() { 25 assertParse("FOO", new String []{"FOO"}); 26 assertParse("FOO.BAR", new String []{"FOO", "BAR"}); 27 assertParse("FOO.*", new String []{"FOO", "*"}); 28 assertParse("FOO.>", new String []{"FOO", ">"}); 29 assertParse("FOO.BAR.XYZ", new String []{"FOO", "BAR", "XYZ"}); 30 assertParse("FOO.BAR.", new String []{"FOO", "BAR", ""}); 31 } 32 33 protected void assertParse(String subject, String [] expected) { 34 String [] path = DestinationPath.getDestinationPaths(subject); 35 assertArrayEqual(subject, expected, path); 36 } 37 } 38 | Popular Tags |