Seth hace 6 años
padre
commit
84c173742f

+ 0
- 13
.idea/libraries/Maven__junit_junit_4_0.xml Ver fichero

@@ -1,13 +0,0 @@
1
-<component name="libraryTable">
2
-  <library name="Maven: junit:junit:4.0">
3
-    <CLASSES>
4
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0.jar!/" />
5
-    </CLASSES>
6
-    <JAVADOC>
7
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0-javadoc.jar!/" />
8
-    </JAVADOC>
9
-    <SOURCES>
10
-      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0-sources.jar!/" />
11
-    </SOURCES>
12
-  </library>
13
-</component>

+ 13
- 0
.idea/libraries/Maven__junit_junit_4_12.xml Ver fichero

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: junit:junit:4.12">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 13
- 0
.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml Ver fichero

@@ -0,0 +1,13 @@
1
+<component name="libraryTable">
2
+  <library name="Maven: org.hamcrest:hamcrest-core:1.3">
3
+    <CLASSES>
4
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" />
5
+    </CLASSES>
6
+    <JAVADOC>
7
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-javadoc.jar!/" />
8
+    </JAVADOC>
9
+    <SOURCES>
10
+      <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3-sources.jar!/" />
11
+    </SOURCES>
12
+  </library>
13
+</component>

+ 344
- 229
.idea/workspace.xml Ver fichero

@@ -2,79 +2,123 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
5
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
6
-      <change beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
5
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_12.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml" afterDir="false" />
7
+      <change afterPath="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_0.xml" beforeDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/arraz/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/arraz.iml" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/arraz/pom.xml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/pom.xml" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
13
+      <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
7 14
     </list>
8 15
     <ignored path="$PROJECT_DIR$/arraz/target/" />
9 16
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
10
-    <option name="TRACKING_ENABLED" value="true" />
11 17
     <option name="SHOW_DIALOG" value="false" />
12 18
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
13 19
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
14 20
     <option name="LAST_RESOLUTION" value="IGNORE" />
15 21
   </component>
22
+  <component name="FUSProjectUsageTrigger">
23
+    <session id="533842486">
24
+      <usages-collector id="statistics.lifecycle.project">
25
+        <counts>
26
+          <entry key="project.open.time.1" value="1" />
27
+          <entry key="project.opened" value="1" />
28
+        </counts>
29
+      </usages-collector>
30
+      <usages-collector id="statistics.file.types.edit">
31
+        <counts>
32
+          <entry key="JAVA" value="3519" />
33
+          <entry key="XML" value="3" />
34
+        </counts>
35
+      </usages-collector>
36
+      <usages-collector id="statistics.file.types.open">
37
+        <counts>
38
+          <entry key="JAVA" value="1" />
39
+          <entry key="XML" value="1" />
40
+        </counts>
41
+      </usages-collector>
42
+    </session>
43
+  </component>
16 44
   <component name="FileEditorManager">
17 45
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
18
-      <file leaf-file-name="pom.xml" pinned="false" current-in-tab="false">
19
-        <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
20
-          <provider selected="true" editor-type-id="text-editor">
21
-            <state relative-caret-position="0">
22
-              <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
23
-              <folding />
24
-            </state>
25
-          </provider>
26
-        </entry>
27
-      </file>
28
-      <file leaf-file-name="Arraz.java" pinned="false" current-in-tab="false">
46
+      <file pinned="false" current-in-tab="false">
29 47
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
30 48
           <provider selected="true" editor-type-id="text-editor">
31
-            <state relative-caret-position="0">
32
-              <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
33
-              <folding />
49
+            <state relative-caret-position="368">
50
+              <caret line="65" column="18" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="18" />
51
+              <folding>
52
+                <element signature="e#399#400#0" expanded="true" />
53
+                <element signature="e#451#452#0" expanded="true" />
54
+                <element signature="e#515#516#0" expanded="true" />
55
+                <element signature="e#556#557#0" expanded="true" />
56
+              </folding>
34 57
             </state>
35 58
           </provider>
36 59
         </entry>
37 60
       </file>
38
-      <file leaf-file-name="ArrazTest.java" pinned="false" current-in-tab="false">
61
+      <file pinned="false" current-in-tab="true">
39 62
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
40 63
           <provider selected="true" editor-type-id="text-editor">
41
-            <state relative-caret-position="34">
42
-              <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
43
-              <folding />
64
+            <state relative-caret-position="2190">
65
+              <caret line="146" column="5" lean-forward="true" selection-start-line="146" selection-start-column="5" selection-end-line="146" selection-end-column="5" />
66
+              <folding>
67
+                <element signature="imports" expanded="true" />
68
+              </folding>
44 69
             </state>
45 70
           </provider>
46 71
         </entry>
47 72
       </file>
48
-      <file leaf-file-name="README.md" pinned="false" current-in-tab="true">
73
+      <file pinned="false" current-in-tab="false">
49 74
         <entry file="file://$PROJECT_DIR$/README.md">
50 75
           <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
51 76
             <state split_layout="SPLIT">
