Seth vor 6 Jahren
Ursprung
Commit
37ebc6b353
3 geänderte Dateien mit 105 neuen und 118 gelöschten Zeilen
  1. 64
    106
      .idea/workspace.xml
  2. 14
    3
      arraz/src/main/java/Arraz.java
  3. 27
    9
      arraz/src/test/java/ArrazTest.java

+ 64
- 106
.idea/workspace.xml Datei anzeigen

@@ -2,9 +2,6 @@
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 afterPath="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" afterDir="false" />
6
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
7
-      <change beforePath="$PROJECT_DIR$/arraz/arraz.iml" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/arraz.iml" afterDir="false" />
8 5
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
9 6
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
10 7
     </list>
@@ -25,7 +22,7 @@
25 22
       </usages-collector>
26 23
       <usages-collector id="statistics.file.types.edit">
27 24
         <counts>
28
-          <entry key="JAVA" value="6414" />
25
+          <entry key="JAVA" value="7260" />
29 26
           <entry key="XML" value="3" />
30 27
         </counts>
31 28
       </usages-collector>
@@ -39,20 +36,11 @@
39 36
   </component>
40 37
   <component name="FileEditorManager">
41 38
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
42
-      <file pinned="false" current-in-tab="true">
43
-        <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
44
-          <provider selected="true" editor-type-id="text-editor">
45
-            <state relative-caret-position="240">
46
-              <caret line="16" selection-start-line="16" selection-end-line="16" />
47
-            </state>
48
-          </provider>
49
-        </entry>
50
-      </file>
51 39
       <file pinned="false" current-in-tab="false">
52 40
         <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
53 41
           <provider selected="true" editor-type-id="text-editor">
54
-            <state relative-caret-position="1071">
55
-              <caret line="209" selection-start-line="209" selection-start-column="2" selection-end-line="217" selection-end-column="7" />
42
+            <state relative-caret-position="334">
43
+              <caret line="231" column="49" lean-forward="true" selection-start-line="231" selection-start-column="49" selection-end-line="231" selection-end-column="49" />
56 44
               <folding>
57 45
                 <element signature="imports" expanded="true" />
58 46
                 <element signature="e#4388#4389#0" expanded="true" />
@@ -62,29 +50,11 @@
62 50
           </provider>
63 51
         </entry>
64 52
       </file>
65
-      <file pinned="false" current-in-tab="false">
66
-        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
67
-          <provider selected="true" editor-type-id="text-editor">
68
-            <state relative-caret-position="135">
69
-              <caret line="9" column="25" selection-start-line="9" selection-start-column="25" selection-end-line="9" selection-end-column="25" />
70
-              <folding>
71
-                <element signature="e#208#209#0" expanded="true" />
72
-                <element signature="e#243#244#0" expanded="true" />
73
-                <element signature="e#273#274#0" expanded="true" />
74
-                <element signature="e#300#301#0" expanded="true" />
75
-                <element signature="e#326#327#0" expanded="true" />
76
-                <element signature="e#361#362#0" expanded="true" />
77
-                <element signature="e#391#392#0" expanded="true" />
78
-              </folding>
79
-            </state>
80
-          </provider>
81
-        </entry>
82
-      </file>
83
-      <file pinned="false" current-in-tab="false">
53
+      <file pinned="false" current-in-tab="true">
84 54
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
85 55
           <provider selected="true" editor-type-id="text-editor">
86
-            <state relative-caret-position="790">
87
-              <caret line="119" column="10" selection-start-line="119" selection-start-column="10" selection-end-line="121" selection-end-column="11" />
56
+            <state relative-caret-position="359">
57
+              <caret line="130" column="26" selection-start-line="130" selection-start-column="26" selection-end-line="130" selection-end-column="26" />
88 58
               <folding>
89 59
                 <element signature="imports" expanded="true" />
90 60
               </folding>
@@ -151,8 +121,8 @@
151 121
         <option value="$PROJECT_DIR$/arraz/pom.xml" />
152 122
         <option value="$PROJECT_DIR$/arraz/src/main/java/OddEven.java" />
153 123
         <option value="$PROJECT_DIR$/arraz/src/main/java/MaxMin.java" />
154
-        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
155 124
         <option value="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" />
125
+        <option value="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" />
156 126
       </list>
