diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2012-03-04 07:28:42 +0100 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2012-03-04 07:28:42 +0100 |
commit | 00e4f99229d03d7db5ffd753e9e704e19abea3fa (patch) | |
tree | 584a05ec82c24ef86fcb0477b254c57aa28096d2 /tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java | |
parent | 32b4ba8e94c7aab44dab614b16cb203809d2a2a5 (diff) | |
download | cgeo-00e4f99229d03d7db5ffd753e9e704e19abea3fa.zip cgeo-00e4f99229d03d7db5ffd753e9e704e19abea3fa.tar.gz cgeo-00e4f99229d03d7db5ffd753e9e704e19abea3fa.tar.bz2 |
refactoring: move constants and classes to the packages they belong to
Diffstat (limited to 'tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java')
-rw-r--r-- | tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java b/tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java new file mode 100644 index 0000000..ec54008 --- /dev/null +++ b/tests/src/cgeo/geocaching/utils/LogTemplateProviderTest.java @@ -0,0 +1,20 @@ +package cgeo.geocaching.utils; + +import cgeo.geocaching.utils.LogTemplateProvider; + +import java.util.Calendar; + +import junit.framework.TestCase; + +public class LogTemplateProviderTest extends TestCase { + + public static void testApplyTemplates() { + final String noTemplates = " no templates "; + assertEquals(noTemplates, LogTemplateProvider.applyTemplates(noTemplates, true)); + + // This test can occasionally fail if the current year changes right after the next line. + final String currentYear = Integer.toString(Calendar.YEAR); + assertTrue(LogTemplateProvider.applyTemplates("[DATE]", true).contains(currentYear)); + } + +} |