52
-              <first_editor relative-caret-position="306">
53
-                <caret line="18" column="0" lean-forward="true" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
54
-                <folding />
77
+              <first_editor relative-caret-position="381">
78
+                <caret line="74" column="117" selection-start-line="74" selection-start-column="113" selection-end-line="74" selection-end-column="117" />
55 79
               </first_editor>
56 80
               <second_editor />
57 81
             </state>
58 82
           </provider>
59 83
         </entry>
60 84
       </file>
85
+      <file pinned="false" current-in-tab="false">
86
+        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
87
+          <provider selected="true" editor-type-id="text-editor">
88
+            <state relative-caret-position="150">
89
+              <caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
90
+              <folding>
91
+                <element signature="e#215#216#0" expanded="true" />
92
+                <element signature="e#250#251#0" expanded="true" />
93
+                <element signature="e#280#281#0" expanded="true" />
94
+                <element signature="e#308#309#0" expanded="true" />
95
+                <element signature="e#335#336#0" expanded="true" />
96
+                <element signature="e#372#373#0" expanded="true" />
97
+                <element signature="e#404#405#0" expanded="true" />
98
+              </folding>
99
+            </state>
100
+          </provider>
101
+        </entry>
102
+      </file>
61 103
     </leaf>
62 104
   </component>
63 105
   <component name="FileTemplateManagerImpl">
64 106
     <option name="RECENT_TEMPLATES">
65 107
       <list>
66
-        <option value="Class" />
67 108
         <option value="JUnit4 Test Class" />
109
+        <option value="Class" />
68 110
       </list>
69 111
     </option>
70 112
   </component>
113
+  <component name="FindInProjectRecents">
114
+    <findStrings>
115
+      <find>sort</find>
116
+    </findStrings>
117
+  </component>
71 118
   <component name="Git.Settings">
72 119
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
73 120
   </component>
74 121
   <component name="GradleLocalSettings">
75
-    <option name="externalProjectsViewState">
76
-      <projects_view />
77
-    </option>
78 122
     <option name="projectSyncType">
79 123
       <map>
80 124
         <entry key="$USER_HOME$/GitHub/gs-gradle/initial" value="PREVIEW" />
@@ -84,8 +128,11 @@
84 128
   <component name="IdeDocumentHistory">
85 129
     <option name="CHANGED_PATHS">
86 130
       <list>
87
-        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
88 131
         <option value="$PROJECT_DIR$/README.md" />
132
+        <option value="$PROJECT_DIR$/arraz/pom.xml" />
133
+        <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
134
+        <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
135
+        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
89 136
       </list>
90 137
     </option>
91 138
   </component>
@@ -102,27 +149,18 @@
102 149
       </MavenImportingSettings>
103 150
     </option>
104 151
   </component>
105
-  <component name="ProjectFrameBounds">
106
-    <option name="x" value="242" />
107
-    <option name="y" value="45" />
108
-    <option name="width" value="1538" />
109
-    <option name="height" value="962" />
152
+  <component name="ProjectFrameBounds" extendedState="6">
153
+    <option name="y" value="23" />
154
+    <option name="width" value="1440" />
155
+    <option name="height" value="807" />
110 156
   </component>
111 157
   <component name="ProjectView">
112
-    <navigator currentView="ProjectPane" proportions="" version="1">
113
-      <flattenPackages />
114
-      <showMembers />
115
-      <showModules />
116
-      <showLibraryContents />
117
-      <hideEmptyPackages />
118
-      <abbreviatePackageNames />
119
-      <autoscrollToSource />
120
-      <autoscrollFromSource />
121
-      <sortByType />
122
-      <manualOrder />
158
+    <navigator proportions="" version="1">
123 159
       <foldersAlwaysOnTop value="true" />
124 160
     </navigator>
125 161
     <panes>
162
+      <pane id="PackagesPane" />
163
+      <pane id="Scope" />
126 164
       <pane id="ProjectPane">
127 165
         <subPane>
128 166
           <expand>
@@ -151,27 +189,42 @@
151 189
             <path>
152 190
               <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
153 191
               <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
192
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
193
+              <item name="src" type="462c0819:PsiDirectoryNode" />
194
+              <item name="main" type="462c0819:PsiDirectoryNode" />
195
+              <item name="java" type="462c0819:PsiDirectoryNode" />
196
+            </path>
197
+            <path>
198
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
199
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
200
+              <item name="arraz" type="462c0819:PsiDirectoryNode" />
201
+              <item name="src" type="462c0819:PsiDirectoryNode" />
202
+              <item name="test" type="462c0819:PsiDirectoryNode" />
203
+            </path>
204
+            <path>
205
+              <item name="ArraysGoneWild" type="b2602c69:ProjectViewProjectNode" />
206
+              <item name="ArraysGoneWild" type="462c0819:PsiDirectoryNode" />
154 207
               <item name="DocumentationOnArrays" type="462c0819:PsiDirectoryNode" />
155 208
             </path>
156 209
           </expand>
157 210
           <select />
158 211
         </subPane>
159 212
       </pane>
