[td-225]update the test case.

This commit is contained in:
Haojun Liao 2021-05-11 10:43:53 +08:00
parent f2fa151565
commit edbc123e2e
1 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ public class InsertSpecialCharacterRestfulTest {
private static String tbname1 = "test"; private static String tbname1 = "test";
private static String tbname2 = "weather"; private static String tbname2 = "weather";
private static String special_character_str_1 = "$asd$$fsfsf$"; private static String special_character_str_1 = "$asd$$fsfsf$";
private static String special_character_str_2 = "\\asdfsfsf\\\\"; private static String special_character_str_2 = "\\\\asdfsfsf\\\\";
private static String special_character_str_3 = "\\\\asdfsfsf\\"; private static String special_character_str_3 = "\\\\asdfsfsf\\";
private static String special_character_str_4 = "?asd??fsf?sf?"; private static String special_character_str_4 = "?asd??fsf?sf?";
private static String special_character_str_5 = "?#sd@$f(('<(s[P)>\"){]}f?s[]{}%vaew|\"fsfs^a&d*jhg)(j))(f@~!?$"; private static String special_character_str_5 = "?#sd@$f(('<(s[P)>\"){]}f?s[]{}%vaew|\"fsfs^a&d*jhg)(j))(f@~!?$";
@ -49,7 +49,7 @@ public class InsertSpecialCharacterRestfulTest {
@Test @Test
public void testCase02() throws SQLException { public void testCase02() throws SQLException {
//TODO: //TODO:
// Expected :\asdfsfsf\\ // Expected :\asdfsfsf\
// Actual :\asdfsfsf\ // Actual :\asdfsfsf\
final long now = System.currentTimeMillis(); final long now = System.currentTimeMillis();
@ -71,7 +71,7 @@ public class InsertSpecialCharacterRestfulTest {
String f1 = new String(rs.getBytes(2)); String f1 = new String(rs.getBytes(2));
//TODO: bug to be fixed //TODO: bug to be fixed
// Assert.assertEquals(special_character_str_2, f1); // Assert.assertEquals(special_character_str_2, f1);
Assert.assertEquals(special_character_str_2.substring(0, special_character_str_1.length() - 2), f1); Assert.assertEquals(special_character_str_2.substring(1, special_character_str_1.length() - 1), f1);
String f2 = rs.getString(3); String f2 = rs.getString(3);
Assert.assertNull(f2); Assert.assertNull(f2);
} }