List of usage examples for java.util Locale JAPANESE
Locale JAPANESE
To view the source code for java.util Locale JAPANESE.
Click Source Link
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange18()//from w ww . j ava 2s. com * <br><br> * * (?n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/01"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern="yyyy/MM/dd"<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="abc"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * datePattern?AdatePatternStrict??ttH?[}bgw?A * ?beanDate?AfieldstartDatet???A * G?[?bZ?[W?AfalsepmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange18() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/01"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("abc"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange19()/*from www . j a v a 2s .c om*/ * <br><br> * * (??n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/01"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern="yyyy/MM/dd"<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2005/1/2"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * beant?AstartDatewtO???A * G?[?bZ?[W?AfalsepmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange19() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/01"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2005/1/2"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange20()/* ww w. j a v a 2s .c o m*/ * <br><br> * * (?n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/01"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict=null<br> * var:startDate="2004/01/01"<br> * var.endDate="abc"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * datePattern?AdatePatternStrictnullendDatet???A * G?[?bZ?[WfalsepmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange20() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/01"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue(null); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue(null); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2004/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("abc"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange21()// w w w . j a va 2 s. c o m * <br><br> * * (?n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/01"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2004/01/01"<br> * var:endDate="2005/02/29"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * datePatternnull?AdatePatternStrict??ttH?[}bg?A * endDate?t???AG?[?bZ?[Wfalse * pmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange21() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/01"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue(null); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2004/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/02/29"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange22()// w w w . ja va 2s .c o m * <br><br> * * (?n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/01"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2004/01/01"<br> * var:endDate="2005/2/28"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * datePatternnull?AdatePatternStrict??ttH?[}bg?A * endDatettH?[}bgSv???A * G?[?bZ?[WfalsepmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange22() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/01"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue(null); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2004/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/2/28"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange23()/*from w w w . j a va2s . c o m*/ * <br><br> * * (?n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/01"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2004/01/01"<br> * var:endDate="abc"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * datePatternnull?AdatePatternStrict??ttH?[}bg?A * endDatet???AG?[?bZ?[Wfalsep * mF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange23() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/01"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue(null); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2004/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("abc"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange24()//from w ww . j a va2 s . c o m * <br><br> * * (?n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/01"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern="yyyy/MM/dd"<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2004/01/01"<br> * var:endDate="abc"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * datePattern?AdatePatternStrict??ttH?[}bgw?A * fieldendDatet???AG?[?bZ?[W?A * falsepmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange24() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/01"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2004/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("abc"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange25()/*from ww w . java 2 s . c om*/ * <br><br> * * (??n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/02"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern="yyyy/MM/dd"<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2004/01/01"<br> * var:endDate="2005/1/1"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:false<br> * (?) errors:ActionMessage("message")<br> * * <br> * beant?AendDatewt???A * G?[?bZ?[W?AfalsepmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange25() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/02"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2004/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/1/1"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // falsep?B assertFalse(result); // G?[?1??B assertEquals(1, errors.size()); // ?bZ?[WIuWFNgmF Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange26()/*from www.j a v a 2 s . c o m*/ * <br><br> * * (??n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/01/02"<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict=null<br> * var:startDate="2005/1/1"<br> * var:endDate="2005/1/3"<br> * Msg("message","message")<br> * (?) errors:not null<br> * (vf)<br> * (?) validator:not null<br> * (?) request:not null<br> * Locale=JAPANESE<br> * * <br> * l?F(l) boolean:true<br> * (?) errors:not null<br> * (vf)<br> * * <br> * datePattern?AdatePatternStrictnullbeantstartDateendDate * ???AtruemF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange26() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/01/02"; // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); Var var = new Var(); var.setName("datePattern"); var.setValue(null); field.addVar(var); var = new Var(); var.setName("datePatternStrict"); var.setValue(null); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2005/1/1"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/1/3"); field.addVar(var); // ?bZ?[W? Msg msg = new Msg(); msg.setKey("message"); msg.setName("message"); msg.setResource(false); field.addMsg(msg); // G?[? ActionMessages errors = new ActionMessages(); // [HTTPNGXg MockHttpServletRequest request = new MockHttpServletRequest(); request.setLocale(Locale.JAPANESE); // ValidatorResourcesCX^X ValidatorResources validatorResources = new ValidatorResources(); // ValidatorCX^X Validator validator = new Validator(validatorResources); // eXg?s boolean result = FieldChecksEx.validateDateRange(bean, va, field, errors, validator, request); // eXgmF // truep?B assertTrue(result); // G?[??B assertTrue(errors.isEmpty()); }
From source file:org.openmrs.api.ConceptServiceTest.java
/** * @see ConceptService#saveConcept(Concept) *//*from w w w . j a v a2 s . com*/ @Test @Verifies(value = "should set a preferred name for each locale if none is marked", method = "saveConcept(Concept)") public void saveConcept_shouldSetAPreferredNameForEachLocaleIfNoneIsMarked() throws Exception { //add some other locales to locale.allowed.list for testing purposes GlobalProperty gp = Context.getAdministrationService() .getGlobalPropertyObject(OpenmrsConstants.GLOBAL_PROPERTY_LOCALE_ALLOWED_LIST); gp.setPropertyValue(gp.getPropertyValue().concat(",fr,ja,en_GB")); Context.getAdministrationService().saveGlobalProperty(gp); Concept concept = new Concept(); concept.addName(new ConceptName("name1", Locale.ENGLISH)); concept.addName(new ConceptName("name2", Locale.ENGLISH)); concept.addName(new ConceptName("name3", Locale.FRENCH)); concept.addName(new ConceptName("name4", Locale.FRENCH)); concept.addName(new ConceptName("name5", Locale.JAPANESE)); concept.addName(new ConceptName("name6", Locale.JAPANESE)); concept = Context.getConceptService().saveConcept(concept); Assert.assertNotNull(concept.getPreferredName(Locale.ENGLISH)); Assert.assertNotNull(concept.getPreferredName(Locale.FRENCH)); Assert.assertNotNull(concept.getPreferredName(Locale.JAPANESE)); }