160
-      <pane id="Scratches" />
161
-      <pane id="PackagesPane" />
162
-      <pane id="AndroidView" />
163
-      <pane id="Scope" />
164 213
     </panes>
165 214
   </component>
166 215
   <component name="PropertiesComponent">
167
-    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
168
-    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
216
+    <property name="GO_FMT" value="false" />
169 217
     <property name="WebServerToolWindowFactoryState" value="false" />
170 218
     <property name="aspect.path.notification.shown" value="true" />
171
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
172
-    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
219
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544059292553" />
173 220
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
174
-    <property name="GO_FMT" value="false" />
221
+    <property name="jdk.selected.JAVA_MODULE" value="1.8" />
222
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
223
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
224
+    <property name="project.structure.last.edited" value="Modules" />
225
+    <property name="project.structure.proportion" value="0.0" />
226
+    <property name="project.structure.side.proportion" value="0.0" />
227
+    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
175 228
   </component>
176 229
   <component name="RecentsManager">
177 230
     <key name="CreateTestDialog.RecentsKey">
@@ -193,90 +246,98 @@
193 246
       </list>
194 247
     </option>
195 248
   </component>
196
-  <component name="RunManager">
249
+  <component name="RunManager" selected="JUnit.ArrazTest">
197 250
     <configuration default="true" type="Applet" factoryName="Applet">
198
-      <option name="WIDTH" value="400" />
199
-      <option name="HEIGHT" value="300" />
200 251
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
201
-      <module />
252
+      <method v="2">
253
+        <option name="Make" enabled="true" />
254
+      </method>
202 255
     </configuration>
203 256
     <configuration default="true" type="Application" factoryName="Application">
204
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
205
-      <option name="MAIN_CLASS_NAME" />
206
-      <option name="VM_PARAMETERS" />
207
-      <option name="PROGRAM_PARAMETERS" />
208 257
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
209
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
210
-      <option name="ALTERNATIVE_JRE_PATH" />
211
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
212
-      <option name="ENV_VARIABLES" />
213
-      <option name="PASS_PARENT_ENVS" value="true" />
214
-      <module name="" />
215
-      <envs />
258
+      <method v="2">
259
+        <option name="Make" enabled="true" />
260
+      </method>
216 261
     </configuration>
217
-    <configuration default="true" type="JUnit" factoryName="JUnit">
218
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
219
-      <module name="" />
220
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
221
-      <option name="ALTERNATIVE_JRE_PATH" />
222
-      <option name="PACKAGE_NAME" />
223
-      <option name="MAIN_CLASS_NAME" />
224
-      <option name="METHOD_NAME" />
225
-      <option name="TEST_OBJECT" value="class" />
226
-      <option name="VM_PARAMETERS" value="-ea" />
227
-      <option name="PARAMETERS" />
262
+    <configuration name="ArrazTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
263
+      <module name="arraz" />
264
+      <option name="PACKAGE_NAME" value="" />
265
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
228 266
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
229
-      <option name="ENV_VARIABLES" />
230
-      <option name="PASS_PARENT_ENVS" value="true" />
231
-      <option name="TEST_SEARCH_SCOPE">
232
-        <value defaultName="singleModule" />
233
-      </option>
234
-      <envs />
235
-      <patterns />
267
+      <method v="2">
268
+        <option name="Make" enabled="true" />
269
+      </method>
236 270
     </configuration>
237
-    <configuration default="true" type="Remote" factoryName="Remote">
238
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
239
-      <option name="SERVER_MODE" value="false" />
240
-      <option name="SHMEM_ADDRESS" value="javadebug" />
241
-      <option name="HOST" value="localhost" />
242
-      <option name="PORT" value="5005" />
271
+    <configuration name="ArrazTest.testOddEvens1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
272
+      <module name="arraz" />
273
+      <option name="PACKAGE_NAME" value="" />
274
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
275
+      <option name="METHOD_NAME" value="testOddEvens1" />
276
+      <option name="TEST_OBJECT" value="method" />
277
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
278
+      <method v="2">
279
+        <option name="Make" enabled="true" />
280
+      </method>
281
+    </configuration>
282
+    <configuration name="ArrazTest.testOddEvens2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
283
+      <module name="arraz" />
284
+      <option name="PACKAGE_NAME" value="" />
285
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
286
+      <option name="METHOD_NAME" value="testOddEvens2" />
287
+      <option name="TEST_OBJECT" value="method" />
288
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
289
+      <method v="2">
290
+        <option name="Make" enabled="true" />
291
+      </method>
292
+    </configuration>
293
+    <configuration name="ArrazTest.testReverseArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
294
+      <module name="arraz" />
295
+      <option name="PACKAGE_NAME" value="" />
296
+      <option name="MAIN_CLASS_NAME" value="ArrazTest" />
297
+      <option name="METHOD_NAME" value="testReverseArray1" />
298
+      <option name="TEST_OBJECT" value="method" />
299
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
300
+      <method v="2">
301
+        <option name="Make" enabled="true" />
302
+      </method>
303
+    </configuration>
304
+    <configuration default="true" type="JUnit" factoryName="JUnit">
305
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
306
+      <method v="2">
307
+        <option name="Make" enabled="true" />
308
+      </method>
243 309
     </configuration>
