Bladeren bron

added generic class

mpierse 6 jaren geleden
bovenliggende
commit
169e0e30b0

+ 116
- 81
.idea/workspace.xml Bestand weergeven

2
 <project version="4">
2
 <project version="4">
3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="926ad23d-2ddc-41ae-980d-780dcc1811fa" name="Default" comment="">
4
     <list default="true" id="926ad23d-2ddc-41ae-980d-780dcc1811fa" name="Default" comment="">
5
-      <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
       <change beforePath="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" afterDir="false" />
5
       <change beforePath="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java" afterDir="false" />
7
       <change beforePath="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" afterDir="false" />
7
       <change beforePath="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" afterDir="false" />
8
     </list>
8
     </list>
9
     <ignored path="$PROJECT_DIR$/Checkbook/target/" />
9
     <ignored path="$PROJECT_DIR$/Checkbook/target/" />
23
       </usages-collector>
23
       </usages-collector>
24
       <usages-collector id="statistics.file.extensions.open">
24
       <usages-collector id="statistics.file.extensions.open">
25
         <counts>
25
         <counts>
26
+          <entry key="class" value="1" />
26
           <entry key="iml" value="1" />
27
           <entry key="iml" value="1" />
27
-          <entry key="java" value="10" />
28
+          <entry key="java" value="11" />
28
           <entry key="md" value="1" />
29
           <entry key="md" value="1" />
29
         </counts>
30
         </counts>
30
       </usages-collector>
31
       </usages-collector>
31
       <usages-collector id="statistics.file.types.open">
32
       <usages-collector id="statistics.file.types.open">
32
         <counts>
33
         <counts>
34
+          <entry key="CLASS" value="1" />
33
           <entry key="IDEA_MODULE" value="1" />
35
           <entry key="IDEA_MODULE" value="1" />
34
-          <entry key="JAVA" value="10" />
36
+          <entry key="JAVA" value="11" />
35
           <entry key="Markdown" value="1" />
37
           <entry key="Markdown" value="1" />
36
         </counts>
38
         </counts>
37
       </usages-collector>
39
       </usages-collector>
38
       <usages-collector id="statistics.file.extensions.edit">
40
       <usages-collector id="statistics.file.extensions.edit">
39
         <counts>
41
         <counts>
40
-          <entry key="java" value="1550" />
42
+          <entry key="java" value="1943" />
41
         </counts>
43
         </counts>
42
       </usages-collector>
44
       </usages-collector>
43
       <usages-collector id="statistics.file.types.edit">
45
       <usages-collector id="statistics.file.types.edit">
44
         <counts>
46
         <counts>
45
-          <entry key="JAVA" value="1550" />
47
+          <entry key="JAVA" value="1943" />
46
         </counts>
48
         </counts>
47
       </usages-collector>
49
       </usages-collector>
48
     </session>
50
     </session>
54
           <file pinned="false" current-in-tab="false">
56
           <file pinned="false" current-in-tab="false">
55
             <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java">
57
             <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java">
56
               <provider selected="true" editor-type-id="text-editor">
58
               <provider selected="true" editor-type-id="text-editor">
57
-                <state relative-caret-position="240">
59
+                <state relative-caret-position="-169">
58
                   <caret line="16" column="5" lean-forward="true" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
60
                   <caret line="16" column="5" lean-forward="true" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
59
                   <folding>
61
                   <folding>
60
                     <element signature="imports" expanded="true" />
62
                     <element signature="imports" expanded="true" />
82
           <file pinned="false" current-in-tab="false">
84
           <file pinned="false" current-in-tab="false">
83
             <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
85
             <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
84
               <provider selected="true" editor-type-id="text-editor">
86
               <provider selected="true" editor-type-id="text-editor">
85
-                <state relative-caret-position="1215">
86
-                  <caret line="81" column="4" selection-start-line="81" selection-start-column="4" selection-end-line="81" selection-end-column="4" />
87
+                <state relative-caret-position="266">
88
+                  <caret line="93" column="50" selection-start-line="93" selection-start-column="50" selection-end-line="93" selection-end-column="50" />
87
                   <folding>
89
                   <folding>
