diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2011-11-19 08:39:17 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2011-11-19 08:39:17 +0100 |
commit | efe762ae85a8db89b36f0b3fe7bff37b3ae7a8e9 (patch) | |
tree | 906de400a1bc35fbd5f87f8f9eec85755e1c795f /tests/src | |
parent | d51848cfdc0c647de75bbdce7c006b685a7a49d1 (diff) | |
download | cgeo-efe762ae85a8db89b36f0b3fe7bff37b3ae7a8e9.zip cgeo-efe762ae85a8db89b36f0b3fe7bff37b3ae7a8e9.tar.gz cgeo-efe762ae85a8db89b36f0b3fe7bff37b3ae7a8e9.tar.bz2 |
don't use regular expressions for String replacement
* prefer StringUtils.replace over String.replaceAll
* have new test to verify this change
* remove cgBase instance from LogTemplates
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/cgeo/geocaching/LogTemplateProviderTest.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/LogTemplateProviderTest.java b/tests/src/cgeo/geocaching/LogTemplateProviderTest.java new file mode 100644 index 0000000..760dedd --- /dev/null +++ b/tests/src/cgeo/geocaching/LogTemplateProviderTest.java @@ -0,0 +1,13 @@ +package cgeo.geocaching; + +import junit.framework.TestCase; + +public class LogTemplateProviderTest extends TestCase { + + public static void testApplyTemplates() { + final String noTemplates = " no templates "; + assertEquals(noTemplates, LogTemplateProvider.applyTemplates(noTemplates, true)); + assertTrue(LogTemplateProvider.applyTemplates("[DATE]", true).contains(".")); + } + +} |