157 127
     </option>
158 128
   </component>
@@ -169,7 +139,8 @@
169 139
       </MavenImportingSettings>
170 140
     </option>
171 141
   </component>
172
-  <component name="ProjectFrameBounds" extendedState="6">
142
+  <component name="ProjectFrameBounds">
143
+    <option name="x" value="1" />
173 144
     <option name="y" value="23" />
174 145
     <option name="width" value="1440" />
175 146
     <option name="height" value="807" />
@@ -236,7 +207,7 @@
236 207
     <property name="GO_FMT" value="false" />
237 208
     <property name="WebServerToolWindowFactoryState" value="false" />
238 209
     <property name="aspect.path.notification.shown" value="true" />
239
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544133596301" />
210
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544139093969" />
240 211
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
241 212
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
242 213
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
@@ -266,7 +237,7 @@
266 237
       </list>
267 238
     </option>
268 239
   </component>
269
-  <component name="RunManager" selected="JUnit.ArrazTest.testCopyArrayByIterator2">
240
+  <component name="RunManager" selected="JUnit.ArrazTest.testRemoveDupesFromArray2">
270 241
     <configuration default="true" type="Applet" factoryName="Applet">
271 242
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
272 243
       <method v="2">
@@ -279,55 +250,55 @@
279 250
         <option name="Make" enabled="true" />
280 251
       </method>
281 252
     </configuration>
282
-    <configuration name="ArrazTest.testCopyArrayByIterator1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
253
+    <configuration name="ArrazTest.testCopyArrayByIterator2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
283 254
       <module name="arraz" />
284 255
       <option name="PACKAGE_NAME" value="" />
285 256
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
286
-      <option name="METHOD_NAME" value="testCopyArrayByIterator1" />
257
+      <option name="METHOD_NAME" value="testCopyArrayByIterator2" />
287 258
       <option name="TEST_OBJECT" value="method" />
288 259
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
289 260
       <method v="2">
290 261
         <option name="Make" enabled="true" />
291 262
       </method>
292 263
     </configuration>
293
-    <configuration name="ArrazTest.testCopyArrayByIterator2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
264
+    <configuration name="ArrazTest.testFindMaxMinOfArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
294 265
       <module name="arraz" />
295 266
       <option name="PACKAGE_NAME" value="" />
296 267
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
297
-      <option name="METHOD_NAME" value="testCopyArrayByIterator2" />
268
+      <option name="METHOD_NAME" value="testFindMaxMinOfArray1" />
298 269
       <option name="TEST_OBJECT" value="method" />
299 270
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
300 271
       <method v="2">
301 272
         <option name="Make" enabled="true" />
302 273
       </method>
303 274
     </configuration>
304
-    <configuration name="ArrazTest.testInsertArrayAt1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
275
+    <configuration name="ArrazTest.testFindMaxMinOfArray2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
305 276
       <module name="arraz" />
306 277
       <option name="PACKAGE_NAME" value="" />
307 278
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
308
-      <option name="METHOD_NAME" value="testInsertArrayAt1" />
279
+      <option name="METHOD_NAME" value="testFindMaxMinOfArray2" />
309 280
       <option name="TEST_OBJECT" value="method" />
310 281
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
311 282
       <method v="2">
312 283
         <option name="Make" enabled="true" />
313 284
       </method>
314 285
     </configuration>
315
-    <configuration name="ArrazTest.testInsertArrayAt2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
286
+    <configuration name="ArrazTest.testRemoveDupesFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
316 287
       <module name="arraz" />
317 288
       <option name="PACKAGE_NAME" value="" />
318 289
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
319
-      <option name="METHOD_NAME" value="testInsertArrayAt2" />
290
+      <option name="METHOD_NAME" value="testRemoveDupesFromArray1" />
320 291
       <option name="TEST_OBJECT" value="method" />
321 292
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
322 293
       <method v="2">
323 294
         <option name="Make" enabled="true" />
324 295
       </method>
325 296
     </configuration>
326
-    <configuration name="ArrazTest.testRemoveElementFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
297
+    <configuration name="ArrazTest.testRemoveDupesFromArray2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
327 298
       <module name="arraz" />
328 299
       <option name="PACKAGE_NAME" value="" />
