mpierse před 6 roky
rodič
revize
5986eb8ea2
3 změnil soubory, kde provedl 177 přidání a 96 odebrání
  1. 76
    81
      .idea/workspace.xml
  2. 44
    15
      src/main/java/MyMap.java
  3. 57
    0
      src/test/java/MyMapTest.java

+ 76
- 81
.idea/workspace.xml Zobrazit soubor

@@ -2,12 +2,8 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="4722a4ca-84fe-4509-a5b7-de0cc14e62a2" name="Default Changelist" comment="">
5
-      <change afterPath="$PROJECT_DIR$/src/main/java/MyMap.java" afterDir="false" />
6
-      <change afterPath="$PROJECT_DIR$/src/test/java/MyMapTest.java" afterDir="false" />
7
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8
-      <change beforePath="$PROJECT_DIR$/src/main/java/ArrayList.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/ArrayList.java" afterDir="false" />
9
-      <change beforePath="$PROJECT_DIR$/src/test/java/ArrayListTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/ArrayListTest.java" afterDir="false" />
10
-      <change beforePath="$PROJECT_DIR$/src/test/java/MySetTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/MySetTest.java" afterDir="false" />
5
+      <change beforePath="$PROJECT_DIR$/src/main/java/MyMap.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/MyMap.java" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/src/test/java/MyMapTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/MyMapTest.java" afterDir="false" />
11 7
     </list>
12 8
     <ignored path="$PROJECT_DIR$/target/" />
13 9
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@@ -51,7 +47,7 @@
51 47
       </usages-collector>
52 48
       <usages-collector id="statistics.file.types.edit">
53 49
         <counts>
54
-          <entry key="JAVA" value="3545" />
50
+          <entry key="JAVA" value="4700" />
55 51
         </counts>
56 52
       </usages-collector>
57 53
       <usages-collector id="statistics.js.language.service.starts" />
@@ -60,7 +56,7 @@
60 56
       <usages-collector id="statistics.spring.boot.run.usages" />
61 57
       <usages-collector id="statistics.file.extensions.edit">
62 58
         <counts>
63
-          <entry key="java" value="3545" />
59
+          <entry key="java" value="4700" />
64 60
         </counts>
65 61
       </usages-collector>
66 62
     </session>
@@ -82,19 +78,15 @@
82 78
       <file pinned="false" current-in-tab="false">
83 79
         <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
84 80
           <provider selected="true" editor-type-id="text-editor">
85
-            <state relative-caret-position="385">
86
-              <caret line="37" column="26" selection-start-line="37" selection-start-column="26" selection-end-line="37" selection-end-column="26" />
81
+            <state relative-caret-position="309">
82
+              <caret line="65" column="13" lean-forward="true" selection-start-line="65" selection-start-column="13" selection-end-line="65" selection-end-column="13" />
87 83
               <folding>
88
-                <element signature="e#185#186#0" expanded="true" />
89
-                <element signature="e#211#212#0" expanded="true" />
90
-                <element signature="e#248#249#0" expanded="true" />
91
-                <element signature="e#278#279#0" expanded="true" />
92
-                <element signature="e#317#318#0" expanded="true" />
93
-                <element signature="e#349#350#0" expanded="true" />
94
-                <element signature="e#402#403#0" expanded="true" />
95
-                <element signature="e#444#445#0" expanded="true" />
96 84
                 <element signature="e#569#570#0" expanded="true" />
97 85
                 <element signature="e#601#602#0" expanded="true" />
86
+                <element signature="e#726#727#0" expanded="true" />
87
+                <element signature="e#755#756#0" expanded="true" />
88
+                <element signature="e#531#532#0" expanded="true" />
89
+                <element signature="e#555#556#0" expanded="true" />
98 90
               </folding>
99 91
             </state>
100 92
           </provider>
@@ -103,8 +95,11 @@
103 95
       <file pinned="false" current-in-tab="true">
104 96
         <entry file="file://$PROJECT_DIR$/src/test/java/MyMapTest.java">
105 97
           <provider selected="true" editor-type-id="text-editor">