88
                     <element signature="imports" expanded="true" />
90
                     <element signature="imports" expanded="true" />
89
                     <element signature="e#185#186#0" expanded="true" />
91
                     <element signature="e#185#186#0" expanded="true" />
90
                     <element signature="e#239#240#0" expanded="true" />
92
                     <element signature="e#239#240#0" expanded="true" />
93
+                    <element signature="e#391#392#0" expanded="true" />
94
+                    <element signature="e#415#416#0" expanded="true" />
91
                     <element signature="e#141#142#0" expanded="true" />
95
                     <element signature="e#141#142#0" expanded="true" />
92
                     <element signature="e#170#171#0" expanded="true" />
96
                     <element signature="e#170#171#0" expanded="true" />
93
                     <element signature="e#205#206#0" expanded="true" />
97
                     <element signature="e#205#206#0" expanded="true" />
105
               </provider>
109
               </provider>
106
             </entry>
110
             </entry>
107
           </file>
111
           </file>
108
-          <file pinned="false" current-in-tab="true">
112
+          <file pinned="false" current-in-tab="false">
109
             <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
113
             <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
110
               <provider selected="true" editor-type-id="text-editor">
114
               <provider selected="true" editor-type-id="text-editor">
111
-                <state relative-caret-position="2235">
112
-                  <caret line="149" column="49" lean-forward="true" selection-start-line="149" selection-start-column="49" selection-end-line="149" selection-end-column="49" />
115
+                <state relative-caret-position="326">
116
+                  <caret line="162" column="5" lean-forward="true" selection-start-line="162" selection-start-column="5" selection-end-line="162" selection-end-column="5" />
113
                   <folding>
117
                   <folding>
114
                     <element signature="imports" expanded="true" />
118
                     <element signature="imports" expanded="true" />
115
                     <element signature="e#1385#1386#0" expanded="true" />
119
                     <element signature="e#1385#1386#0" expanded="true" />
116
                     <element signature="e#1406#1407#0" expanded="true" />
120
                     <element signature="e#1406#1407#0" expanded="true" />
117
                     <element signature="e#2852#2853#0" expanded="true" />
121
                     <element signature="e#2852#2853#0" expanded="true" />
118
                     <element signature="e#2932#2933#0" expanded="true" />
122
                     <element signature="e#2932#2933#0" expanded="true" />
123
+                    <element signature="e#4437#4438#0" expanded="true" />
124
+                    <element signature="e#4458#4459#0" expanded="true" />
125
+                    <element signature="e#4621#4622#0" expanded="true" />
126
+                    <element signature="e#4685#4686#0" expanded="true" />
119
                   </folding>
127
                   </folding>
120
                 </state>
128
                 </state>
121
               </provider>
129
               </provider>
124
           <file pinned="false" current-in-tab="false">
132
           <file pinned="false" current-in-tab="false">
125
             <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
133
             <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
126
               <provider selected="true" editor-type-id="text-editor">
134
               <provider selected="true" editor-type-id="text-editor">
127
-                <state relative-caret-position="30">
128
-                  <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
135
+                <state relative-caret-position="165">
136
+                  <caret line="11" column="1" lean-forward="true" selection-start-line="11" selection-start-column="1" selection-end-line="11" selection-end-column="1" />
137
+                </state>
138
+              </provider>
139
+            </entry>
140
+          </file>
141
+          <file pinned="false" current-in-tab="true">
142
+            <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java">
143
+              <provider selected="true" editor-type-id="text-editor">
144
+                <state relative-caret-position="75">
145
+                  <caret line="5" column="52" selection-start-line="5" selection-start-column="52" selection-end-line="5" selection-end-column="52" />
146
+                  <folding>
147
+                    <element signature="e#182#183#0" expanded="true" />
148
+                  </folding>
129
                 </state>
149
                 </state>
130
               </provider>
150
               </provider>
131
             </entry>
151
             </entry>
175
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Payee.java" />
195
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Payee.java" />
176
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java" />
196
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java" />
177
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java" />
197
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java" />
178
-        <option value="$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java" />
179
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/TransactionType.java" />
198
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/TransactionType.java" />
180
         <option value="$PROJECT_DIR$/README.md" />
