Skip to content

Commit

Permalink
MGR-88 use Flyway 5
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Müller authored and Matthias Müller committed Dec 12, 2019
1 parent 053680a commit 9b4b4e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Expand Up @@ -16,7 +16,6 @@
package org.appng.application.manager.business;

import org.appng.api.support.CallableAction;
import org.appng.testsupport.validation.WritingXmlValidator;
import org.junit.Test;
import org.springframework.test.context.ContextConfiguration;

Expand All @@ -26,15 +25,13 @@ public class SqlExecutorTest extends AbstractTest {
@Test
public void testExecute() throws Exception {

String sql = "--comment\r\nselect id,name version from site;\r\nselect count(*) from application;\r\n--comment\r\n";
String sql = "-- comment\r\nselect id,name version from site;\r\nselect /*inline comment*/ count(*) from application;\r\n-- comment\r\n";
CallableAction callableAction = getAction("databaseConnectionEvent", "executeSql")
.withParam(FORM_ACTION, "executeSql").withParam("id", "1")
.getCallableAction(new SqlExecutor.SqlStatement(sql, null, false));

callableAction.perform();
WritingXmlValidator.writeXml = true;
validate(callableAction.getAction());
WritingXmlValidator.writeXml = false;
}

}
12 changes: 6 additions & 6 deletions src/test/resources/xml/SqlExecutorTest-testExecute.xml
Expand Up @@ -26,17 +26,17 @@
<data>
<result>
<field name="content" type="longtext">
<value>--comment&#13;
<value>-- comment&#13;
select id,name version from site;&#13;
select count(*) from application;&#13;
--comment&#13; </value>
select /*inline comment*/ count(*) from application;&#13;
-- comment&#13; </value>
</field>
<field name="result" type="richtext">
<value>&lt;div style='background:#F0F0F0;border:1px solid grey'&gt;--comment&#13;
<value>&lt;div style='background:#F0F0F0;border:1px solid grey'&gt;-- comment
select id,name version from site&lt;/div&gt;&lt;table border='1px solid grey' cellpadding='0'
cellspacing='0'&gt;&lt;tr&gt;&lt;th&gt;ID&lt;/th&gt;&lt;th&gt;NAME&lt;/th&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div&gt;0
row(s) selected&lt;/div&gt;&lt;p/&gt;&lt;div style='background:#F0F0F0;border:1px solid grey'&gt;select count(*)
from application&lt;/div&gt;&lt;table border='1px solid grey' cellpadding='0'
row(s) selected&lt;/div&gt;&lt;p/&gt;&lt;div style='background:#F0F0F0;border:1px solid grey'&gt;select /*inline
comment*/ count(*) from application&lt;/div&gt;&lt;table border='1px solid grey' cellpadding='0'
cellspacing='0'&gt;&lt;tr&gt;&lt;th&gt;C1&lt;/th&gt;&lt;/tr&gt;&lt;tr
style='vertical-align:top'&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;div&gt;1 row(s)
selected&lt;/div&gt;&lt;p/&gt;</value>
Expand Down

0 comments on commit 9b4b4e5

Please sign in to comment.