106
-            <state>
107
-              <caret column="17" lean-forward="true" selection-start-column="17" selection-end-column="17" />
98
+            <state relative-caret-position="280">
99
+              <caret line="95" column="30" selection-start-line="95" selection-start-column="30" selection-end-line="95" selection-end-column="30" />
100
+              <folding>
101
+                <element signature="imports" expanded="true" />
102
+              </folding>
108 103
             </state>
109 104
           </provider>
110 105
         </entry>
@@ -130,7 +125,7 @@
130 125
       <file pinned="false" current-in-tab="false">
131 126
         <entry file="file://$PROJECT_DIR$/src/main/java/ArrayList.java">
132 127
           <provider selected="true" editor-type-id="text-editor">
133
-            <state relative-caret-position="1140">
128
+            <state relative-caret-position="830">
134 129
               <caret line="88" column="40" lean-forward="true" selection-start-line="88" selection-start-column="40" selection-end-line="88" selection-end-column="40" />
135 130
               <folding>
136 131
                 <element signature="e#163#164#0" expanded="true" />
@@ -166,6 +161,7 @@
166 161
   <component name="FindInProjectRecents">
167 162
     <findStrings>
168 163
       <find>list</find>
164
+      <find>cust</find>
169 165
     </findStrings>
170 166
   </component>
171 167
   <component name="Git.Settings">
@@ -249,7 +245,7 @@
249 245
   <component name="PropertiesComponent">
250 246
     <property name="WebServerToolWindowFactoryState" value="false" />
251 247
     <property name="aspect.path.notification.shown" value="true" />
252
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542388194158" />
248
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1542393492514" />
253 249
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
254 250
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
255 251
     <property name="nodejs_npm_path_reset_for_default_project" value="true" />
@@ -266,69 +262,69 @@
266 262
       </list>
267 263
     </option>
268 264
   </component>
269
-  <component name="RunManager" selected="JUnit.MyMapTest.containsKeyFalseTest">
270
-    <configuration name="MyMapTest.addTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
265
+  <component name="RunManager" selected="JUnit.MyMapTest">
266
+    <configuration name="MyMapTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
271 267
       <module name="generics" />
272 268
       <option name="PACKAGE_NAME" value="" />
273 269
       <option name="MAIN_CLASS_NAME" value="MyMapTest" />
274
-      <option name="METHOD_NAME" value="addTest" />
275
-      <option name="TEST_OBJECT" value="method" />
276 270
       <method v="2">
277 271
         <option name="Make" enabled="true" />
278 272
       </method>
279 273
     </configuration>
280
-    <configuration name="MyMapTest.clearTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
274
+    <configuration name="MyMapTest.entrySetTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
281 275
       <module name="generics" />
282 276
       <option name="PACKAGE_NAME" value="" />
283 277
       <option name="MAIN_CLASS_NAME" value="MyMapTest" />
284
-      <option name="METHOD_NAME" value="clearTest" />
278
+      <option name="METHOD_NAME" value="entrySetTest" />
285 279
       <option name="TEST_OBJECT" value="method" />
286 280
       <method v="2">
287 281
         <option name="Make" enabled="true" />
288 282
       </method>
289 283
     </configuration>
290
-    <configuration name="MyMapTest.containsKeyFalseTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
284
+    <configuration name="MyMapTest.equalsFalseTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
291 285
       <module name="generics" />
292 286
       <option name="PACKAGE_NAME" value="" />
293 287
       <option name="MAIN_CLASS_NAME" value="MyMapTest" />
294
-      <option name="METHOD_NAME" value="containsKeyFalseTest" />
288
+      <option name="METHOD_NAME" value="equalsFalseTest" />
295 289
       <option name="TEST_OBJECT" value="method" />
296 290
       <method v="2">
297 291
         <option name="Make" enabled="true" />
298 292
       </method>
299 293
     </configuration>
300
-    <configuration name="MyMapTest.containsKeyTrueTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
294
+    <configuration name="MyMapTest.equalsTrueTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
301 295
       <module name="generics" />
302 296
       <option name="PACKAGE_NAME" value="" />