199
         <option value="$PROJECT_DIR$/README.md" />
181
-        <option value="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" />
182
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" />
200
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" />
201
+        <option value="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" />
202
+        <option value="$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java" />
183
       </list>
203
       </list>
184
     </option>
204
     </option>
185
   </component>
205
   </component>
258
   <component name="PropertiesComponent">
278
   <component name="PropertiesComponent">
259
     <property name="WebServerToolWindowFactoryState" value="false" />
279
     <property name="WebServerToolWindowFactoryState" value="false" />
260
     <property name="aspect.path.notification.shown" value="true" />
280
     <property name="aspect.path.notification.shown" value="true" />
261
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544292738352" />
281
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544299508052" />
262
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
282
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
263
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
283
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
264
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
284
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
288
       </list>
308
       </list>
289
     </option>
309
     </option>
290
   </component>
310
   </component>
291
-  <component name="RunManager" selected="JUnit.CheckbookTest.getAllDebitTest">
311
+  <component name="RunManager" selected="JUnit.CheckbookTest">
292
     <configuration default="true" type="Applet" factoryName="Applet">
312
     <configuration default="true" type="Applet" factoryName="Applet">
293
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
313
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
294
       <method v="2">
314
       <method v="2">
301
         <option name="Make" enabled="true" />
321
         <option name="Make" enabled="true" />
302
       </method>
322
       </method>
303
     </configuration>
323
     </configuration>
304
-    <configuration name="CheckbookTest.checkbookValue" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
324
+    <configuration name="CheckbookTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
305
       <module name="Checkbook" />
325
       <module name="Checkbook" />
306
       <option name="PACKAGE_NAME" value="" />
326
       <option name="PACKAGE_NAME" value="" />
307
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
327
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
308
-      <option name="METHOD_NAME" value="checkbookValue" />
309
-      <option name="TEST_OBJECT" value="method" />
310
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
328
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
311
       <method v="2">
329
       <method v="2">
312
         <option name="Make" enabled="true" />
330
         <option name="Make" enabled="true" />
313
       </method>
331
       </method>
314
     </configuration>
332
     </configuration>
315
-    <configuration name="CheckbookTest.getAllDebitTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
333
+    <configuration name="CheckbookTest.checkbookValue" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
316
       <module name="Checkbook" />
334
       <module name="Checkbook" />
317
       <option name="PACKAGE_NAME" value="" />
335
       <option name="PACKAGE_NAME" value="" />
318
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
336
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
319
-      <option name="METHOD_NAME" value="getAllDebitTest" />
337
+      <option name="METHOD_NAME" value="checkbookValue" />
320
       <option name="TEST_OBJECT" value="method" />
338
       <option name="TEST_OBJECT" value="method" />
321
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
339
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
322
       <method v="2">
340
       <method v="2">
323
         <option name="Make" enabled="true" />
341
         <option name="Make" enabled="true" />
324
       </method>
342
       </method>
325
     </configuration>
343
     </configuration>
326
-    <configuration name="CheckbookTest.getTransactionForPayee" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
344
+    <configuration name="CheckbookTest.constructorOneParam" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
327
       <module name="Checkbook" />
345
       <module name="Checkbook" />
328
       <option name="PACKAGE_NAME" value="" />
346
       <option name="PACKAGE_NAME" value="" />
329
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
347
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
330
-      <option name="METHOD_NAME" value="getTransactionForPayee" />
348
+      <option name="METHOD_NAME" value="constructorOneParam" />
331
       <option name="TEST_OBJECT" value="method" />
349
       <option name="TEST_OBJECT" value="method" />
332
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
350
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
333
       <method v="2">
351
       <method v="2">
334
         <option name="Make" enabled="true" />
352
         <option name="Make" enabled="true" />
335
       </method>
353
       </method>
336
     </configuration>
354
     </configuration>
337
-    <configuration name="CheckbookTest.getTransactionsForDateTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
355
+    <configuration name="CheckbookTest.getAllCreditTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
338
       <module name="Checkbook" />
356
       <module name="Checkbook" />
339
       <option name="PACKAGE_NAME" value="" />
