1 24 25 package org.objectweb.cjdbc.scenario.standalone.sql.request; 26 27 import org.objectweb.cjdbc.common.sql.SelectRequest; 28 import org.objectweb.cjdbc.scenario.templates.NoTemplate; 29 30 36 public class AbstractRequestTest extends NoTemplate 37 { 38 39 42 public void testTrimCarriageReturnAndTabs() throws Exception 43 { 44 String original = "I have a dream"; 45 String carriaged1 = new SelectRequest("I" 46 + System.getProperty("line.separator") + "have" 47 + System.getProperty("line.separator") + "a" 48 + System.getProperty("line.separator") + "dream", false, 0, System 49 .getProperty("line.separator")).trimCarriageReturnAndTabs(); 50 51 String carriaged2 = new SelectRequest("I" 52 + System.getProperty("line.separator") + "have" 53 + System.getProperty("line.separator") + "a" 54 + System.getProperty("line.separator") + "dream", false, 0, System 55 .getProperty("line.separator")).trimCarriageReturnAndTabs(); 56 57 String carriaged3 = new SelectRequest("I\thave\ta\tdream", false, 0, System 58 .getProperty("line.separator")).trimCarriageReturnAndTabs(); 59 60 String carriaged4 = new SelectRequest("I" 61 + System.getProperty("line.separator") + "have\ta" 62 + System.getProperty("line.separator") + "dream", false, 0, System 63 .getProperty("line.separator")).trimCarriageReturnAndTabs(); 64 65 assertEquals(original, carriaged1); 66 assertEquals(original, carriaged2); 67 assertEquals(original, carriaged3); 68 assertEquals(original, carriaged4); 69 } 70 } 71 | Popular Tags |