303 297
       <option name="MAIN_CLASS_NAME" value="MyMapTest" />
304
-      <option name="METHOD_NAME" value="containsKeyTrueTest" />
298
+      <option name="METHOD_NAME" value="equalsTrueTest" />
305 299
       <option name="TEST_OBJECT" value="method" />
306 300
       <method v="2">
307 301
         <option name="Make" enabled="true" />
308 302
       </method>
309 303
     </configuration>
310
-    <configuration name="MySetTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
304
+    <configuration name="MyMapTest.getTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
311 305
       <module name="generics" />
312 306
       <option name="PACKAGE_NAME" value="" />
313
-      <option name="MAIN_CLASS_NAME" value="MySetTest" />
307
+      <option name="MAIN_CLASS_NAME" value="MyMapTest" />
308
+      <option name="METHOD_NAME" value="getTest" />
309
+      <option name="TEST_OBJECT" value="method" />
314 310
       <method v="2">
315 311
         <option name="Make" enabled="true" />
316 312
       </method>
317 313
     </configuration>
318 314
     <list>
319
-      <item itemvalue="JUnit.MySetTest" />
320
-      <item itemvalue="JUnit.MyMapTest.addTest" />
321
-      <item itemvalue="JUnit.MyMapTest.clearTest" />
322
-      <item itemvalue="JUnit.MyMapTest.containsKeyTrueTest" />
323
-      <item itemvalue="JUnit.MyMapTest.containsKeyFalseTest" />
315
+      <item itemvalue="JUnit.MyMapTest.entrySetTest" />
316
+      <item itemvalue="JUnit.MyMapTest.equalsFalseTest" />
317
+      <item itemvalue="JUnit.MyMapTest.equalsTrueTest" />
318
+      <item itemvalue="JUnit.MyMapTest.getTest" />
319
+      <item itemvalue="JUnit.MyMapTest" />
324 320
     </list>
325 321
     <recent_temporary>
326 322
       <list>
327
-        <item itemvalue="JUnit.MyMapTest.containsKeyFalseTest" />
328
-        <item itemvalue="JUnit.MyMapTest.containsKeyTrueTest" />
329
-        <item itemvalue="JUnit.MyMapTest.clearTest" />
330
-        <item itemvalue="JUnit.MyMapTest.addTest" />
331
-        <item itemvalue="JUnit.MySetTest" />
323
+        <item itemvalue="JUnit.MyMapTest" />
324
+        <item itemvalue="JUnit.MyMapTest.entrySetTest" />
325
+        <item itemvalue="JUnit.MyMapTest.getTest" />
326
+        <item itemvalue="JUnit.MyMapTest.equalsFalseTest" />
327
+        <item itemvalue="JUnit.MyMapTest.equalsTrueTest" />
332 328
       </list>
333 329
     </recent_temporary>
334 330
   </component>
@@ -345,44 +341,44 @@
345 341
       <workItem from="1542144022926" duration="15263000" />
346 342
       <workItem from="1542247374356" duration="14000" />
347 343
       <workItem from="1542374483696" duration="4107000" />
348
-      <workItem from="1542378966058" duration="3300000" />
344
+      <workItem from="1542378966058" duration="7717000" />
349 345
     </task>
350 346
     <servers />
351 347
   </component>
352 348
   <component name="TestHistory">
353
-    <history-entry file="MySetTest_addtest - 2018.11.16 at 09h 14m 35s.xml">
354
-      <configuration name="MySetTest.addtest" configurationId="JUnit" />
349
+    <history-entry file="MyMapTest_entrySetTest - 2018.11.16 at 12h 59m 47s.xml">
350
+      <configuration name="MyMapTest.entrySetTest" configurationId="JUnit" />
355 351
     </history-entry>
356
-    <history-entry file="MySetTest_addtest - 2018.11.16 at 09h 14m 41s.xml">
357
-      <configuration name="MySetTest.addtest" configurationId="JUnit" />
352
+    <history-entry file="MyMapTest_equalsFalseTest - 2018.11.16 at 13h 06m 00s.xml">
353
+      <configuration name="MyMapTest.equalsFalseTest" configurationId="JUnit" />
358 354
     </history-entry>