357
       <option name="PACKAGE_NAME" value="" />
340
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
358
       <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
341
-      <option name="METHOD_NAME" value="getTransactionsForDateTest" />
359
+      <option name="METHOD_NAME" value="getAllCreditTest" />
342
       <option name="TEST_OBJECT" value="method" />
360
       <option name="TEST_OBJECT" value="method" />
343
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
361
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
344
       <method v="2">
362
       <method v="2">
381
     </configuration>
399
     </configuration>
382
     <list>
400
     <list>
383
       <item itemvalue="JUnit.CheckbookTest.toArrayparam2test" />
401
       <item itemvalue="JUnit.CheckbookTest.toArrayparam2test" />
402
+      <item itemvalue="JUnit.CheckbookTest.constructorOneParam" />
403
+      <item itemvalue="JUnit.CheckbookTest" />
404
+      <item itemvalue="JUnit.CheckbookTest.getAllCreditTest" />
384
       <item itemvalue="JUnit.CheckbookTest.checkbookValue" />
405
       <item itemvalue="JUnit.CheckbookTest.checkbookValue" />
385
-      <item itemvalue="JUnit.CheckbookTest.getTransactionsForDateTest" />
386
-      <item itemvalue="JUnit.CheckbookTest.getTransactionForPayee" />
387
-      <item itemvalue="JUnit.CheckbookTest.getAllDebitTest" />
388
     </list>
406
     </list>
389
     <recent_temporary>
407
     <recent_temporary>
390
       <list>
408
       <list>
391
-        <item itemvalue="JUnit.CheckbookTest.getAllDebitTest" />
392
-        <item itemvalue="JUnit.CheckbookTest.getTransactionForPayee" />
393
-        <item itemvalue="JUnit.CheckbookTest.getTransactionsForDateTest" />
409
+        <item itemvalue="JUnit.CheckbookTest" />
394
         <item itemvalue="JUnit.CheckbookTest.checkbookValue" />
410
         <item itemvalue="JUnit.CheckbookTest.checkbookValue" />
411
+        <item itemvalue="JUnit.CheckbookTest.getAllCreditTest" />
412
+        <item itemvalue="JUnit.CheckbookTest.constructorOneParam" />
395
         <item itemvalue="JUnit.CheckbookTest.toArrayparam2test" />
413
         <item itemvalue="JUnit.CheckbookTest.toArrayparam2test" />
396
       </list>
414
       </list>
397
     </recent_temporary>
415
     </recent_temporary>
407
       <option name="presentableId" value="Default" />
425
       <option name="presentableId" value="Default" />
408
       <updated>1543958631974</updated>
426
       <updated>1543958631974</updated>
409
       <workItem from="1543958633447" duration="3259000" />
427
       <workItem from="1543958633447" duration="3259000" />
410
-      <workItem from="1544205488920" duration="9178000" />
428
+      <workItem from="1544205488920" duration="14643000" />
411
     </task>
429
     </task>
412
     <servers />
430
     <servers />
413
   </component>
431
   </component>
414
   <component name="TestHistory">
432
   <component name="TestHistory">
415
-    <history-entry file="CheckbookTest_toArrayparam2test - 2018.12.07 at 16h 06m 47s.xml">
433
+    <history-entry file="CheckbookTest_toArrayparam2test - 2018.12.08 at 13h 33m 14s.xml">
416
       <configuration name="CheckbookTest.toArrayparam2test" configurationId="JUnit" />
434
       <configuration name="CheckbookTest.toArrayparam2test" configurationId="JUnit" />
417
     </history-entry>
435
     </history-entry>
418
-    <history-entry file="CheckbookTest_checkbookValue - 2018.12.07 at 16h 16m 13s.xml">
419
-      <configuration name="CheckbookTest.checkbookValue" configurationId="JUnit" />
436
+    <history-entry file="CheckbookTest_toArrayparam2test - 2018.12.08 at 13h 34m 50s.xml">
437
+      <configuration name="CheckbookTest.toArrayparam2test" configurationId="JUnit" />
420
     </history-entry>
438
     </history-entry>
