Пример #1
0
 @Test
 public void testGet() throws Throwable {
   XmlMap map = XmlMap.read(new FileInputStream("demo.xml"));
   assertEquals("/login.jsp", XmlMap.parse(map, "url#pattern"));
   assertEquals("/user/login*", XmlMap.parse(map, "url[1]#pattern"));
   assertEquals("/.+[.](css|js|html)", XmlMap.parse(map, "url[2]#pattern"));
 }
Пример #2
0
 @Test
 public void testGetAsMap() throws Throwable {
   XmlMap map = XmlMap.read(new FileInputStream("demo.xml"));
   assertEquals("xxxUserSeriver", map.get("authBy"));
   assertEquals("abc", XmlMap.parse(map, "other#value"));
   assertEquals("xxxUserSeriver", XmlMap.parse(map, "#authBy"));
 }