244 310
     <configuration default="true" type="TestNG" factoryName="TestNG">
245
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
246
-      <module name="" />
247
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
248
-      <option name="ALTERNATIVE_JRE_PATH" />
249
-      <option name="SUITE_NAME" />
250
-      <option name="PACKAGE_NAME" />
251
-      <option name="MAIN_CLASS_NAME" />
252
-      <option name="METHOD_NAME" />
253
-      <option name="GROUP_NAME" />
254
-      <option name="TEST_OBJECT" value="CLASS" />
255
-      <option name="VM_PARAMETERS" value="-ea" />
256
-      <option name="PARAMETERS" />
257 311
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
258
-      <option name="OUTPUT_DIRECTORY" />
259
-      <option name="ANNOTATION_TYPE" />
260
-      <option name="ENV_VARIABLES" />
261
-      <option name="PASS_PARENT_ENVS" value="true" />
262
-      <option name="TEST_SEARCH_SCOPE">
263
-        <value defaultName="singleModule" />
264
-      </option>
265
-      <option name="USE_DEFAULT_REPORTERS" value="false" />
266
-      <option name="PROPERTIES_FILE" />
267
-      <envs />
268 312
       <properties />
269 313
       <listeners />
314
+      <method v="2">
315
+        <option name="Make" enabled="true" />
316
+      </method>
270 317
     </configuration>
271 318
     <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
272 319
       <module name="" />
273 320
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
274 321
       <option name="PROGRAM_PARAMETERS" />
275 322
       <predefined_log_file id="idea.log" enabled="true" />
323
+      <method v="2">
324
+        <option name="Make" enabled="true" />
325
+      </method>
276 326
     </configuration>
277
-  </component>
278
-  <component name="ShelveChangesManager" show_recycled="false">
279
-    <option name="remove_strategy" value="false" />
327
+    <list>
328
+      <item itemvalue="JUnit.ArrazTest" />
329
+      <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
330
+      <item itemvalue="JUnit.ArrazTest.testOddEvens1" />
331
+      <item itemvalue="JUnit.ArrazTest.testOddEvens2" />
332
+    </list>
333
+    <recent_temporary>
334
+      <list>
335
+        <item itemvalue="JUnit.ArrazTest" />
336
+        <item itemvalue="JUnit.ArrazTest.testOddEvens2" />
337
+        <item itemvalue="JUnit.ArrazTest.testOddEvens1" />
338
+        <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
339
+      </list>
340
+    </recent_temporary>
280 341
   </component>
281 342
   <component name="SvnConfiguration">
282 343
     <configuration />
@@ -291,6 +352,7 @@
291 352
       <workItem from="1543955862749" duration="2347000" />
292 353
       <workItem from="1543958998826" duration="113000" />
293 354
       <workItem from="1544020724645" duration="762000" />
355
+      <workItem from="1544046933389" duration="7694000" />
294 356
     </task>
295 357
     <task id="LOCAL-00001" summary="readme and docs">
296 358
       <created>1544021313039</created>
@@ -302,39 +364,73 @@
302 364
     <option name="localTasksCounter" value="2" />
303 365
     <servers />
304 366
   </component>
367
+  <component name="TestHistory">
368
+    <history-entry file="ArrazTest - 2018.12.05 at 19h 33m 31s.xml">
369
+      <configuration name="ArrazTest" configurationId="JUnit" />
370
+    </history-entry>
371
+    <history-entry file="ArrazTest - 2018.12.05 at 19h 48m 37s.xml">
372
+      <configuration name="ArrazTest" configurationId="JUnit" />
373
+    </history-entry>
374
+    <history-entry file="ArrazTest_testReverseArray1 - 2018.12.05 at 19h 49m 22s.xml">
375
+      <configuration name="ArrazTest.testReverseArray1" configurationId="JUnit" />
376
+    </history-entry>
377
+    <history-entry file="ArrazTest_testReverseArray1 - 2018.12.05 at 19h 49m 37s.xml">
378
+      <configuration name="ArrazTest.testReverseArray1" configurationId="JUnit" />
379
+    </history-entry>
380
+    <history-entry file="ArrazTest_testReverseArray1 - 2018.12.05 at 19h 51m 09s.xml">
381
+      <configuration name="ArrazTest.testReverseArray1" configurationId="JUnit" />
382
+    </history-entry>
383
+    <history-entry file="ArrazTest - 2018.12.05 at 20h 13m 00s.xml">
384
+      <configuration name="ArrazTest" configurationId="JUnit" />
385
+    </history-entry>
386
+    <history-entry file="ArrazTest_testOddEvens1 - 2018.12.05 at 20h 13m 40s.xml">
387
+      <configuration name="ArrazTest.testOddEvens1" configurationId="JUnit" />
388
+    </history-entry>
389
+    <history-entry file="ArrazTest_testOddEvens2 - 2018.12.05 at 20h 14m 01s.xml">
390
+      <configuration name="ArrazTest.testOddEvens2" configurationId="JUnit" />
391
+    </history-entry>
392
+    <history-entry file="ArrazTest - 2018.12.05 at 20h 14m 10s.xml">
393
+      <configuration name="ArrazTest" configurationId="JUnit" />
394
+    </history-entry>
395
+    <history-entry file="ArrazTest - 2018.12.05 at 20h 14m 26s.xml">
396
+      <configuration name="ArrazTest" configurationId="JUnit" />
397
+    </history-entry>
398
+  </component>
305 399
   <component name="TimeTrackingManager">