329 300
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
330
-      <option name="METHOD_NAME" value="testRemoveElementFromArray1" />
301
+      <option name="METHOD_NAME" value="testRemoveDupesFromArray2" />
331 302
       <option name="TEST_OBJECT" value="method" />
332 303
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
333 304
       <method v="2">
@@ -358,19 +329,19 @@
358 329
       </method>
359 330
     </configuration>
360 331
     <list>
361
-      <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray1" />
362
-      <item itemvalue="JUnit.ArrazTest.testInsertArrayAt1" />
363
-      <item itemvalue="JUnit.ArrazTest.testInsertArrayAt2" />
364
-      <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
365 332
       <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
333
+      <item itemvalue="JUnit.ArrazTest.testFindMaxMinOfArray1" />
334
+      <item itemvalue="JUnit.ArrazTest.testFindMaxMinOfArray2" />
335
+      <item itemvalue="JUnit.ArrazTest.testRemoveDupesFromArray2" />
336
+      <item itemvalue="JUnit.ArrazTest.testRemoveDupesFromArray1" />
366 337
     </list>
367 338
     <recent_temporary>
368 339
       <list>
340
+        <item itemvalue="JUnit.ArrazTest.testRemoveDupesFromArray2" />
341
+        <item itemvalue="JUnit.ArrazTest.testRemoveDupesFromArray1" />
342
+        <item itemvalue="JUnit.ArrazTest.testFindMaxMinOfArray2" />
343
+        <item itemvalue="JUnit.ArrazTest.testFindMaxMinOfArray1" />
369 344
         <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
370
-        <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
371
-        <item itemvalue="JUnit.ArrazTest.testInsertArrayAt2" />
372
-        <item itemvalue="JUnit.ArrazTest.testInsertArrayAt1" />
373
-        <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray1" />
374 345
       </list>
375 346
     </recent_temporary>
376 347
   </component>
@@ -387,7 +358,7 @@
387 358
       <workItem from="1543955862749" duration="2347000" />
388 359
       <workItem from="1543958998826" duration="113000" />
389 360
       <workItem from="1544020724645" duration="762000" />
390
-      <workItem from="1544046933389" duration="17070000" />
361
+      <workItem from="1544046933389" duration="20210000" />
391 362
     </task>
392 363
     <task id="LOCAL-00001" summary="readme and docs">
393 364
       <created>1544021313039</created>
@@ -400,12 +371,6 @@
400 371
     <servers />
401 372
   </component>
402 373
   <component name="TestHistory">
403
-    <history-entry file="ArrazTest_testInsertArrayAt2 - 2018.12.06 at 16h 03m 55s.xml">
404
-      <configuration name="ArrazTest.testInsertArrayAt2" configurationId="JUnit" />
405
-    </history-entry>
406
-    <history-entry file="ArrazTest_testInsertArrayAt1 - 2018.12.06 at 16h 08m 09s.xml">
407
-      <configuration name="ArrazTest.testInsertArrayAt1" configurationId="JUnit" />
408
-    </history-entry>
409 374
     <history-entry file="ArrazTest_testInsertArrayAt2 - 2018.12.06 at 16h 08m 11s.xml">
410 375
       <configuration name="ArrazTest.testInsertArrayAt2" configurationId="JUnit" />
411 376
     </history-entry>
@@ -430,15 +395,21 @@
430 395
     <history-entry file="ArrazTest_testCopyArrayByIterator2 - 2018.12.06 at 16h 59m 57s.xml">
431 396
       <configuration name="ArrazTest.testCopyArrayByIterator2" configurationId="JUnit" />
432 397
     </history-entry>
398
+    <history-entry file="ArrazTest_testFindMaxMinOfArray1 - 2018.12.06 at 18h 11m 28s.xml">
399
+      <configuration name="ArrazTest.testFindMaxMinOfArray1" configurationId="JUnit" />
400
+    </history-entry>
401
+    <history-entry file="ArrazTest_testFindMaxMinOfArray2 - 2018.12.06 at 18h 11m 30s.xml">
402
+      <configuration name="ArrazTest.testFindMaxMinOfArray2" configurationId="JUnit" />
403
+    </history-entry>
433 404
   </component>
434 405
   <component name="TimeTrackingManager">
435
-    <option name="totallyTimeSpent" value="20292000" />
406
+    <option name="totallyTimeSpent" value="23432000" />
436 407
   </component>
