1 24 25 package org.objectweb.cjdbc.scenario.raidb1.driver; 26 27 import java.sql.Connection ; 28 import java.util.ArrayList ; 29 30 import org.objectweb.cjdbc.scenario.templates.Raidb1Template; 31 import org.objectweb.cjdbc.scenario.tools.ScenarioUtility; 32 import org.objectweb.cjdbc.scenario.tools.testlet.AbstractTestLet; 33 import org.objectweb.cjdbc.scenario.tools.testlet.UpdateTestLet; 34 35 41 public class InternationalQueriesScenario extends Raidb1Template 42 { 43 48 public void testJapaneseCharacters() throws Exception 49 { 50 String arigatou = "γ?γγ?γ?¨γ?γ?γ?γ?γ?Ύγ?γγγ"; 51 System.out.println(arigatou); 52 Connection con = getCJDBCConnection(); 53 UpdateTestLet let = new UpdateTestLet(con); 54 let.set(AbstractTestLet.UPDATED_COLUMN_VALUE,arigatou); 55 let.execute(); 56 57 ArrayList result = ScenarioUtility.getSingleQueryResult("select * from PRODUCT",con); 58 for(int i = 0;i<result.size();i++) 59 { 60 ArrayList line = (ArrayList )result.get(i); 61 assertTrue(((String )line.get(1)).startsWith(arigatou)); 62 } 63 } 64 } 65 | Popular Tags |