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
/** * testValidateDateRange27()//from ww w . j a v a2s.co m * <br><br> * * (??n) * <br> * _?FF * <br><br> * l?F(?) bean:"2005/1/2"<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/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?AdatePatternStricttH?[}bgw???A * datePatterntH?[}bgKpmF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange27() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ String bean = "2005/1/2"; // ++++ ??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/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:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange28()//from w w w. j av a 2s. 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="yyyy/MM/dd"<br> * var:startDate="2005/01/01"<br> * var:endDate="2005/01/03"<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> * datePatternnull?AdatePatternStrict??tH?[}bgw * ???AbeantstartDateendDate???A * truemF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange28() 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("yyyy/MM/dd"); field.addVar(var); var = new Var(); var.setName("startDate"); var.setValue("2005/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/01/03"); 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:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange29()//from ww w . ja v a2s . 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=null<br> * var:datePatternStrict=null<br> * var:startDate="2005/1/1"<br> * var:end]Date="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:true<br> * (?) errors:not null<br> * (vf)<br> * * <br> * beant?AstartDate?AendDatev???A * truemF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange29() 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("2005/1/1"); 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 // truep?B assertTrue(result); // G?[??B assertTrue(errors.isEmpty()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange30()/*w ww.j av a 2 s. co m*/ * <br><br> * * (??n) * <br> * _?FF * <br><br> * l?F(?) bean:Map:<br> * ["field1"=<br> * ?@"2005/01/02"]<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2005/01/01"<br> * var:endDate="2005/01/03"<br> * Msg("message","message")<br> * property="field1"<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> * ?beanString^???AfieldOv?peB`FbN?smF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange30() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ Map<String, String> bean = new HashMap<String, String>(); bean.put("field1", "2005/01/02"); // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); field.setProperty("field1"); 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("2005/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/01/03"); 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:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange31()//from w w w . ja v a 2 s. c o m * <br><br> * * (??n) * <br> * _?FF * <br><br> * l?F(?) bean:Map:<br> * ["field1"=<br> * ?@"2005/01/04"]<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2005/01/01"<br> * var:endDate="2005/01/03"<br> * Msg("message","message")<br> * property="field1"<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> * ?beanString^???AfieldOv?peB`FbN?smF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange31() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ Map<String, String> bean = new HashMap<String, String>(); bean.put("field1", "2005/01/04"); // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); field.setProperty("field1"); 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("2005/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/01/03"); 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 assertFalse(result); // G?[???B assertEquals(1, errors.size()); Iterator it = errors.get(); ActionMessage message = (ActionMessage) it.next(); assertEquals("message", message.getKey()); }
From source file:jp.terasoluna.fw.web.struts.form.FieldChecksExTest09.java
/** * testValidateDateRange32()// ww w.ja va 2 s . c o m * <br><br> * * (??n) * <br> * _?FF * <br><br> * l?F(?) bean:Map:<br> * ["field1"=<br> * ?@"2005/01/05"]<br> * (?) va:not null<br> * (?) field:not null<br> * var:datePattern=null<br> * var:datePatternStrict="yyyy/MM/dd"<br> * var:startDate="2005/01/01"<br> * var:endDate="2005/01/03"<br> * Msg("message","message")<br> * property="field2"<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> * ?beanString^?AfieldOv?peB????AtruemF?B * <br> * * @throws Exception ?\bh?O */ public void testValidateDateRange32() throws Exception { //eXgf?[^? // ++++ beanIuWFNg ++++ Map<String, String> bean = new HashMap<String, String>(); bean.put("field1", "2005/01/05"); // ++++ ??IuWFNg ValidatorAction va = new ValidatorAction(); va.setName("message"); // ++++ ?tB?[h? Field field = new Field(); field.setProperty("field2"); 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("2005/01/01"); field.addVar(var); var = new Var(); var.setName("endDate"); var.setValue("2005/01/03"); 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()); }