437 408
   <component name="ToolWindowManager">
438
-    <frame x="1" y="23" width="1440" height="807" extended-state="6" />
409
+    <frame x="1" y="23" width="1440" height="807" extended-state="0" />
439 410
     <editor active="true" />
440 411
     <layout>
441
-      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
412
+      <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
442 413
       <window_info id="Structure" order="1" weight="0.25" />
443 414
       <window_info id="Image Layers" order="2" />
444 415
       <window_info id="Designer" order="3" />
@@ -449,7 +420,7 @@
449 420
       <window_info anchor="bottom" id="Messages" weight="0.32867134" />
450 421
       <window_info anchor="bottom" id="Message" order="0" />
451 422
       <window_info anchor="bottom" id="Find" order="1" />
452
-      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32867134" />
423
+      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32867134" />
453 424
       <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
454 425
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
455 426
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
@@ -478,21 +449,14 @@
478 449
     <MESSAGE value="readme and docs" />
479 450
     <option name="LAST_COMMIT_MESSAGE" value="readme and docs" />
480 451
   </component>
481
-  <component name="XDebuggerManager">
482
-    <breakpoint-manager>
483
-      <breakpoints>
484
-        <line-breakpoint enabled="true" type="java-method">
485
-          <url>file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java</url>
486
-          <line>104</line>
487
-          <properties class="Arraz">
488
-            <option name="EMULATED" value="true" />
489
-          </properties>
490
-          <option name="timeStamp" value="4" />
491
-        </line-breakpoint>
492
-      </breakpoints>
493
-    </breakpoint-manager>
494
-  </component>
495 452
   <component name="editorHistoryManager">
453
+    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
454
+      <provider selected="true" editor-type-id="text-editor">
455
+        <state relative-caret-position="240">
456
+          <caret line="16" selection-start-line="16" selection-end-line="16" />
457
+        </state>
458
+      </provider>
459
+    </entry>
496 460
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
497 461
       <provider selected="true" editor-type-id="text-editor">
498 462
         <state>
@@ -506,21 +470,12 @@
506 470
         </state>
507 471
       </provider>
508 472
     </entry>
509
-    <entry file="file://$PROJECT_DIR$/README.md">
510
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
511
-        <state split_layout="SPLIT">
512
-          <first_editor relative-caret-position="306">
513
-            <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
514
-          </first_editor>
515
-          <second_editor />
516
-        </state>
517
-      </provider>
518
-    </entry>
519 473
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/MaxMin.java">
520 474
       <provider selected="true" editor-type-id="text-editor">
521
-        <state relative-caret-position="135">
522
-          <caret line="9" column="25" selection-start-line="9" selection-start-column="25" selection-end-line="9" selection-end-column="25" />
475
+        <state>
476
+          <caret column="21" lean-forward="true" selection-start-column="21" selection-end-column="21" />
523 477
           <folding>
478
+            <element signature="e#182#183#0" expanded="true" />
524 479
             <element signature="e#208#209#0" expanded="true" />
525 480
             <element signature="e#243#244#0" expanded="true" />
526 481
             <element signature="e#273#274#0" expanded="true" />
@@ -534,8 +489,8 @@
534 489
     </entry>
535 490
     <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
536 491
       <provider selected="true" editor-type-id="text-editor">
537
-        <state relative-caret-position="1071">
538
-          <caret line="209" selection-start-line="209" selection-start-column="2" selection-end-line="217" selection-end-column="7" />
492
+        <state relative-caret-position="334">
493
+          <caret line="231" column="49" lean-forward="true" selection-start-line="231" selection-start-column="49" selection-end-line="231" selection-end-column="49" />
539 494
           <folding>
540 495
             <element signature="imports" expanded="true" />
541 496
             <element signature="e#4388#4389#0" expanded="true" />
@@ -544,23 +499,26 @@
544 499
         </state>
545 500
       </provider>
546 501
     </entry>
502
+    <entry file="file://$PROJECT_DIR$/README.md">
503
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
504
+        <state split_layout="SPLIT">
505
+          <first_editor relative-caret-position="306">
506
+            <caret line="69" column="5" selection-start-line="69" selection-start-column="5" selection-end-line="69" selection-end-column="5" />
507
+          </first_editor>
508
+          <second_editor />
509
+        </state>
510
+      </provider>
511
+    </entry>
547 512
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
548 513
       <provider selected="true" editor-type-id="text-editor">