306
-    <option name="totallyTimeSpent" value="3222000" />
400
+    <option name="totallyTimeSpent" value="10916000" />
307 401
   </component>
308 402
   <component name="ToolWindowManager">
309
-    <frame x="242" y="45" width="1538" height="962" extended-state="0" />
403
+    <frame x="0" y="23" width="1440" height="807" extended-state="6" />
310 404
     <editor active="true" />
311 405
     <layout>
312
-      <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" />
313
-      <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" />
314
-      <window_info id="Palette&#9;" 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" />
315
-      <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="2" side_tool="false" content_ui="tabs" />
316
-      <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" />
317
-      <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.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
318
-      <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.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
319
-      <window_info id="Run" 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="2" side_tool="false" content_ui="tabs" />
320
-      <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" />
321
-      <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" />
322
-      <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" />
323
-      <window_info id="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" />
324
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.2577389" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
325
-      <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" />
326
-      <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" />
327
-      <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" />
328
-      <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" />
329
-      <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="3" side_tool="false" content_ui="tabs" />
330
-      <window_info id="Debug" 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="3" side_tool="false" content_ui="tabs" />
331
-      <window_info id="Favorites" 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="true" content_ui="tabs" />
332
-      <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" />
333
-      <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" />
334
-      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
335
-      <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" />
336
-      <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" />
337
-      <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" />
406
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
407
+      <window_info id="Structure" order="1" weight="0.25" />
408
+      <window_info id="Image Layers" order="2" />
409
+      <window_info id="Designer" order="3" />
410
+      <window_info id="UI Designer" order="4" />
411
+      <window_info id="Capture Tool" order="5" />
412
+      <window_info id="Favorites" order="6" side_tool="true" />
413
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
414
+      <window_info anchor="bottom" id="Messages" weight="0.32867134" />
415
+      <window_info anchor="bottom" id="Message" order="0" />
416
+      <window_info anchor="bottom" id="Find" order="1" />
417
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32867134" />
418
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
419
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
420
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
421
+      <window_info anchor="bottom" id="TODO" order="6" />
422
+      <window_info anchor="bottom" id="Terminal" order="7" />
423
+      <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
424
+      <window_info anchor="bottom" id="Version Control" order="9" />
425
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
426
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
427
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
428
+      <window_info anchor="right" id="Palette" order="3" />
429
+      <window_info anchor="right" id="Capture Analysis" order="4" />
430
+      <window_info anchor="right" id="Theme Preview" order="5" />
431
+      <window_info anchor="right" id="Database" order="6" />
432
+      <window_info anchor="right" id="Palette&#9;" order="7" />
433
+      <window_info anchor="right" id="Maven Projects" order="8" />
338 434
     </layout>
339 435
   </component>
340 436
   <component name="TypeScriptGeneratedFilesManager">
@@ -347,119 +443,126 @@
347 443
     <MESSAGE value="readme and docs" />
348 444
     <option name="LAST_COMMIT_MESSAGE" value="readme and docs" />
349 445
   </component>
350
-  <component name="XDebuggerManager">
351
-    <breakpoint-manager />
352
-    <watches-manager />
353
-  </component>
354 446
   <component name="editorHistoryManager">
355 447
     <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
356 448
       <provider selected="true" editor-type-id="text-editor">
357
-        <state relative-caret-position="0">
358
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
359
-          <folding />
360
-        </state>
361
-      </provider>
362
-    </entry>
363
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
364
-      <provider selected="true" editor-type-id="text-editor">
365
-        <state relative-caret-position="0">
366
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
367
-          <folding />
368
-        </state>
369
-      </provider>
370
-    </entry>
371
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
372
-      <provider selected="true" editor-type-id="text-editor">
373
-        <state relative-caret-position="34">
374
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
375
-          <folding />
376
-        </state>
377
-      </provider>
378
-    </entry>
379
-    <entry file="file://$PROJECT_DIR$/README.md">
380
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
381
-        <state split_layout="SPLIT">
382
-          <first_editor relative-caret-position="1241">
383
-            <caret line="73" column="0" lean-forward="true" selection-start-line="73" selection-start-column="0" selection-end-line="73" selection-end-column="0" />
384
-            <folding />
385
-          </first_editor>
386
-          <second_editor />
387
-        </state>
388
-      </provider>
389
-    </entry>
390
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
391
-      <provider selected="true" editor-type-id="text-editor">
392
-        <state relative-caret-position="0">
393
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
394
-          <folding />
449
+        <state relative-caret-position="240">
450
+          <caret line="16" selection-start-line="16" selection-end-line="16" />
395 451
         </state>
396 452
       </provider>