359
-    <history-entry file="MySetTest_addtest - 2018.11.16 at 09h 14m 59s.xml">
360
-      <configuration name="MySetTest.addtest" configurationId="JUnit" />
355
+    <history-entry file="MyMapTest_equalsTrueTest - 2018.11.16 at 13h 06m 03s.xml">
356
+      <configuration name="MyMapTest.equalsTrueTest" configurationId="JUnit" />
361 357
     </history-entry>
362
-    <history-entry file="MySetTest - 2018.11.16 at 09h 15m 17s.xml">
363
-      <configuration name="MySetTest" configurationId="JUnit" />
358
+    <history-entry file="MyMapTest_equalsTrueTest - 2018.11.16 at 13h 10m 44s.xml">
359
+      <configuration name="MyMapTest.equalsTrueTest" configurationId="JUnit" />
364 360
     </history-entry>
365
-    <history-entry file="ArrayListTest_equalstest - 2018.11.16 at 09h 44m 40s.xml">
366
-      <configuration name="ArrayListTest.equalstest" configurationId="JUnit" />
361
+    <history-entry file="MyMapTest_equalsTrueTest - 2018.11.16 at 13h 21m 29s.xml">
362
+      <configuration name="MyMapTest.equalsTrueTest" configurationId="JUnit" />
367 363
     </history-entry>
368
-    <history-entry file="ArrayListTest_equalstest - 2018.11.16 at 09h 50m 54s.xml">
369
-      <configuration name="ArrayListTest.equalstest" configurationId="JUnit" />
364
+    <history-entry file="MyMapTest_equalsTrueTest - 2018.11.16 at 13h 22m 26s.xml">
365
+      <configuration name="MyMapTest.equalsTrueTest" configurationId="JUnit" />
370 366
     </history-entry>
371
-    <history-entry file="ArrayListTest_equalsFalsetest - 2018.11.16 at 09h 52m 00s.xml">
372
-      <configuration name="ArrayListTest.equalsFalsetest" configurationId="JUnit" />
367
+    <history-entry file="MyMapTest_equalsTrueTest - 2018.11.16 at 13h 23m 50s.xml">
368
+      <configuration name="MyMapTest.equalsTrueTest" configurationId="JUnit" />
373 369
     </history-entry>
374
-    <history-entry file="ArrayListTest_equalsFalsetest2 - 2018.11.16 at 09h 52m 23s.xml">
375
-      <configuration name="ArrayListTest.equalsFalsetest2" configurationId="JUnit" />
370
+    <history-entry file="MyMapTest_equalsTrueTest - 2018.11.16 at 13h 29m 20s.xml">
371
+      <configuration name="MyMapTest.equalsTrueTest" configurationId="JUnit" />
376 372
     </history-entry>
377
-    <history-entry file="MySetTest - 2018.11.16 at 11h 24m 23s.xml">
378
-      <configuration name="MySetTest" configurationId="JUnit" />
373
+    <history-entry file="MyMapTest_equalsTrueTest - 2018.11.16 at 13h 29m 25s.xml">
374
+      <configuration name="MyMapTest.equalsTrueTest" configurationId="JUnit" />
379 375
     </history-entry>
380
-    <history-entry file="MyMapTest_addTest - 2018.11.16 at 12h 03m 58s.xml">
381
-      <configuration name="MyMapTest.addTest" configurationId="JUnit" />
376
+    <history-entry file="MyMapTest_equalsFalseTest - 2018.11.16 at 13h 29m 27s.xml">
377
+      <configuration name="MyMapTest.equalsFalseTest" configurationId="JUnit" />
382 378
     </history-entry>
383 379
   </component>
384 380
   <component name="TimeTrackingManager">
385
-    <option name="totallyTimeSpent" value="22684000" />
381
+    <option name="totallyTimeSpent" value="27101000" />
386 382
   </component>
387 383
   <component name="ToolWindowManager">
388 384
     <frame x="0" y="23" width="1440" height="807" extended-state="6" />
@@ -398,7 +394,7 @@
398 394
       <window_info anchor="bottom" id="Message" order="0" />
