Permalink
Browse files

error checking on signup

  • Loading branch information...
1 parent 89c9802 commit 1ae6b73888616de5bad89646213a63df327d30b3 @biafra23 committed May 16, 2012
Showing with 59 additions and 41 deletions.
  1. +40 −41 .idea/workspace.xml
  2. +19 −0 AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java
View
@@ -439,24 +439,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="f4c483b1-9a40-4fe9-8b39-68e93df70ae5" name="ScoreBoard" comment="signup dummy as dialog fragment">
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__com_actionbarsherlock_library_4_0_0.xml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/.idea/libraries/Maven__com_google_android_support_v4_r6.xml" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__com_google_android_android_2_3_1.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__com_jaeckel_amenoid_1_0_ALPHA16.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__com_jayway_android_robotium_robotium_solo_3_0.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__commons_codec_commons_codec_1_3.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__commons_logging_commons_logging_1_1_1.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__org_apache_httpcomponents_httpclient_4_0_1.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__org_apache_httpcomponents_httpcore_4_0_1.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__org_json_json_20080701.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__org_khronos_opengl_api_gl1_1_android_2_1_r1.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__xerces_xmlParserAPIs_2_6_2.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/.idea/libraries/Maven__xpp3_xpp3_1_1_4c.xml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/AmDroidTest/gen-external-apklibs/~apklib-com.actionbarsherlock_library_4.0.2.iml" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/AmDroidTest/gen-external-apklibs/~apklib-com.wazabe.holoeverywhere_library_1.0.0.iml" afterPath="" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/modules.xml" afterPath="$PROJECT_DIR$/.idea/modules.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java" afterPath="$PROJECT_DIR$/AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java" />
</list>
<ignored path="amdroid-parent.iws" />
<ignored path=".idea/workspace.xml" />
@@ -997,19 +981,19 @@
</provider>
</entry>
</file>
- <file leaf-file-name="AmenServiceImpl.java" pinned="false" current="true" current-in-tab="true">
+ <file leaf-file-name="AmenServiceImpl.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/AmenLib/src/main/java/com.jaeckel/amenoid/api/AmenServiceImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="952" column="71" selection-start="30676" selection-end="30676" vertical-scroll-proportion="0.57894737">
+ <state line="958" column="52" selection-start="30897" selection-end="30897" vertical-scroll-proportion="-14.423077">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="AmenServiceITest.java" pinned="false" current="false" current-in-tab="false">
+ <file leaf-file-name="AmenServiceITest.java" pinned="false" current="true" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="374" column="25" selection-start="10582" selection-end="10619" vertical-scroll-proportion="0.0">
+ <state line="377" column="5" selection-start="10759" selection-end="10759" vertical-scroll-proportion="0.59958935">
<folding>
<element signature="imports" expanded="true" />
<element signature="docComment;class#AmenServiceITest#0" expanded="true" />
@@ -1018,6 +1002,15 @@
</provider>
</entry>
</file>
+ <file leaf-file-name="build.log" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/build.log">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="20" column="52" selection-start="1114" selection-end="1114" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
<file leaf-file-name="SignupFailedException.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/AmenLib/src/main/java/com.jaeckel/amenoid/api/SignupFailedException.java">
<provider selected="true" editor-type-id="text-editor">
@@ -1078,8 +1071,8 @@
<option value="$PROJECT_DIR$/AmDroid/res/layout/fragment_sign_up.xml" />
<option value="$PROJECT_DIR$/pom.xml" />
<option value="$PROJECT_DIR$/AmDroid/src/main/java/com/jaeckel/amenoid/SettingsActivity.java" />
- <option value="$PROJECT_DIR$/AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java" />
<option value="$PROJECT_DIR$/AmenLib/src/main/java/com.jaeckel/amenoid/api/AmenServiceImpl.java" />
+ <option value="$PROJECT_DIR$/AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java" />
</list>
</option>
</component>
@@ -3141,7 +3134,11 @@
<created>1337127181670</created>
<updated>1337127181671</updated>
</task>
- <option name="localTasksCounter" value="103" />
+ <task id="LOCAL-00103" summary="ide configuration filex">
+ <created>1337127201133</created>
+ <updated>1337127201133</updated>
+ </task>
+ <option name="localTasksCounter" value="104" />
<option name="clearContext" value="false" />
<option name="createChangelist" value="false" />
<servers />
@@ -3174,9 +3171,9 @@
<window_info id="JetGradle" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
<window_info id="Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.20011806" sideWeight="0.5821727" order="9" side_tool="false" content_ui="tabs" />
<window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.47974414" sideWeight="0.90554965" order="2" side_tool="false" content_ui="tabs" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.47974414" sideWeight="0.90554965" order="2" 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" weight="0.25" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.36353946" sideWeight="0.49748382" order="4" side_tool="false" content_ui="tabs" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.36353946" sideWeight="0.49748382" order="4" 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" weight="0.59800667" sideWeight="0.50428396" order="10" side_tool="true" content_ui="tabs" />
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32683378" sideWeight="0.5" order="11" side_tool="false" content_ui="tabs" />
@@ -3186,7 +3183,7 @@
<window_info id="Structure" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.18463181" sideWeight="0.34564102" order="11" 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" weight="0.20247933" sideWeight="0.63646054" order="2" side_tool="false" content_ui="tabs" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39957264" sideWeight="0.49619773" order="1" side_tool="false" content_ui="tabs" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22432113" sideWeight="0.63646054" order="0" side_tool="false" content_ui="combo" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22432113" sideWeight="0.52025586" order="0" side_tool="false" content_ui="combo" />
<window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.2943361" sideWeight="0.3172338" order="3" side_tool="false" content_ui="tabs" x="84" y="351" width="1761" height="845" />
<window_info id="Documentation" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="FLOATING" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" x="213" y="129" width="919" height="477" />
<window_info id="Leiningen" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
@@ -3239,7 +3236,7 @@
<option name="SHOW_VCS_ERROR_NOTIFICATIONS" value="true" />
<option name="FORCE_NON_EMPTY_COMMENT" value="false" />
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="false" />
- <option name="LAST_COMMIT_MESSAGE" value="disabling integration tests modul" />
+ <option name="LAST_COMMIT_MESSAGE" value="ide configuration filex" />
<option name="MAKE_NEW_CHANGELIST_ACTIVE" value="true" />
<option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_FILES_UP_TO_DATE_BEFORE_COMMIT" value="false" />
@@ -3254,7 +3251,6 @@
<option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
<confirmMoveToFailedCommit value="1" />
<confirmRemoveEmptyChangelist value="1" />
- <MESSAGE value="removed commented config" />
<MESSAGE value="make suggestions in dispute readable" />
<MESSAGE value="clarifying comment" />
<MESSAGE value="search more prominent in actionbar" />
@@ -3279,6 +3275,7 @@
<MESSAGE value="finishing sig up ui" />
<MESSAGE value="checking error exception in tests" />
<MESSAGE value="disabling integration tests modul" />
+ <MESSAGE value="ide configuration filex" />
</component>
<component name="XDebuggerManager">
<breakpoint-manager />
@@ -3288,11 +3285,6 @@
<option name="FILTER_TARGETS" value="false" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/AmDroid/res/drawable-mdpi/ic_launcher.png">
- <provider selected="true" editor-type-id="images">
- <state />
- </provider>
- </entry>
<entry file="file://$PROJECT_DIR$/AmDroid/res/drawable-hdpi/ic_launcher.png">
<provider selected="true" editor-type-id="images">
<state />
@@ -3385,23 +3377,30 @@
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java">
+ <entry file="file://$PROJECT_DIR$/AmenLib/src/main/java/com.jaeckel/amenoid/api/AmenServiceImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="374" column="25" selection-start="10582" selection-end="10619" vertical-scroll-proportion="0.0">
- <folding>
- <element signature="imports" expanded="true" />
- <element signature="docComment;class#AmenServiceITest#0" expanded="true" />
- </folding>
+ <state line="958" column="52" selection-start="30897" selection-end="30897" vertical-scroll-proportion="-14.423077">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/AmenLib/src/main/java/com.jaeckel/amenoid/api/AmenServiceImpl.java">
+ <entry file="file://$PROJECT_DIR$/build.log">
<provider selected="true" editor-type-id="text-editor">
- <state line="952" column="71" selection-start="30676" selection-end="30676" vertical-scroll-proportion="0.57894737">
+ <state line="20" column="52" selection-start="1114" selection-end="1114" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
+ <entry file="file://$PROJECT_DIR$/AmenLib/src/test/java/com/jaeckel/amenoid/api/AmenServiceITest.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="377" column="5" selection-start="10759" selection-end="10759" vertical-scroll-proportion="0.59958935">
+ <folding>
+ <element signature="imports" expanded="true" />
+ <element signature="docComment;class#AmenServiceITest#0" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
</component>
<component name="masterDetails">
<states>
@@ -361,6 +361,25 @@ public void testSignUpNameTooLong() throws IOException {
}
+ public void testSignUpEmailExists() throws IOException {
+
+ AmenService signOutService = new AmenServiceImpl(amenHttpClient);
+ try {
+
+ User user = signOutService.signup("myfoobarbaztoolongever", username, "hooligans");
+ System.out.println("result: " + user);
+ fail("Exception not thrown");
+
+ } catch (SignupFailedException e) {
+ System.out.println("e: " + e);
+
+ assertEquals("email", e.getField());
+ assertEquals("has already been taken", e.getMsg());
+ }
+
+
+ }
+
public void testEmptySignUp() throws IOException {
User user;
AmenService signOutService = new AmenServiceImpl(amenHttpClient);

0 comments on commit 1ae6b73

Please sign in to comment.