549
-        <state relative-caret-position="790">
550
-          <caret line="119" column="10" selection-start-line="119" selection-start-column="10" selection-end-line="121" selection-end-column="11" />
514
+        <state relative-caret-position="359">
515
+          <caret line="130" column="26" selection-start-line="130" selection-start-column="26" selection-end-line="130" selection-end-column="26" />
551 516
           <folding>
552 517
             <element signature="imports" expanded="true" />
553 518
           </folding>
554 519
         </state>
555 520
       </provider>
556 521
     </entry>
557
-    <entry file="file://$PROJECT_DIR$/arraz/pom.xml">
558
-      <provider selected="true" editor-type-id="text-editor">
559
-        <state relative-caret-position="240">
560
-          <caret line="16" selection-start-line="16" selection-end-line="16" />
561
-        </state>
562
-      </provider>
563
-    </entry>
564 522
   </component>
565 523
   <component name="masterDetails">
566 524
     <states>

+ 14
- 3
arraz/src/main/java/Arraz.java Datei anzeigen

@@ -1,5 +1,7 @@
1 1
 import java.util.Arrays;
2
+import java.util.HashSet;
2 3
 import java.util.Iterator;
4
+import java.util.Set;
3 5
 
4 6
 public class Arraz {
5 7
 
@@ -117,7 +119,16 @@ public class Arraz {
117 119
         return newArray;
118 120
         }
119 121
 
120
-//        public MaxMin findMaxMinOfArray(int[] array){
121
-//            Arrays.asList(array).;
122
-//        }
122
+    public MaxMin findMaxMinOfArray(int[] array){
123
+        Arrays.sort(array);
124
+        return new MaxMin(array[array.length - 1], array[0]);
125
+    }
126
+
127
+    public Integer[] removeDupesFromArray(Integer[] array){
128
+        Set<Integer> integerSet = new HashSet<>();
129
+        integerSet.addAll(Arrays.asList(array));
130
+        Integer[] integers = new Integer[integerSet.size()];
131
+        return integerSet.toArray(integers);
132
+    }
133
+
123 134
 }

+ 27
- 9
arraz/src/test/java/ArrazTest.java Datei anzeigen

@@ -207,13 +207,31 @@ public class ArrazTest {
207 207
         Assert.assertArrayEquals(expected, actual);
208 208
     }
209 209
 
210
-//    @Test
211
-//    public void testFindMaxMinOfArray1(){
212
-//        Assert.assertEquals(maxMin.getMax(), testArraz.findMaxMinOfArray(arr1).getMax());
213
-//    }
214
-//
215
-//    @Test
216
-//    public void testFindMaxMinOfArray2(){
217
-//        Assert.assertEquals(maxMin.getMin(), testArraz.findMaxMinOfArray(arr1).getMin());
218
-//    }
210
+    @Test
211
+    public void testFindMaxMinOfArray1(){
212
+        Assert.assertEquals(maxMin.getMax(), testArraz.findMaxMinOfArray(arr1).getMax());
213
+    }
214
+
215
+    @Test
216
+    public void testFindMaxMinOfArray2(){
217
+        Assert.assertEquals(maxMin.getMin(), testArraz.findMaxMinOfArray(arr1).getMin());
218
+    }
219
+
220
+    @Test
221
+    public void testRemoveDupesFromArray1(){
222
+        Integer[] array1 = new Integer[]{1,3 ,4, 3, 7, 7, 10};
223
+        Integer[] expected = new Integer[]{1, 3, 4, 7, 10};
224
+        Integer[] actual = testArraz.removeDupesFromArray(array1);
225
+
226
+        Assert.assertArrayEquals(expected, actual);
227
+    }
228
+
229
+    @Test
230
+    public void testRemoveDupesFromArray2(){
231
+        Integer[] array1 = new Integer[]{5, 1, 1, 1, 1 ,1};
232
+        Integer[] expected = new Integer[]{5, 1};
233
+        Integer[] actual = testArraz.removeDupesFromArray(array1);
234
+
235
+        Assert.assertArrayEquals(expected, actual);
236
+    }
219 237
 }