/[schmitzm]/branches/2.3.x/src_junit/skrueger/i8n/I8NUtilTest.java
ViewVC logotype

Diff of /branches/2.3.x/src_junit/skrueger/i8n/I8NUtilTest.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1097 by alfonx, Sun Oct 10 21:14:05 2010 UTC revision 1100 by alfonx, Mon Oct 11 00:07:14 2010 UTC
# Line 6  import static org.junit.Assert.assertTru Line 6  import static org.junit.Assert.assertTru
6    
7  import java.util.ArrayList;  import java.util.ArrayList;
8  import java.util.List;  import java.util.List;
9    import java.util.Locale;
10    
11  import org.junit.BeforeClass;  import org.junit.BeforeClass;
12  import org.junit.Test;  import org.junit.Test;
# Line 50  public class I8NUtilTest { Line 51  public class I8NUtilTest {
51                  assertEquals(0.5, I8NUtil.qmTranslation(langs4, t), .00000000001);                  assertEquals(0.5, I8NUtil.qmTranslation(langs4, t), .00000000001);
52          }          }
53    
54            @Test
55            public void testGetFirstLocaleForLang() {
56                    assertEquals(new Locale("de_DE"), I8NUtil.getFirstLocaleForLang("po"));
57            }
58    
59            @Test
60            public void testGetLocalesForLang() {
61                    List<Locale> locales = I8NUtil.getLocalesForLang("en");
62    
63                    assertTrue(locales.contains(new Locale("en", "za")));
64                    assertTrue(locales.contains(new Locale("en", "sg")));
65            }
66    
67  }  }

Legend:
Removed from v.1097  
changed lines
  Added in v.1100

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26