blob: 21ce00eaddb55b6cf8fa493e5871aa6f9a5f75b0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
package cgeo.geocaching;
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));
}
}
|