399 395
       <window_info anchor="bottom" id="Find" order="1" />
400 396
       <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.33286715" />
401
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.3986111" />
397
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.3986014" />
402 398
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
403 399
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
404 400
       <window_info anchor="bottom" id="TODO" order="6" />
@@ -406,7 +402,7 @@
406 402
       <window_info anchor="bottom" id="Database Changes" order="8" show_stripe_button="false" />
407 403
       <window_info anchor="bottom" id="Terminal" order="9" />
408 404
       <window_info anchor="bottom" id="Event Log" order="10" side_tool="true" />
409
-      <window_info anchor="bottom" id="Messages" order="11" weight="0.3286908" />
405
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.32867134" />
410 406
       <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
411 407
       <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
412 408
       <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@@ -479,7 +475,7 @@
479 475
     </entry>
480 476
     <entry file="file://$PROJECT_DIR$/src/main/java/ArrayList.java">
481 477
       <provider selected="true" editor-type-id="text-editor">
482
-        <state relative-caret-position="1140">
478
+        <state relative-caret-position="830">
483 479
           <caret line="88" column="40" lean-forward="true" selection-start-line="88" selection-start-column="40" selection-end-line="88" selection-end-column="40" />
484 480
           <folding>
485 481
             <element signature="e#163#164#0" expanded="true" />
@@ -499,27 +495,26 @@
499 495
     </entry>
500 496
     <entry file="file://$PROJECT_DIR$/src/main/java/MyMap.java">
501 497
       <provider selected="true" editor-type-id="text-editor">
502
-        <state relative-caret-position="385">
503
-          <caret line="37" column="26" selection-start-line="37" selection-start-column="26" selection-end-line="37" selection-end-column="26" />
498
+        <state relative-caret-position="309">
499
+          <caret line="65" column="13" lean-forward="true" selection-start-line="65" selection-start-column="13" selection-end-line="65" selection-end-column="13" />
504 500
           <folding>
505
-            <element signature="e#185#186#0" expanded="true" />
506
-            <element signature="e#211#212#0" expanded="true" />
507
-            <element signature="e#248#249#0" expanded="true" />
508
-            <element signature="e#278#279#0" expanded="true" />
509
-            <element signature="e#317#318#0" expanded="true" />
510
-            <element signature="e#349#350#0" expanded="true" />
511
-            <element signature="e#402#403#0" expanded="true" />
512
-            <element signature="e#444#445#0" expanded="true" />
513 501
             <element signature="e#569#570#0" expanded="true" />
514 502
             <element signature="e#601#602#0" expanded="true" />
503
+            <element signature="e#726#727#0" expanded="true" />
504
+            <element signature="e#755#756#0" expanded="true" />
505
+            <element signature="e#531#532#0" expanded="true" />
506
+            <element signature="e#555#556#0" expanded="true" />
515 507
           </folding>
516 508
         </state>
517 509
       </provider>
518 510
     </entry>
519 511
     <entry file="file://$PROJECT_DIR$/src/test/java/MyMapTest.java">
520 512
       <provider selected="true" editor-type-id="text-editor">
521
-        <state>
522
-          <caret column="17" lean-forward="true" selection-start-column="17" selection-end-column="17" />
513
+        <state relative-caret-position="280">
514
+          <caret line="95" column="30" selection-start-line="95" selection-start-column="30" selection-end-line="95" selection-end-column="30" />
515
+          <folding>
516
+            <element signature="imports" expanded="true" />
517
+          </folding>
523 518
         </state>
524 519
       </provider>
525 520
     </entry>

+ 44
- 15
src/main/java/MyMap.java Zobrazit soubor

@@ -8,21 +8,6 @@ public class MyMap {
8 8
         arrayList = new ArrayList();
9 9
     }
10 10
 
11
-    public MySet getSet() {
12
-        return set;
13
-    }
14
-
15
-    public void setSet(MySet set) {
16
-        this.set = set;
17
-    }
18
-
19
-    public ArrayList getArrayList() {
20
-        return arrayList;
21
-    }
22
-
23
-    public void setArrayList(ArrayList arrayList) {
24
-        this.arrayList = arrayList;
25
-    }
26 11
 