397 453
     </entry>
398
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
454
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
399 455
       <provider selected="true" editor-type-id="text-editor">
400
-        <state relative-caret-position="0">
401
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
402
-          <folding />
403
-        </state>
404
-      </provider>
405
-    </entry>
406
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
407
-      <provider selected="true" editor-type-id="text-editor">
408
-        <state relative-caret-position="34">
409
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
410
-          <folding />
456
+        <state relative-caret-position="150">
457
+          <caret line="10" column="25" selection-start-line="10" selection-start-column="25" selection-end-line="10" selection-end-column="25" />
458
+          <folding>
459
+            <element signature="e#215#216#0" expanded="true" />
460
+            <element signature="e#250#251#0" expanded="true" />
461
+            <element signature="e#280#281#0" expanded="true" />
462
+            <element signature="e#308#309#0" expanded="true" />
463
+            <element signature="e#335#336#0" expanded="true" />
464
+            <element signature="e#372#373#0" expanded="true" />
465
+            <element signature="e#404#405#0" expanded="true" />
466
+          </folding>
411 467
         </state>
412 468
       </provider>
413 469
     </entry>
414 470
     <entry file="file://$PROJECT_DIR$/README.md">
415 471
       <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
416 472
         <state split_layout="SPLIT">
417
-          <first_editor relative-caret-position="1241">
418
-            <caret line="73" column="0" lean-forward="true" selection-start-line="73" selection-start-column="0" selection-end-line="73" selection-end-column="0" />
419
-            <folding />
473
+          <first_editor relative-caret-position="381">
474
+            <caret line="74" column="117" selection-start-line="74" selection-start-column="113" selection-end-line="74" selection-end-column="117" />
420 475
           </first_editor>
421 476
           <second_editor />
422 477
         </state>
423 478
       </provider>
424 479
     </entry>
425
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
426
-      <provider selected="true" editor-type-id="text-editor">
427
-        <state relative-caret-position="0">
428
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
429
-          <folding />
430
-        </state>
431
-      </provider>
432
-    </entry>
433 480
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
434 481
       <provider selected="true" editor-type-id="text-editor">
435
-        <state relative-caret-position="0">
436
-          <caret line="0" column="15" lean-forward="false" selection-start-line="0" selection-start-column="15" selection-end-line="0" selection-end-column="15" />
437
-          <folding />
482
+        <state relative-caret-position="368">
483
+          <caret line="65" column="18" selection-start-line="65" selection-start-column="18" selection-end-line="65" selection-end-column="18" />
484
+          <folding>
485
+            <element signature="e#399#400#0" expanded="true" />
486
+            <element signature="e#451#452#0" expanded="true" />
487
+            <element signature="e#515#516#0" expanded="true" />
488
+            <element signature="e#556#557#0" expanded="true" />
489
+          </folding>
438 490
         </state>
439 491
       </provider>
440 492
     </entry>
441 493
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
442 494
       <provider selected="true" editor-type-id="text-editor">
443
-        <state relative-caret-position="34">
444
-          <caret line="2" column="23" lean-forward="false" selection-start-line="2" selection-start-column="23" selection-end-line="2" selection-end-column="23" />
445
-          <folding />
446
-        </state>
447
-      </provider>
448
-    </entry>
449
-    <entry file="file://$PROJECT_DIR$/README.md">
450
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
451
-        <state split_layout="SPLIT">
452
-          <first_editor relative-caret-position="306">
453
-            <caret line="18" column="0" lean-forward="true" selection-start-line="18" selection-start-column="0" selection-end-line="18" selection-end-column="0" />
454
-            <folding />
455
-          </first_editor>
456
-          <second_editor />
495
+        <state relative-caret-position="2190">
496
+          <caret line="146" column="5" lean-forward="true" selection-start-line="146" selection-start-column="5" selection-end-line="146" selection-end-column="5" />
497
+          <folding>
498
+            <element signature="imports" expanded="true" />
499
+          </folding>
457 500
         </state>
458 501
       </provider>
459 502
     </entry>
460 503
   </component>
461 504
   <component name="masterDetails">
462 505
     <states>
506
+      <state key="ArtifactsStructureConfigurable.UI">
507
+        <settings>
508
+          <artifact-editor />
509
+          <splitter-proportions>
510
+            <option name="proportions">
511
+              <list>
512
+                <option value="0.2" />
513
+              </list>
514
+            </option>
515
+          </splitter-proportions>
516
+        </settings>
517
+      </state>
518
+      <state key="FacetStructureConfigurable.UI">
519
+        <settings>
520
+          <last-edited>No facets are configured</last-edited>
521
+          <splitter-proportions>
522
+            <option name="proportions">
523
+              <list>
524
+                <option value="0.2" />
525
+              </list>
526
+            </option>
527
+          </splitter-proportions>
528
+        </settings>
529
+      </state>
530
+      <state key="GlobalLibrariesConfigurable.UI">
531
+        <settings>
532
+          <splitter-proportions>
533
+            <option name="proportions">
534
+              <list>
535
+                <option value="0.2" />
536
+              </list>
537
+            </option>
538
+          </splitter-proportions>
539
+        </settings>
540
+      </state>
541
+      <state key="JdkListConfigurable.UI">
542
+        <settings>
543
+          <last-edited>1.8</last-edited>
544
+          <splitter-proportions>
545
+            <option name="proportions">
546
+              <list>
547
+                <option value="0.2" />
548
+              </list>
549
+            </option>
550
+          </splitter-proportions>
551
+        </settings>
552
+      </state>
553
+      <state key="ModuleStructureConfigurable.UI">
554
+        <settings>
555
+          <last-edited>ArraysGoneWild</last-edited>
556
+          <splitter-proportions>
557
+            <option name="proportions">
558
+              <list>
559
+                <option value="0.2" />
560
+                <option value="0.6" />
561
+              </list>
562
+            </option>
563
+          </splitter-proportions>
564
+        </settings>
565
+      </state>
463 566
       <state key="ProjectJDKs.UI">
