diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7f884ac5498c9df2ab4b37ce4c925138d201c528..3e57d4324f60115a780ca090a5a1d1fd38110795 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -37,7 +37,7 @@ <file leaf-file-name="RegistrationDAO.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="449"> + <state relative-caret-position="540"> <caret line="41" column="12" lean-forward="false" selection-start-line="41" selection-start-column="12" selection-end-line="43" selection-end-column="13" /> <folding> <marker date="1497910575000" expanded="true" signature="841:867" ph="INSERT INTO \"ERR\".... " /> @@ -52,14 +52,15 @@ <file leaf-file-name="RegistrationControl_Test.java" pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="756"> - <caret line="66" column="59" lean-forward="false" selection-start-line="66" selection-start-column="59" selection-end-line="66" selection-end-column="59" /> + <state relative-caret-position="771"> + <caret line="79" column="61" lean-forward="false" selection-start-line="79" selection-start-column="61" selection-end-line="79" selection-end-column="61" /> <folding> - <marker date="1497945181000" expanded="true" signature="1464:1545" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1464:1546" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1464:1550" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1464:1551" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1585:1651" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1532" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1533" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1537" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1538" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1572:1638" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="2436:2514" ph="DELETE FROM " /> </folding> </state> </provider> @@ -594,8 +595,8 @@ </PATH> </subPane> </pane> - <pane id="Scratches" /> <pane id="PackagesPane" /> + <pane id="Scratches" /> <pane id="Scope" /> </panes> </component> @@ -1157,13 +1158,11 @@ <workItem from="1497902421348" duration="3435000" /> <workItem from="1497907375567" duration="5487000" /> <workItem from="1497944732211" duration="476000" /> + <workItem from="1497946000359" duration="267000" /> </task> <servers /> </component> <component name="TestHistory"> - <history-entry file="RegistrationControl_Test - 2017.06.20 at 00h 47m 11s.xml"> - <configuration name="RegistrationControl_Test" configurationId="JUnit" /> - </history-entry> <history-entry file="RegistrationControl_Test - 2017.06.20 at 00h 50m 35s.xml"> <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> @@ -1191,9 +1190,12 @@ <history-entry file="RegistrationControl_Test - 2017.06.20 at 09h 53m 04s.xml"> <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> + <history-entry file="RegistrationControl_Test - 2017.06.20 at 10h 10m 43s.xml"> + <configuration name="RegistrationControl_Test" configurationId="JUnit" /> + </history-entry> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="70992000" /> + <option name="totallyTimeSpent" value="71259000" /> </component> <component name="ToolWindowManager"> <frame x="0" y="0" width="1920" height="1080" extended-state="0" /> @@ -1614,7 +1616,7 @@ </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="449"> + <state relative-caret-position="540"> <caret line="41" column="12" lean-forward="false" selection-start-line="41" selection-start-column="12" selection-end-line="43" selection-end-column="13" /> <folding> <marker date="1497910575000" expanded="true" signature="841:867" ph="INSERT INTO \"ERR\".... " /> @@ -1627,14 +1629,15 @@ </entry> <entry file="file://$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="756"> - <caret line="66" column="59" lean-forward="false" selection-start-line="66" selection-start-column="59" selection-end-line="66" selection-end-column="59" /> + <state relative-caret-position="771"> + <caret line="79" column="61" lean-forward="false" selection-start-line="79" selection-start-column="61" selection-end-line="79" selection-end-column="61" /> <folding> - <marker date="1497945181000" expanded="true" signature="1464:1545" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1464:1546" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1464:1550" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1464:1551" ph="SELECT * FRO... user" /> - <marker date="1497945181000" expanded="true" signature="1585:1651" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1532" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1533" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1537" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1451:1538" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="1572:1638" ph="SELECT * FRO... user" /> + <marker date="1497946237000" expanded="true" signature="2436:2514" ph="DELETE FROM " /> </folding> </state> </provider> diff --git a/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java b/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java index 8b0619f1183caeedc693873ba286bebe13e671e2..559dbdef52214494b5030ef66d6e13df3a7d56fe 100644 --- a/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java +++ b/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java @@ -48,7 +48,6 @@ public class RegistrationControl_Test { user.setVorname("Tester"); } -//unfinished @Test public void Registration_Test() { @@ -72,4 +71,17 @@ public class RegistrationControl_Test { } + @After + public void delete(){ + String sql_delete = "DELETE FROM \"ERR\".\"user\" u "+ " WHERE u.benutzername = '" + "Testcase" +"';"; + try { + int exe = JDBCConnection.getInstance().getStatement().executeUpdate(sql_delete); + if(exe<0){ + throw new WrongInputException("Wrong input"); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + }