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