464 567
         <settings>
465 568
           <last-edited>1.8</last-edited>
@@ -472,6 +575,18 @@
472 575
           </splitter-proportions>
473 576
         </settings>
474 577
       </state>
578
+      <state key="ProjectLibrariesConfigurable.UI">
579
+        <settings>
580
+          <last-edited>Maven: junit:junit:4.12</last-edited>
581
+          <splitter-proportions>
582
+            <option name="proportions">
583
+              <list>
584
+                <option value="0.2" />
585
+              </list>
586
+            </option>
587
+          </splitter-proportions>
588
+        </settings>
589
+      </state>
475 590
     </states>
476 591
   </component>
477 592
 </project>

+ 2
- 1
arraz/arraz.iml Ver fichero

@@ -11,6 +11,7 @@
11 11
     </content>
12 12
     <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
13 13
     <orderEntry type="sourceFolder" forTests="false" />
14
-    <orderEntry type="library" name="Maven: junit:junit:4.0" level="project" />
14
+    <orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
15
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
15 16
   </component>
16 17
 </module>

+ 1
- 1
arraz/pom.xml Ver fichero

@@ -11,7 +11,7 @@
11 11
         <dependency>
12 12
             <groupId>junit</groupId>
13 13
             <artifactId>junit</artifactId>
14
-            <version>4.0</version>
14
+            <version>4.12</version>
15 15
         </dependency>
16 16
     </dependencies>
17 17
 

+ 68
- 0
arraz/src/main/java/Arraz.java Ver fichero

@@ -1,2 +1,70 @@
1 1
 public class Arraz {
2
+
3
+
4
+    public int sumValuesOfArray(int[] array){
5
+        int sum = 0;
6
+        for (int each:array) {
7
+            sum += each;
8
+        }
9
+        return sum;
10
+    }
11
+
12
+    public double sumDoublesOfArray(double[] array){
13
+        double sum = 0;
14
+        for (double each:array) {
15
+            sum += each;
16
+        }
17
+        return sum;
18
+    }
19
+
20
+    public int averageOfArray(int[] array) {
21
+        return sumValuesOfArray(array)/array.length;
22
+    }
23
+
24
+    public double doubleAverageOfArray(double[] array){
25
+        return sumDoublesOfArray(array)/array.length;
26
+    }
27
+
28
+    public boolean containsValue(int[] array, int value){
29
+        for(int each: array){
30
+            if (each == value){
31
+                return true;
32
+            }
33
+        }
34
+        return false;
35
+    }
36
+
37
+    public int[] reverseArray(int[] array){
38
+        int[] newArray = new int[array.length];
39
+        int index = 0;
40
+        for (int i = array.length - 1; i >= 0; i--){
41
+            newArray[index] = array[i];
42
+            index++;
43
+        }
44
+        return newArray;
45
+    }
46
+
47
+    public OddEven oddEvens(int[] array){
48
+        int evens = 0;
49
+        int odds = 0;
50
+        for(int each: array){
51
+            if(each % 2 ==0){
52
+                evens++;
53
+            } else {
54
+                odds++;
55
+            }
56
+        }
57
+        return new OddEven(odds, evens);
58
+    }
59
+
60
+    public int getIndexOf(int[] array, int value){
61
+        for (int i = 0; i < array.length -1; i++){
62
+            if (array[i] == value){
63
+                return i;
64
+            }
65
+        }
66
+        return -1;
67
+    }
68
+
69
+
2 70
 }

+ 20
- 0
arraz/src/main/java/OddEven.java Ver fichero

@@ -0,0 +1,20 @@
1
+public class OddEven {
2
+    private int odd;
3
+    private int even;
4
+
5
+
6
+    public OddEven(int odd, int even) {
7
+        this.odd = odd;
8
+        this.even = even;
9
+    }
10
+
11
+    public int getOdd() {
12
+        return odd;
13
+    }
14
+
15
+
16
+    public int getEven() {
17
+        return even;
18
+    }
19
+
20
+}

+ 145
- 1
arraz/src/test/java/ArrazTest.java Ver fichero