421
-    <history-entry file="CheckbookTest_checkbookValue - 2018.12.07 at 16h 17m 33s.xml">
422
-      <configuration name="CheckbookTest.checkbookValue" configurationId="JUnit" />
439
+    <history-entry file="CheckbookTest_toArrayparam2test - 2018.12.08 at 13h 35m 11s.xml">
440
+      <configuration name="CheckbookTest.toArrayparam2test" configurationId="JUnit" />
423
     </history-entry>
441
     </history-entry>
424
-    <history-entry file="CheckbookTest_getTransactionsForDateTest - 2018.12.07 at 18h 17m 48s.xml">
425
-      <configuration name="CheckbookTest.getTransactionsForDateTest" configurationId="JUnit" />
442
+    <history-entry file="CheckbookTest_constructorOneParam - 2018.12.08 at 14h 20m 37s.xml">
443
+      <configuration name="CheckbookTest.constructorOneParam" configurationId="JUnit" />
426
     </history-entry>
444
     </history-entry>
427
-    <history-entry file="CheckbookTest_getTransactionForPayee - 2018.12.07 at 18h 20m 02s.xml">
428
-      <configuration name="CheckbookTest.getTransactionForPayee" configurationId="JUnit" />
445
+    <history-entry file="CheckbookTest - 2018.12.08 at 14h 23m 30s.xml">
446
+      <configuration name="CheckbookTest" configurationId="JUnit" />
429
     </history-entry>
447
     </history-entry>
430
-    <history-entry file="CheckbookTest_getTransactionForPayee - 2018.12.07 at 18h 20m 08s.xml">
431
-      <configuration name="CheckbookTest.getTransactionForPayee" configurationId="JUnit" />
448
+    <history-entry file="CheckbookTest_getAllCreditTest - 2018.12.08 at 14h 24m 06s.xml">
449
+      <configuration name="CheckbookTest.getAllCreditTest" configurationId="JUnit" />
432
     </history-entry>
450
     </history-entry>
433
-    <history-entry file="CheckbookTest_getTransactionForPayee - 2018.12.07 at 18h 25m 55s.xml">
434
-      <configuration name="CheckbookTest.getTransactionForPayee" configurationId="JUnit" />
451
+    <history-entry file="CheckbookTest_getAllCreditTest - 2018.12.08 at 14h 24m 48s.xml">
452
+      <configuration name="CheckbookTest.getAllCreditTest" configurationId="JUnit" />
435
     </history-entry>
453
     </history-entry>
436
-    <history-entry file="CheckbookTest_getTransactionForPayee - 2018.12.07 at 18h 27m 14s.xml">
437
-      <configuration name="CheckbookTest.getTransactionForPayee" configurationId="JUnit" />
454
+    <history-entry file="CheckbookTest_checkbookValue - 2018.12.08 at 14h 24m 53s.xml">
455
+      <configuration name="CheckbookTest.checkbookValue" configurationId="JUnit" />
438
     </history-entry>
456
     </history-entry>
439
-    <history-entry file="CheckbookTest_getTransactionForPayee - 2018.12.07 at 18h 27m 48s.xml">
440
-      <configuration name="CheckbookTest.getTransactionForPayee" configurationId="JUnit" />
457
+    <history-entry file="CheckbookTest_checkbookValue - 2018.12.08 at 14h 25m 31s.xml">
458
+      <configuration name="CheckbookTest.checkbookValue" configurationId="JUnit" />
441
     </history-entry>
459
     </history-entry>
442
-    <history-entry file="CheckbookTest_getAllDebitTest - 2018.12.07 at 18h 30m 33s.xml">
443
-      <configuration name="CheckbookTest.getAllDebitTest" configurationId="JUnit" />
460
+    <history-entry file="CheckbookTest - 2018.12.08 at 14h 25m 37s.xml">
461
+      <configuration name="CheckbookTest" configurationId="JUnit" />
444
     </history-entry>
462
     </history-entry>
445
   </component>
463
   </component>
446
   <component name="TimeTrackingManager">
464
   <component name="TimeTrackingManager">
447
-    <option name="totallyTimeSpent" value="12437000" />
465
+    <option name="totallyTimeSpent" value="17902000" />
448
   </component>
