@Test(groups = SMALL) public void testGetCreateSqlContainsTheTriggerAttributes() { String triggerSql = reactiveTrigger.getCreateSql(); assertTrue(triggerSql.contains(TRIGGER_NAME)); assertTrue(triggerSql.contains("'" + TRIGGER_TABLE + "'")); assertTrue(triggerSql.contains(TRIGGER_TABLE)); assertTrue(triggerSql.contains(INSERT.toString())); assertTrue(triggerSql.contains("'" + INSERT.toString() + "'")); assertTrue(triggerSql.contains(AFTER.toString())); }
String getCreateSql() { String triggerSql = format(CREATE_TRIGGER_TEMPLATE, triggerName, triggerTime, triggerEvent, triggerTable); String mainBody = MAIN_BODY_TEMPLATE .replace("{oldJson}", oldJson()) .replace("{newJson}", newJson()) .replace("{tableName}", triggerTable) .replace("{eventType}", triggerEvent.toString()); return triggerSql.replace("{mainBody}", mainBody); }
ReactiveTrigger { String getCreateSql() { String triggerSql = format(CREATE_TRIGGER_TEMPLATE, triggerName, triggerTime, triggerEvent, triggerTable); String mainBody = MAIN_BODY_TEMPLATE .replace("{oldJson}", oldJson()) .replace("{newJson}", newJson()) .replace("{tableName}", triggerTable) .replace("{eventType}", triggerEvent.toString()); return triggerSql.replace("{mainBody}", mainBody); } }
ReactiveTrigger { String getCreateSql() { String triggerSql = format(CREATE_TRIGGER_TEMPLATE, triggerName, triggerTime, triggerEvent, triggerTable); String mainBody = MAIN_BODY_TEMPLATE .replace("{oldJson}", oldJson()) .replace("{newJson}", newJson()) .replace("{tableName}", triggerTable) .replace("{eventType}", triggerEvent.toString()); return triggerSql.replace("{mainBody}", mainBody); } ReactiveTrigger(String triggerName, String triggerTable, TriggerEvent triggerEvent, TriggerTime triggerTime,
                    List<String> tableColumns); }
ReactiveTrigger { String getCreateSql() { String triggerSql = format(CREATE_TRIGGER_TEMPLATE, triggerName, triggerTime, triggerEvent, triggerTable); String mainBody = MAIN_BODY_TEMPLATE .replace("{oldJson}", oldJson()) .replace("{newJson}", newJson()) .replace("{tableName}", triggerTable) .replace("{eventType}", triggerEvent.toString()); return triggerSql.replace("{mainBody}", mainBody); } ReactiveTrigger(String triggerName, String triggerTable, TriggerEvent triggerEvent, TriggerTime triggerTime,
                    List<String> tableColumns); String getDropSql(); }
ReactiveTrigger { String getCreateSql() { String triggerSql = format(CREATE_TRIGGER_TEMPLATE, triggerName, triggerTime, triggerEvent, triggerTable); String mainBody = MAIN_BODY_TEMPLATE .replace("{oldJson}", oldJson()) .replace("{newJson}", newJson()) .replace("{tableName}", triggerTable) .replace("{eventType}", triggerEvent.toString()); return triggerSql.replace("{mainBody}", mainBody); } ReactiveTrigger(String triggerName, String triggerTable, TriggerEvent triggerEvent, TriggerTime triggerTime,
                    List<String> tableColumns); String getDropSql();  }