01: package org.slf4j.migrator.line;
02:
03: import org.slf4j.migrator.line.LineConverter;
04:
05: import junit.framework.TestCase;
06:
07: public class TrivialMatcherTest extends TestCase {
08:
09: public void testSimpleReplacement() {
10: LineConverter trivialLC = new LineConverter(
11: new TrivialMatcher());
12:
13: // "import org.slf4j.converter" -- > simple replacement with an unique
14: // capturing group
15: assertEquals(
16: "simple replacement with an unique capturing group",
17: trivialLC
18: .getOneLineReplacement("import org.slf4j.converter"));
19:
20: assertEquals(
21: "1st group second group 4th group",
22: trivialLC
23: .getOneLineReplacement("first group second group third group 4th group"));
24:
25: }
26:
27: }
|