466
   </component>
449
   <component name="ToolWindowManager">
467
   <component name="ToolWindowManager">
450
     <frame x="0" y="23" width="1440" height="805" extended-state="0" />
468
     <frame x="0" y="23" width="1440" height="805" extended-state="0" />
469
+    <editor active="true" />
451
     <layout>
470
     <layout>
452
-      <window_info content_ui="combo" id="Project" order="0" weight="0.2532189" />
471
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2532189" />
453
       <window_info id="Structure" order="1" weight="0.25" />
472
       <window_info id="Structure" order="1" weight="0.25" />
454
       <window_info id="Image Layers" order="2" />
473
       <window_info id="Image Layers" order="2" />
455
       <window_info id="Designer" order="3" />
474
       <window_info id="Designer" order="3" />
460
       <window_info anchor="bottom" id="Messages" weight="0.32959327" />
479
       <window_info anchor="bottom" id="Messages" weight="0.32959327" />
461
       <window_info anchor="bottom" id="Message" order="0" />
480
       <window_info anchor="bottom" id="Message" order="0" />
462
       <window_info anchor="bottom" id="Find" order="1" />
481
       <window_info anchor="bottom" id="Find" order="1" />
463
-      <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32959327" />
464
-      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
482
+      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32959327" />
483
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.3997195" />
465
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
484
       <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
466
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
485
       <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
467
       <window_info anchor="bottom" id="TODO" order="6" />
486
       <window_info anchor="bottom" id="TODO" order="6" />
529
         </state>
548
         </state>
530
       </provider>
549
       </provider>
531
     </entry>
550
     </entry>
532
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java">
533
-      <provider selected="true" editor-type-id="text-editor">
534
-        <state relative-caret-position="15">
535
-          <caret line="1" column="28" selection-start-line="1" selection-start-column="28" selection-end-line="1" selection-end-column="28" />
536
-        </state>
537
-      </provider>
538
-    </entry>
539
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/TransactionType.java">
551
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/TransactionType.java">
540
       <provider selected="true" editor-type-id="text-editor">
552
       <provider selected="true" editor-type-id="text-editor">
541
         <state>
553
         <state>
567
         </state>
579
         </state>
568
       </provider>
580
       </provider>
569
     </entry>
581
     </entry>
570
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
571
-      <provider selected="true" editor-type-id="text-editor">
572
-        <state relative-caret-position="30">
573
-          <caret line="2" column="17" selection-start-line="2" selection-start-column="17" selection-end-line="2" selection-end-column="17" />
574
-        </state>
575
-      </provider>
576
-    </entry>
577
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java">
582
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java">
578
       <provider selected="true" editor-type-id="text-editor">
583
       <provider selected="true" editor-type-id="text-editor">
579
-        <state relative-caret-position="240">
584
+        <state relative-caret-position="-169">
580
           <caret line="16" column="5" lean-forward="true" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
585
           <caret line="16" column="5" lean-forward="true" selection-start-line="16" selection-start-column="5" selection-end-line="16" selection-end-column="5" />
581
           <folding>
586
           <folding>
582
             <element signature="imports" expanded="true" />
587
             <element signature="imports" expanded="true" />
600
         </state>
605
         </state>
601
       </provider>
606
       </provider>
602
     </entry>
607
     </entry>
608
+    <entry file="jar://$MAVEN_REPOSITORY$/junit/junit/4.0/junit-4.0.jar!/org/junit/internal/runners/TestMethodRunner.class">
609
+      <provider selected="true" editor-type-id="text-editor">
610
+        <state relative-caret-position="134">
611
+          <caret line="94" selection-start-line="94" selection-end-line="94" />
612
+        </state>
613
+      </provider>
614
+    </entry>
615
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
616
+      <provider selected="true" editor-type-id="text-editor">
617
+        <state relative-caret-position="326">
618
+          <caret line="162" column="5" lean-forward="true" selection-start-line="162" selection-start-column="5" selection-end-line="162" selection-end-column="5" />
619
+          <folding>
620
+            <element signature="imports" expanded="true" />
621
+            <element signature="e#1385#1386#0" expanded="true" />
622
+            <element signature="e#1406#1407#0" expanded="true" />
623
+            <element signature="e#2852#2853#0" expanded="true" />
624
+            <element signature="e#2932#2933#0" expanded="true" />
625
+            <element signature="e#4437#4438#0" expanded="true" />
626
+            <element signature="e#4458#4459#0" expanded="true" />
627
+            <element signature="e#4621#4622#0" expanded="true" />
628
+            <element signature="e#4685#4686#0" expanded="true" />
629
+          </folding>
630
+        </state>
631
+      </provider>
632
+    </entry>
603
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
633
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
604
       <provider selected="true" editor-type-id="text-editor">