@@ -1,5 +1,149 @@
1
-import static org.junit.Assert.*;
1
+
2
+
3
+import org.junit.Assert;
4
+import org.junit.Before;
5
+import org.junit.Test;
6
+
7
+import java.util.Arrays;
8
+
2 9
 
3 10
 public class ArrazTest {
4 11
 
12
+    private Arraz testArraz;
13
+    private OddEven oddEven1;
14
+    private OddEven oddEven2;
15
+    private int[] arr1;
16
+    private int[] arr2;
17
+    private double[] double1;
18
+
19
+    @Before
20
+    public void before() {
21
+        arr1 = new int[]{5, 10, 3, 29, 100};
22
+        arr2 = new int[]{2, 7, 432, 89};
23
+        double1 = new double[] {1.0, 0.5, 3.6, 38.4, 17.3, 62.0, 9.0, 3.375, 0, 3.14159};
24
+        testArraz = new Arraz();
25
+        oddEven1 = new OddEven(3, 2);
26
+        oddEven2 = new OddEven(2,2);
27
+    }
28
+
29
+    @Test
30
+    public void test1SumValuesOfArray1() {
31
+        int expected = 147;
32
+        int actual = testArraz.sumValuesOfArray(arr1);
33
+
34
+         Assert.assertEquals(expected, actual);
35
+    }
36
+
37
+    @Test
38
+    public void test2SumValuesOfArray2(){
39
+        int expected = 530;
40
+        int actual = testArraz.sumValuesOfArray(arr2);
41
+
42
+        Assert.assertEquals(expected, actual);
43
+    }
44
+
45
+    @Test
46
+    public void testSumDoublesOfArray1(){
47
+        double expected =138.31659;
48
+        double actual = testArraz.sumDoublesOfArray(double1);
49
+
50
+        Assert.assertEquals(expected, actual, .01);
51
+    }
52
+
53
+    @Test
54
+    public void testSumDoublesOfArray2(){
55
+        double expected = 0;
56
+        double actual = testArraz.sumDoublesOfArray(new double[]{0.0,0.0});
57
+
58
+        Assert.assertEquals(expected, actual, .01);
59
+    }
60
+
61
+    @Test
62
+    public void testAverageOfArray1(){
63
+        int expected = 29;
64
+        int actual = testArraz.averageOfArray(arr1);
65
+
66
+        Assert.assertEquals(expected, actual);
67
+    }
68
+
69
+    @Test
70
+    public void testAverageOfArray2(){
71
+        int expected = 132;
72
+        int actual = testArraz.averageOfArray(arr2);
73
+
74
+        Assert.assertEquals(expected, actual);
75
+    }
76
+
77
+    @Test
78
+    public void testDoubleAverageOfArray1(){
79
+        double expected = 13.831659;
80
+        double actual = testArraz.doubleAverageOfArray(double1);
81
+
82
+        Assert.assertEquals(expected, actual, .01);
83
+    }
84
+
85
+    @Test
86
+    public void testDoubleAverageOfArray2(){
87
+        double expected = 0;
88
+        double actual = testArraz.doubleAverageOfArray(new double[]{0.0, 0.0});
89
+
90
+        Assert.assertEquals(expected, actual, 01);
91
+    }
92
+
93
+    @Test
94
+    public void testContainsValue1(){
95
+        boolean actual = testArraz.containsValue(arr1, 29);
96
+        Assert.assertTrue(actual);
97
+    }
98
+
99
+    @Test
100
+    public void testContainsValue2(){
101
+        boolean actual = testArraz.containsValue(arr1, 50000);
102
+        Assert.assertFalse(actual);
103
+    }
104
+
105
+    @Test
106
+    public void testReverseArray1(){
107
+        int[] expected =new int[]{100, 29, 3, 10, 5};
108
+        int[] actual = testArraz.reverseArray(arr1);
109
+
110
+        Assert.assertTrue(Arrays.equals(expected, actual));
111
+    }
112
+
113
+    @Test
114
+    public void testReverseArray2(){
115
+        int[] expected = arr1;
116
+        int[] actual = testArraz.reverseArray(arr1);
117
+
118
+        Assert.assertFalse(Arrays.equals(expected, actual));
119
+    }
120
+
121
+    @Test
122
+    public void testOddEvens1(){
123
+        OddEven actual = testArraz.oddEvens(arr1);
124
+        Assert.assertEquals(oddEven1.getOdd(), actual.getOdd());
125
+    }
126
+
127
+    @Test
128
+    public void testOddEvens2(){
129
+        OddEven actual = testArraz.oddEvens(arr1);
130
+        Assert.assertEquals(oddEven1.getEven(), actual.getEven());
131
+    }
132
+
133
+    @Test
134
+    public void testFindIndexOf1(){
135
+        int expected = 3;
136
+        int actual = testArraz.getIndexOf(arr1, 29);
137
+
138
+        Assert.assertEquals(expected, actual);
139
+    }
140
+
141
+    @Test
142
+    public void testFindIndexOf2(){
143
+        int expected = -1;
144
+        int actual = testArraz.getIndexOf(arr1, 500);
145
+
146
+        Assert.assertEquals(expected,actual);
147
+    }
148
+
5 149
 }