INT-1619 removed cycle by moving SocketIoUtils into the util package

This commit is contained in:
Mark Fisher
2010-11-13 23:43:04 -05:00
parent a2dfe9d069
commit bc10b621e3
6 changed files with 16 additions and 19 deletions

View File

@@ -17,10 +17,10 @@
package org.springframework.integration.ip.util;
import static org.junit.Assert.assertEquals;
import static org.springframework.integration.ip.util.RegexUtils.escapeRegExSpecials;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.integration.MessageHeaders;
/**
@@ -34,8 +34,7 @@ public class RegexUtilsTests {
@Test
public void testRegex () {
String s = "xxx$^[]{()}+*\\?|.xxx";
assertEquals("xxx\\$\\^\\[\\]\\{\\(\\)\\}\\+\\*\\\\\\?\\|\\.xxx",
escapeRegExSpecials(s));
assertEquals("xxx\\$\\^\\[\\]\\{\\(\\)\\}\\+\\*\\\\\\?\\|\\.xxx", RegexUtils.escapeRegexSpecials(s));
}
/**
@@ -46,8 +45,7 @@ public class RegexUtilsTests {
public void testSiPrefix () {
// protect the test in case we ever change the prefix
if ("$^[]{()}+*\\?|.".contains(MessageHeaders.PREFIX)) {
assertEquals(escapeRegExSpecials(MessageHeaders.PREFIX), "\\"
+ MessageHeaders.PREFIX);
assertEquals(RegexUtils.escapeRegexSpecials(MessageHeaders.PREFIX), "\\" + MessageHeaders.PREFIX);
}
}