|
|
@ -1,8 +1,6 @@ |
|
|
|
package com.fr.design; |
|
|
|
package com.fr.design; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.invoke.Reflect; |
|
|
|
|
|
|
|
import junit.framework.TestCase; |
|
|
|
import junit.framework.TestCase; |
|
|
|
import org.easymock.EasyMock; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Locale; |
|
|
|
import java.util.Locale; |
|
|
|
|
|
|
|
|
|
|
@ -19,20 +17,4 @@ public class DesignerEnvManagerTest extends TestCase{ |
|
|
|
assertEquals("下边界", envManager.getLanguage(), Locale.SIMPLIFIED_CHINESE); |
|
|
|
assertEquals("下边界", envManager.getLanguage(), Locale.SIMPLIFIED_CHINESE); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public void testCheckLocale() { |
|
|
|
|
|
|
|
DesignerEnvManager envManager = EasyMock.createMock(DesignerEnvManager.class); |
|
|
|
|
|
|
|
Reflect on = Reflect.on(envManager); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//验证zh-Hans-CN
|
|
|
|
|
|
|
|
Locale locale = Reflect.on(Locale.class).call("getInstance", "zh", "", "CN", "", null).get(); |
|
|
|
|
|
|
|
assertEquals(Locale.SIMPLIFIED_CHINESE, on.call("checkLocale", locale).get()); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//验证其它语言
|
|
|
|
|
|
|
|
assertEquals(Locale.SIMPLIFIED_CHINESE, on.call("checkLocale", Locale.SIMPLIFIED_CHINESE).get()); |
|
|
|
|
|
|
|
assertEquals(Locale.TRADITIONAL_CHINESE, on.call("checkLocale", Locale.TRADITIONAL_CHINESE).get()); |
|
|
|
|
|
|
|
assertEquals(Locale.US, on.call("checkLocale", Locale.US).get()); |
|
|
|
|
|
|
|
assertEquals(Locale.JAPAN, on.call("checkLocale", Locale.JAPAN).get()); |
|
|
|
|
|
|
|
assertEquals(Locale.KOREA, on.call("checkLocale", Locale.KOREA).get()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|