634
       <provider selected="true" editor-type-id="text-editor">
605
-        <state relative-caret-position="1215">
606
-          <caret line="81" column="4" selection-start-line="81" selection-start-column="4" selection-end-line="81" selection-end-column="4" />
635
+        <state relative-caret-position="266">
636
+          <caret line="93" column="50" selection-start-line="93" selection-start-column="50" selection-end-line="93" selection-end-column="50" />
607
           <folding>
637
           <folding>
608
             <element signature="imports" expanded="true" />
638
             <element signature="imports" expanded="true" />
609
             <element signature="e#185#186#0" expanded="true" />
639
             <element signature="e#185#186#0" expanded="true" />
610
             <element signature="e#239#240#0" expanded="true" />
640
             <element signature="e#239#240#0" expanded="true" />
641
+            <element signature="e#391#392#0" expanded="true" />
642
+            <element signature="e#415#416#0" expanded="true" />
611
             <element signature="e#141#142#0" expanded="true" />
643
             <element signature="e#141#142#0" expanded="true" />
612
             <element signature="e#170#171#0" expanded="true" />
644
             <element signature="e#170#171#0" expanded="true" />
613
             <element signature="e#205#206#0" expanded="true" />
645
             <element signature="e#205#206#0" expanded="true" />
624
         </state>
656
         </state>
625
       </provider>
657
       </provider>
626
     </entry>
658
     </entry>
627
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
659
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
660
+      <provider selected="true" editor-type-id="text-editor">
661
+        <state relative-caret-position="165">
662
+          <caret line="11" column="1" lean-forward="true" selection-start-line="11" selection-start-column="1" selection-end-line="11" selection-end-column="1" />
663
+        </state>
664
+      </provider>
665
+    </entry>
666
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java">
628
       <provider selected="true" editor-type-id="text-editor">
667
       <provider selected="true" editor-type-id="text-editor">
629
-        <state relative-caret-position="2235">
630
-          <caret line="149" column="49" lean-forward="true" selection-start-line="149" selection-start-column="49" selection-end-line="149" selection-end-column="49" />
668
+        <state relative-caret-position="75">
669
+          <caret line="5" column="52" selection-start-line="5" selection-start-column="52" selection-end-line="5" selection-end-column="52" />
631
           <folding>
670
           <folding>
632
-            <element signature="imports" expanded="true" />
633
-            <element signature="e#1385#1386#0" expanded="true" />
634
-            <element signature="e#1406#1407#0" expanded="true" />
635
-            <element signature="e#2852#2853#0" expanded="true" />
636
-            <element signature="e#2932#2933#0" expanded="true" />
671
+            <element signature="e#182#183#0" expanded="true" />
637
           </folding>
672
           </folding>
638
         </state>
673
         </state>
639
       </provider>
674
       </provider>

+ 13
- 3
Checkbook/src/main/java/Checkbook.java Bestand weergeven

13
         this.transactionList = transactionList;
13
         this.transactionList = transactionList;
14
     }
14
     }
15
 
15
 
16
+    public Checkbook(double cashAmount){
17
+        this.add(new Transaction("",new Payee(),TransactionType.DEBIT, cashAmount));
18
+    }
19
+
20
+    public Checkbook(Payee owner, double cashAmount){
21
+        this.add(new Transaction("",owner,TransactionType.DEBIT, cashAmount));
22
+    }
23
+
16
     public int size(){
24
     public int size(){
17
     return transactionList.size();
25
     return transactionList.size();
18
     }
26
     }