27 12
     public void add(Object key, Object value){
28 13
         set.add(key);
@@ -41,4 +26,48 @@ public class MyMap {
41 26
     public boolean containsKey(Object o) {
42 27
         return set.contains(o);
43 28
     }
29
+
30
+    public boolean containsValue(Object o ){
31
+        return arrayList.contains(o);
32
+    }
33
+
34
+    public Object[][] entrySet() {
35
+        Object[][] entrySet = new Object[set.size()][2];
36
+        for(int i=0; i<set.size(); i++){
37
+            entrySet[i]= new Object[]{set.get(i), arrayList.get(i)};
38
+        }
39
+        return entrySet;
40
+    }
41
+
42
+    @Override
43
+    public boolean equals(Object obj){
44
+            if (this == obj) {
45
+                return true;
46
+            } else if (obj == null) {
47
+                return false;
48
+            } else if (obj instanceof MyMap) {
49
+                MyMap compareMap = (MyMap) obj;
50
+                for (int i=0; i<set.size(); i++) {
51
+                    for(int j = 0; j<2; j++) {
52
+                        if (compareMap.entrySet()[j][i]== this.entrySet()[j][i]) {
53
+                            return true;
54
+                        }
55
+                        return false;
56
+                    }
57
+                }
58
+            }
59
+            return false;
60
+        }
61
+
62
+    public Object get(Object key) {
63
+        for(int i = 0; i<set.size(); i++){
64
+            if(key == set.get(i)){
65
+                return arrayList.getArr()[i];
66
+            }
67
+        }
68
+        return -1;
69
+    }
44 70
 }
71
+
72
+
73
+

+ 57
- 0
src/test/java/MyMapTest.java Zobrazit soubor

@@ -4,6 +4,7 @@ import org.junit.Test;
4 4
 public class MyMapTest {
5 5
 
6 6
     MyMap map = new MyMap();
7
+    MyMap map2 = new MyMap();
7 8
 
8 9
 
9 10
 
@@ -41,4 +42,60 @@ public class MyMapTest {
41 42
         boolean actual = map.containsKey(5);
42 43
         Assert.assertFalse(actual);
43 44
     }
45
+
46
+    @Test
47
+    public void containsValueTrueTest(){
48
+        map.add(3,4);
49
+        map.add(7,5);
50
+        boolean actual = map.containsValue(4);
51
+        Assert.assertTrue(actual);
52
+    }
53
+    @Test
54
+    public void containsValueFalseTest(){
55
+        map.add(3,4);
56
+        map.add(7,5);
57
+        boolean actual = map.containsValue(7);
58
+        Assert.assertFalse(actual);
59
+    }
60
+
61
+    @Test
62
+    public void entrySetTest(){
63
+        map.add(3,4);
64
+        map.add(7,5);
65
+        map.add(5,6);
66
+        Object [][] actual = map.entrySet();
67
+        Object [][] expected = {{3,4}, {7,5}, {5,6}};
68
+        Assert.assertArrayEquals(expected, actual);
69
+    }
70
+
71
+    @Test
72
+    public void equalsTrueTest(){
73
+        map.add(3,4);
74
+        map.add(7,5);
75
+        map2.add(3,4);
76
+        map2.add(7,5);
77
+        boolean actual = map.equals(map2);
78
+        Assert.assertTrue(actual);
79
+    }
80
+
81
+    @Test
82
+    public void equalsFalseTest(){
83
+        map.add(3,4);
84
+        map.add(7,5);
85
+        map2.add(9,4);
86
+        map2.add(7,5);
87
+        boolean actual = map.equals(map2);
88
+        Assert.assertFalse(actual);
89
+    }
90
+
91
+    @Test
92
+    public void getTest(){
93
+        map.add(3,4);
94
+        map.add(7,5);
95
+        map.add(5,6);
96
+        Object actual = map.get(7);
97
+        Object expected = 5;
98
+        Assert.assertEquals(expected, actual);
99
+    }
100
+
44 101
 }