diff --git a/.idea/workspace.xml b/.idea/workspace.xml index aabc90744de4a0a6c843f43d48edd7e962ff0b02..40100a08450844dd34db9e8adef351d4db6d4400 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,6 +4,7 @@ <list default="true" id="5f36371d-de5c-44ce-a12c-613727d95355" name="Default" comment=""> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" /> <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java" afterPath="$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java" /> + <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java" afterPath="$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java" /> </list> <ignored path="shopInShop.iws" /> <ignored path=".idea/workspace.xml" /> @@ -28,31 +29,40 @@ <file leaf-file-name="RegistrationControl.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="242"> - <caret line="32" column="27" lean-forward="false" selection-start-line="32" selection-start-column="25" selection-end-line="32" selection-end-column="27" /> + <state relative-caret-position="488"> + <caret line="53" column="43" lean-forward="false" selection-start-line="53" selection-start-column="43" selection-end-line="53" selection-end-column="43" /> <folding /> </state> </provider> </entry> </file> - <file leaf-file-name="RegistrationDAO.java" pinned="false" current-in-tab="true"> + <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="495"> - <caret line="38" column="28" lean-forward="false" selection-start-line="38" selection-start-column="28" selection-end-line="38" selection-end-column="28" /> + <state relative-caret-position="242"> + <caret line="27" column="26" lean-forward="true" selection-start-line="27" selection-start-column="26" selection-end-line="27" selection-end-column="26" /> <folding> - <marker date="1497906075000" expanded="true" signature="633:968" ph="INSERT INTO \"ERR\".\"user\"... " /> + <marker date="1497910575000" expanded="true" signature="841:867" ph="INSERT INTO \"ERR\".... " /> + <marker date="1497910575000" expanded="true" signature="841:916" ph="INSERT INTO \"ERR\".... " /> + <marker date="1497910575000" expanded="true" signature="841:957" ph="INSERT INTO \"ERR\".... " /> + <marker date="1497910575000" expanded="true" signature="841:1084" ph="INSERT INTO \"ERR\".\"user\"... " /> </folding> </state> </provider> </entry> </file> - <file leaf-file-name="RegistrierungView.java" pinned="false" current-in-tab="false"> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java"> + <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="417"> - <caret line="102" column="0" lean-forward="false" selection-start-line="102" selection-start-column="0" selection-end-line="102" selection-end-column="0" /> - <folding /> + <state relative-caret-position="561"> + <caret line="53" column="112" lean-forward="false" selection-start-line="53" selection-start-column="112" selection-end-line="53" selection-end-column="112" /> + <folding> + <marker date="1497912919000" expanded="true" signature="1443:1524" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1443:1525" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1443:1529" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1443:1530" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1564:1630" ph="SELECT * FRO... user" /> + </folding> </state> </provider> </entry> @@ -60,8 +70,28 @@ <file leaf-file-name="LoginControl.java" pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/LoginControl.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="330"> - <caret line="31" column="41" lean-forward="false" selection-start-line="31" selection-start-column="41" selection-end-line="31" selection-end-column="41" /> + <state relative-caret-position="270"> + <caret line="27" column="57" lean-forward="false" selection-start-line="24" selection-start-column="42" selection-end-line="27" selection-end-column="57" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="User.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/modell/dto/User.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="143"> + <caret line="11" column="13" lean-forward="false" selection-start-line="11" selection-start-column="13" selection-end-line="11" selection-end-column="13" /> + <folding /> + </state> + </provider> + </entry> + </file> + <file leaf-file-name="RegistrierungView.java" pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="-331"> + <caret line="44" column="27" lean-forward="false" selection-start-line="44" selection-start-column="27" selection-end-line="44" selection-end-column="27" /> <folding /> </state> </provider> @@ -141,10 +171,10 @@ <option value="$PROJECT_DIR$/src/test/java/org/s4s/services/db/JDBCConnectionTest.java" /> <option value="$PROJECT_DIR$/src/main/java/org/s4s/dao/impl/LoginControl.java" /> <option value="$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/LoginControl_Test.java" /> - <option value="$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java" /> <option value="$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java" /> <option value="$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java" /> <option value="$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java" /> + <option value="$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java" /> </list> </option> </component> @@ -246,6 +276,8 @@ <foldersAlwaysOnTop value="true" /> </navigator> <panes> + <pane id="PackagesPane" /> + <pane id="Scratches" /> <pane id="ProjectPane"> <subPane> <PATH> @@ -275,6 +307,44 @@ <option name="myItemId" value="test" /> <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="s4s" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="shopInShop" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="s4s" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="test" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="s4s" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="impl" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> </PATH> <PATH> <PATH_ELEMENT> @@ -372,6 +442,36 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="shopInShop" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="s4s" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="s4s" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="dto" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> <PATH> <PATH_ELEMENT> <option name="myItemId" value="shopInShop" /> @@ -436,6 +536,36 @@ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> </PATH_ELEMENT> </PATH> + <PATH> + <PATH_ELEMENT> + <option name="myItemId" value="shopInShop" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="s4s" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="src" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="main" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="java" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="s4s" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + <PATH_ELEMENT> + <option name="myItemId" value="exceptions" /> + <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" /> + </PATH_ELEMENT> + </PATH> <PATH> <PATH_ELEMENT> <option name="myItemId" value="shopInShop" /> @@ -468,9 +598,7 @@ </PATH> </subPane> </pane> - <pane id="PackagesPane" /> <pane id="Scope" /> - <pane id="Scratches" /> </panes> </component> <component name="PropertiesComponent"> @@ -508,7 +636,7 @@ </list> </option> </component> - <component name="RunManager" selected="Maven.shopInShop [jetty:run]"> + <component name="RunManager" selected="JUnit.RegistrationControl_Test"> <configuration default="false" name="shopInShop [jetty:run]" type="MavenRunConfiguration" factoryName="Maven" temporary="true"> <MavenSettings> <option name="myGeneralSettings" /> @@ -970,8 +1098,8 @@ </list> <recent_temporary> <list size="4"> - <item index="0" class="java.lang.String" itemvalue="Maven.shopInShop [jetty:run]" /> - <item index="1" class="java.lang.String" itemvalue="JUnit.RegistrationControl_Test" /> + <item index="0" class="java.lang.String" itemvalue="JUnit.RegistrationControl_Test" /> + <item index="1" class="java.lang.String" itemvalue="Maven.shopInShop [jetty:run]" /> <item index="2" class="java.lang.String" itemvalue="JUnit.LoginControl_Test.login_Test" /> <item index="3" class="java.lang.String" itemvalue="JUnit.LoginControl_Test" /> </list> @@ -1029,72 +1157,74 @@ <workItem from="1497882792519" duration="2838000" /> <workItem from="1497892141475" duration="1318000" /> <workItem from="1497902421348" duration="3435000" /> + <workItem from="1497907375567" duration="5487000" /> </task> <servers /> </component> <component name="TestHistory"> - <history-entry file="LoginControl_Test_login_Test - 2017.06.06 at 13h 17m 24s.xml"> - <configuration name="LoginControl_Test.login_Test" configurationId="JUnit" /> + <history-entry file="RegistrationControl_Test - 2017.06.06 at 13h 39m 41s.xml"> + <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="LoginControl_Test_login_Test - 2017.06.06 at 13h 26m 29s.xml"> - <configuration name="LoginControl_Test.login_Test" configurationId="JUnit" /> + <history-entry file="RegistrationControl_Test - 2017.06.06 at 13h 42m 31s.xml"> + <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="LoginControl_Test_login_Test - 2017.06.06 at 13h 27m 23s.xml"> - <configuration name="LoginControl_Test.login_Test" configurationId="JUnit" /> + <history-entry file="RegistrationControl_Test - 2017.06.06 at 13h 45m 13s.xml"> + <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="LoginControl_Test_login_Test - 2017.06.06 at 13h 28m 08s.xml"> - <configuration name="LoginControl_Test.login_Test" configurationId="JUnit" /> + <history-entry file="RegistrationControl_Test - 2017.06.06 at 13h 45m 39s.xml"> + <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="LoginControl_Test_login_Test - 2017.06.06 at 13h 28m 50s.xml"> - <configuration name="LoginControl_Test.login_Test" configurationId="JUnit" /> + <history-entry file="RegistrationControl_Test - 2017.06.20 at 00h 40m 46s.xml"> + <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="LoginControl_Test_login_Test - 2017.06.06 at 13h 29m 26s.xml"> - <configuration name="LoginControl_Test.login_Test" configurationId="JUnit" /> + <history-entry file="RegistrationControl_Test - 2017.06.20 at 00h 44m 05s.xml"> + <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="RegistrationControl_Test - 2017.06.06 at 13h 39m 41s.xml"> + <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.06 at 13h 42m 31s.xml"> + <history-entry file="RegistrationControl_Test - 2017.06.20 at 00h 50m 35s.xml"> <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="RegistrationControl_Test - 2017.06.06 at 13h 45m 13s.xml"> + <history-entry file="RegistrationControl_Test - 2017.06.20 at 00h 53m 28s.xml"> <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> - <history-entry file="RegistrationControl_Test - 2017.06.06 at 13h 45m 39s.xml"> + <history-entry file="RegistrationControl_Test - 2017.06.20 at 00h 53m 50s.xml"> <configuration name="RegistrationControl_Test" configurationId="JUnit" /> </history-entry> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="65029000" /> + <option name="totallyTimeSpent" value="70516000" /> </component> <component name="ToolWindowManager"> <frame x="0" y="0" width="1920" height="1080" extended-state="0" /> <editor active="true" /> <layout> <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> <window_info id="Nl-Palette" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> - <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> - <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.23891892" sideWeight="0.27291667" order="7" side_tool="true" content_ui="tabs" /> <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.1745435" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> - <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24588577" sideWeight="0.49583334" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Properties" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> - <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> <window_info id="Designer" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> - <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18385416" sideWeight="0.49272728" order="0" side_tool="false" content_ui="combo" /> - <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" /> <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.26918918" sideWeight="0.7270833" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" /> + <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32913843" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Palette	" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Java Enterprise" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" /> + <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> + <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.24588577" sideWeight="0.49583334" order="2" side_tool="false" content_ui="tabs" /> + <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> + <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.18385416" sideWeight="0.49272728" order="0" side_tool="false" content_ui="combo" /> + <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="true" content_ui="tabs" /> <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.18093699" sideWeight="0.5072727" order="2" side_tool="true" content_ui="tabs" /> - <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.26918918" sideWeight="0.7270833" order="3" side_tool="false" content_ui="tabs" /> <window_info id="PlantUML" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" /> <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" /> <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" /> @@ -1102,7 +1232,6 @@ <window_info id="com.vaadin.designer.intellij.palette.toolWindow" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3296875" sideWeight="0.35135135" order="6" side_tool="false" content_ui="tabs" /> <window_info id="com.vaadin.designer.intellij.outline.toolWindow" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.3296875" sideWeight="0.6486486" order="6" side_tool="true" content_ui="tabs" /> <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" /> - <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32970297" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" /> <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" /> <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" /> </layout> @@ -1361,33 +1490,15 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/modell/dto/User.java"> - <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="105"> - <caret line="11" column="13" lean-forward="false" selection-start-line="11" selection-start-column="13" selection-end-line="11" selection-end-column="13" /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/test/java/org/s4s/dao/impl/LoginControl_Test.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="315"> <caret line="21" column="0" lean-forward="true" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" /> - <folding> - <element signature="imports" expanded="false" /> - </folding> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/impl/LoginControl.java" /> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/impl/RegistrationControl.java" /> - <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="240"> - <caret line="18" column="5" lean-forward="false" selection-start-line="18" selection-start-column="5" selection-end-line="18" selection-end-column="5" /> - <folding /> - </state> - </provider> - </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/ProductDAO.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="120"> @@ -1416,10 +1527,6 @@ <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="150"> <caret line="16" column="26" lean-forward="false" selection-start-line="16" selection-start-column="26" selection-end-line="16" selection-end-column="26" /> - <folding> - <element signature="imports" expanded="false" /> - <marker date="1496932737000" expanded="true" signature="585:784" ph="SELECT u.\"b... user" /> - </folding> </state> </provider> </entry> @@ -1468,44 +1575,68 @@ </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java"> + <entry file="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/42.1.1.jre7/postgresql-42.1.1.jre7.jar!/org/postgresql/jdbc/PgResultSet.class"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="242"> - <caret line="32" column="27" lean-forward="false" selection-start-line="32" selection-start-column="25" selection-end-line="32" selection-end-column="27" /> + <state relative-caret-position="661"> + <caret line="570" column="0" lean-forward="false" selection-start-line="570" selection-start-column="0" selection-end-line="570" selection-end-column="0" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/modell/dto/User.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="143"> + <caret line="11" column="13" lean-forward="false" selection-start-line="11" selection-start-column="13" selection-end-line="11" selection-end-column="13" /> <folding /> </state> </provider> </entry> - <entry file="jar://$MAVEN_REPOSITORY$/org/postgresql/postgresql/42.1.1.jre7/postgresql-42.1.1.jre7.jar!/org/postgresql/jdbc/PgResultSet.class"> + <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/RegistrationControl.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="661"> - <caret line="570" column="0" lean-forward="false" selection-start-line="570" selection-start-column="0" selection-end-line="570" selection-end-column="0" /> + <state relative-caret-position="488"> + <caret line="53" column="43" lean-forward="false" selection-start-line="53" selection-start-column="43" selection-end-line="53" selection-end-column="43" /> <folding /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/gui/views/RegistrierungView.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="417"> - <caret line="102" column="0" lean-forward="false" selection-start-line="102" selection-start-column="0" selection-end-line="102" selection-end-column="0" /> + <state relative-caret-position="-331"> + <caret line="44" column="27" lean-forward="false" selection-start-line="44" selection-start-column="27" selection-end-line="44" selection-end-column="27" /> <folding /> </state> </provider> </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="242"> + <caret line="27" column="26" lean-forward="true" selection-start-line="27" selection-start-column="26" selection-end-line="27" selection-end-column="26" /> + <folding> + <marker date="1497910575000" expanded="true" signature="841:867" ph="INSERT INTO \"ERR\".... " /> + <marker date="1497910575000" expanded="true" signature="841:916" ph="INSERT INTO \"ERR\".... " /> + <marker date="1497910575000" expanded="true" signature="841:957" ph="INSERT INTO \"ERR\".... " /> + <marker date="1497910575000" expanded="true" signature="841:1084" ph="INSERT INTO \"ERR\".\"user\"... " /> + </folding> + </state> + </provider> + </entry> <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/process/control/LoginControl.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="330"> - <caret line="31" column="41" lean-forward="false" selection-start-line="31" selection-start-column="41" selection-end-line="31" selection-end-column="41" /> + <state relative-caret-position="270"> + <caret line="27" column="57" lean-forward="false" selection-start-line="24" selection-start-column="42" selection-end-line="27" selection-end-column="57" /> <folding /> </state> </provider> </entry> - <entry file="file://$PROJECT_DIR$/src/main/java/org/s4s/dao/RegistrationDAO.java"> + <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="495"> - <caret line="38" column="28" lean-forward="false" selection-start-line="38" selection-start-column="28" selection-end-line="38" selection-end-column="28" /> + <state relative-caret-position="561"> + <caret line="53" column="112" lean-forward="false" selection-start-line="53" selection-start-column="112" selection-end-line="53" selection-end-column="112" /> <folding> - <marker date="1497906075000" expanded="true" signature="633:968" ph="INSERT INTO \"ERR\".\"user\"... " /> + <marker date="1497912919000" expanded="true" signature="1443:1524" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1443:1525" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1443:1529" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1443:1530" ph="SELECT * FRO... user" /> + <marker date="1497912919000" expanded="true" signature="1564:1630" ph="SELECT * FRO... user" /> </folding> </state> </provider> diff --git a/src/main/java/org/s4s/dao/RegistrationDAO.java b/src/main/java/org/s4s/dao/RegistrationDAO.java index 4936321d6dd6253e483a5775801fe8055befb856..062e743cddaf929d9d3bae7cdbcb628da67d867b 100644 --- a/src/main/java/org/s4s/dao/RegistrationDAO.java +++ b/src/main/java/org/s4s/dao/RegistrationDAO.java @@ -12,16 +12,16 @@ import javax.sql.rowset.serial.SQLInputImpl; * @author Simon */ public class RegistrationDAO extends AbstractDatabaseClass { - + //die Registration funktioniert jetzt auch mit automatischen Einfügen einer UserID allerdings muss noch die AdressId angepasst werden, da bei Registrierung nicht nach einer Adresse gefragt wird; suerdi2s Statement st; String sql_update; String sql_query; Integer result; - public void addUser(int userID, String benutzer, String nachname, String vorname, java.util.Date gebDate, int fBereich, String email, String emailwdh, String passwort, String passwortWdh) { + public void addUser( int userID, String benutzer, String nachname, String vorname, java.util.Date gebDate, int fBereich, String email, String emailwdh, String passwort, String passwortWdh) { try { - sql_update = "INSERT INTO \"ERR\".\"user\"(userID, benutzername, adresseid, nachname, vorname, geburtsdatum, fachbreichid, email, passwort)" - + "VALUES(\'" + 20 + "\', \'" + benutzer + "\', \'" + 1 + "\', \'" + nachname + "\', \'" + vorname + "\', \'" + gebDate + "\', \'" + fBereich + "\', \'" + email + "\', \'" + passwort + "\')"; + sql_update = "INSERT INTO \"ERR\".\"user\" " + + "VALUES(\'" + userID + "\', \'" + benutzer + "\', \'" + email + "\', \'" + gebDate + "\', \'" + passwort + "\', \'" + fBereich + "\', \'" + 1 + "\', \'" + nachname + "\', \'" + vorname + "\')"; int exe = JDBCConnection.getInstance().getStatement().executeUpdate(sql_update); @@ -37,15 +37,20 @@ public class RegistrationDAO extends AbstractDatabaseClass { } public int getUserID() { - sql_query = "SELECT MAX('u.userID') FROM \"ERR\".\"user\" u"; + sql_query = "SELECT MAX(\"userID\") AS \"userID\" FROM \"ERR\".\"user\" u"; try (ResultSet set = executeQuery(sql_query);){ - System.out.println(set.getInt("userID")); + if(!set.next()){ + throw new WrongInputException("Wrong Input"); + } result = set.getInt("userID"); - } catch (SQLException e) { + } catch (Exception e) { e.printStackTrace(); System.out.println("Exception occur: " + e); } + System.out.print(result); return result + 1; } + + } 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 c709fae0d5a5e184ff6162887e4adb5895257846..72091ddb692aade83af1b136724238765717683c 100644 --- a/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java +++ b/src/test/java/org/s4s/dao/impl/RegistrationControl_Test.java @@ -1,15 +1,25 @@ package org.s4s.dao.impl; import static org.junit.Assert.*; + +import org.junit.After; +import org.junit.Before; import org.junit.Test; +import org.s4s.dao.RegistrationDAO; +import org.s4s.modell.dto.User; import org.s4s.process.control.RegistrationControl; +import org.s4s.services.db.JDBCConnection; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Date; /** * Created by uerdingen on 03.06.17. */ public class RegistrationControl_Test { - private String[] data1 = new String[7]; + private User user = null; @Test public void nameValidator_Test() { @@ -18,15 +28,48 @@ public class RegistrationControl_Test { } + @Before + public void init(){ + Date bday = new Date(); + bday.setYear(1995); + bday.setMonth(5); + bday.setDate(15); + + RegistrationDAO regDAO = new RegistrationDAO(); + int userID = regDAO.getUserID(); + RegistrationControl.init("Testcase", "Nachname", "Tester", bday, 2, "testmail@gmx.de", "testmail@gmx.de", "test12345", "test12345"); + + user = new User("Testcase", userID); + user.setEmail("testmail@gmx.de"); + user.setFachbereichId(2); + user.setGeburtsdatum("1995-5-15"); + user.setNachname("Nachname"); + user.setVorname("Tester"); + } + //unfinished @Test public void Registration_Test() { - data1[0] = "Uerdingen"; - data1[1] = "Simon"; - data1[2] = "simon.uerdingen@inf.h-brs.de"; - data1[4] = "12345"; - //assertTrue(RegistrationControl.init(data1)); - //@TM: der Test muss neu geschrieben werden, wegen Änderungen in View, DAO & Control; svolle2s + User user1 = null; + String sql_query = "SELECT *" + " FROM \"ERR\".\"user\" u " + " WHERE u.benutzername = '" + "Testcase" +"';"; + // String sql_query = "SELECT * FROM \"ERR\".\"user\" u WHERE u.benutzername = 'Testcase'"; + try { + ResultSet set = JDBCConnection.getInstance().getStatement().executeQuery(sql_query); + user1 = new User(set.getString("benutzername"), set.getInt("userID")); + user1.setVorname(set.getString("vorname")); + user1.setNachname(set.getString("nachname")); + user1.setFachbereichId(set.getInt("fachbereichid")); + user1.setEmail(set.getString("email")); + } catch (SQLException e) { + e.printStackTrace(); + } + assertEquals(user, user1); + + } + + @After + public void delete(){ + } }