43
     }
51
     }
44
 
52
 
45
     public Transaction[] toArray(Transaction[] input) {
53
     public Transaction[] toArray(Transaction[] input) {
46
-        Transaction[] arr = transactionList.toArray(input);
47
-        return arr;
54
+        for (Transaction t : input) {
55
+            transactionList.add(t);
56
+        }
57
+        return transactionList.toArray(new Transaction[transactionList.size()]);
48
     }
58
     }
49
 
59
 
50
     public double checkbookValue() {
60
     public double checkbookValue() {
81
     public Transaction[] getAllCredit() {
91
     public Transaction[] getAllCredit() {
82
         ArrayList<Transaction> list = new ArrayList<>();
92
         ArrayList<Transaction> list = new ArrayList<>();
83
         for (Transaction t: transactionList) {
93
         for (Transaction t: transactionList) {
84
-            if(t.getType()==TransactionType.DEBIT) list.add(t);
94
+            if(t.getType()==TransactionType.CREDIT) list.add(t);
85
         }
95
         }
86
         return list.toArray(new Transaction[0]);
96
         return list.toArray(new Transaction[0]);
87
     }
97
     }

+ 7
- 1
Checkbook/src/main/java/GenericAccount.java Bestand weergeven

1
 
1
 
2
-public class GenericAccount {
2
+public class GenericAccount <T extends AccountBook>{
3
+
4
+    AccountBook accountBook;
5
+
6
+    public GenericAccount(AccountBook accountBook) {
7
+        this.accountBook = accountBook;
8
+    }
3
 }
9
 }

+ 15
- 5
Checkbook/src/test/java/CheckbookTest.java Bestand weergeven

13
     ArrayList<Transaction> list;
13
     ArrayList<Transaction> list;
14
     Transaction transaction = new Transaction("",new Payee(), TransactionType.DEBIT,1.50);
14
     Transaction transaction = new Transaction("",new Payee(), TransactionType.DEBIT,1.50);
15
     Transaction transaction2 =new Transaction("test", new Payee(), TransactionType.CREDIT, 50.50);
15
     Transaction transaction2 =new Transaction("test", new Payee(), TransactionType.CREDIT, 50.50);
16
-    Checkbook checkbookOneParam,
16
+    Checkbook checkbookOneParam = new Checkbook(3.00);
17
+    Checkbook checkbookTwoParam = new Checkbook(new Payee(), 5.00);
17
 
18
 
18
     @org.junit.Before
19
     @org.junit.Before
19
     public void setUp() throws Exception {
20
     public void setUp() throws Exception {
117
 
118
 
118
     @Test
119
     @Test
119
     public void toArrayparam2test(){
120
     public void toArrayparam2test(){
120
-        Transaction[] arr = new Transaction[0];
121
-        Transaction[] actual = checkbook2.toArray(arr);
122
-        Assert.assertEquals(Transaction[].class, actual.getClass());
121
+        Transaction[] arr = new Transaction[]{new Transaction("", new Payee(),TransactionType.DEBIT,3.00)};
122
+        Transaction[] actual = checkbook.toArray(arr);
123
+        Assert.assertEquals(3, actual.length);
123
     }
124
     }
124
 
125
 
125
     @Test
126
     @Test
126
     public void checkbookValue(){
127
     public void checkbookValue(){
127
        double actual = checkbook.checkbookValue();
128
        double actual = checkbook.checkbookValue();
128
-    Assert.assertEquals(-52.0, actual);
129
+    Assert.assertEquals(-49.0, actual);
129
     }
130
     }
130
 
131
 
131
     @Test
132
     @Test
151
         Assert.assertEquals(arr, checkbook.getAllCredit());
152
         Assert.assertEquals(arr, checkbook.getAllCredit());
152
     }
153
     }
153
 
154
 
155
+    @Test
156
+    public void constructorOneParam(){
157
+        Assert.assertEquals(1, checkbookOneParam.size());
158
+    }
159
+
160
+    @Test
161
+    public void constructorTwoParam(){
162
+        Assert.assertEquals(1, checkbookTwoParam.size());
163
+    }
154
 }
164
 }