From 69864fb953bd11c4a6ae7de1983a2ceb0de1a8b6 Mon Sep 17 00:00:00 2001 From: madness-inc Date: Tue, 8 Jun 2021 15:37:02 +0200 Subject: [PATCH] MGR-111 --- .../conf/datasources/ds-connections.xml | 20 +-- .../business/DataBaseConnectionsTest.java | 8 + .../DataBaseConnectionsTest-testUpdate.xml | 140 ++++++++++++++++++ 3 files changed, 158 insertions(+), 10 deletions(-) create mode 100644 src/test/resources/xml/DataBaseConnectionsTest-testUpdate.xml diff --git a/application-home/conf/datasources/ds-connections.xml b/application-home/conf/datasources/ds-connections.xml index 088e47a..b2bda92 100644 --- a/application-home/conf/datasources/ds-connections.xml +++ b/application-home/conf/datasources/ds-connections.xml @@ -130,39 +130,39 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/src/test/java/org/appng/application/manager/business/DataBaseConnectionsTest.java b/src/test/java/org/appng/application/manager/business/DataBaseConnectionsTest.java index 9fb443a..812c9e9 100644 --- a/src/test/java/org/appng/application/manager/business/DataBaseConnectionsTest.java +++ b/src/test/java/org/appng/application/manager/business/DataBaseConnectionsTest.java @@ -17,6 +17,7 @@ import org.appng.api.support.CallableDataSource; import org.appng.testsupport.validation.WritingXmlValidator; +import org.appng.xml.platform.Action; import org.junit.Test; import org.springframework.test.context.ContextConfiguration; @@ -34,6 +35,13 @@ public void testOverview() throws Exception { validate(connections.getDatasource()); } + @Test + public void testUpdate() throws Exception { + Action action = getAction("databaseConnectionEvent", "updateConnection") + .withParam(FORM_ACTION, "updateConnection").withParam("id", "1").initialize(); + validate(action); + } + @Test public void testMigrations() throws Exception { CallableDataSource connections = getDataSource("migrations").withParam("id", "1").getCallableDataSource(); diff --git a/src/test/resources/xml/DataBaseConnectionsTest-testUpdate.xml b/src/test/resources/xml/DataBaseConnectionsTest-testUpdate.xml new file mode 100644 index 0000000..35242fd --- /dev/null +++ b/src/test/resources/xml/DataBaseConnectionsTest-testUpdate.xml @@ -0,0 +1,140 @@ + + + + Edit database connection + + + 1 + updateConnection + + + + + + + + + + Field must not be empty + + + + + + + + Field must not be empty + + + + + + + + Field must not be empty + + + + + + + + + + + Field must not be empty + + + + + + + + + + + + + + + + Please enter a valid integer + + + Field must not be empty + + + Value must be greater than or equal to 1 + + + + + + + + Please enter a valid integer + + + Field must not be empty + + + + + + + + + + + + + + + 1 + + + + + + HSQL + + + appNG HSQL + + + jdbc:hsqldb:hsql://localhost:9001/hsql-testdb + + + sa + + + + + + org.hsqldb.jdbc.JDBCDriver + + + true + + + true + + + 1 + + + 20 + + + select 1 + + + appNG Root Database + + + + + +