コード例 #1
0
  public void test_LikeSearch_WildCard_variousChar_whiteOption() {
    // ## Arrange ##
    LikeSearchOption option = new LikeSearchOption();
    option.escapeByPipeLine();

    // ## Act & Assert ##
    assertEquals("ABC%CBA", option.generateRealValue("ABC%CBA"));
    assertEquals("ABC_CBA", option.generateRealValue("ABC_CBA"));
    assertEquals("ABC%CB|%A", option.generateRealValue("ABC%CB%A"));
    assertEquals("ABC_CB|_A", option.generateRealValue("ABC_CB_A"));
    assertEquals("ABC_C[]B|_A", option.generateRealValue("ABC_C[]B_A"));

    // ## Arrange ##
    DBWay dbway = DBCurrent.getInstance().currentDBDef().dbway();
    option.acceptOriginalWildCardList(dbway.getOriginalWildCardList());

    // ## Act & Assert ##
    assertEquals("ABC|%CBA", option.generateRealValue("ABC%CBA"));
    assertEquals("ABC|_CBA", option.generateRealValue("ABC_CBA"));
    assertEquals("ABC|%CB|%A", option.generateRealValue("ABC%CB%A"));
    assertEquals("ABC|_CB|_A", option.generateRealValue("ABC_CB_A"));
    assertEquals("ABC|_C[]B|_A", option.generateRealValue("ABC_C[]B_A"));
  }
コード例 #2
0
 // ===================================================================================
 //                                                                       Current DBDef
 //                                                                       =============
 public DBDef getCurrentDBDef() {
   return DBCurrent.getInstance().currentDBDef();
 }