Lauren Green 6 yıl önce
ebeveyn
işleme
fb450362e8

+ 445
- 202
.idea/workspace.xml Dosyayı Görüntüle

@@ -2,39 +2,192 @@
2 2
 <project version="4">
3 3
   <component name="ChangeListManager">
4 4
     <list default="true" id="926ad23d-2ddc-41ae-980d-780dcc1811fa" name="Default" comment="">
5
-      <change beforePath="$PROJECT_DIR$/README.md" afterPath="$PROJECT_DIR$/README.md" />
5
+      <change afterPath="$PROJECT_DIR$/Checkbook/src/test/java/GenericAccountTest.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$/Checkbook/src/main/java/AccountBook.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/Checkbook/src/main/java/Payee.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/Payee.java" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" afterDir="false" />
6 13
     </list>
7 14
     <ignored path="$PROJECT_DIR$/Checkbook/target/" />
8 15
     <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
9
-    <option name="TRACKING_ENABLED" value="true" />
10 16
     <option name="SHOW_DIALOG" value="false" />
11 17
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
12 18
     <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13 19
     <option name="LAST_RESOLUTION" value="IGNORE" />
14 20
   </component>
21
+  <component name="CoverageDataManager">
22
+    <SUITE FILE_PATH="coverage/Checkbook_OldStyle$All_in_Checkbook.ic" NAME="All in Checkbook Coverage Results" MODIFIED="1544056251776" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
23
+  </component>
24
+  <component name="CoverageViewManager">
25
+    <option name="myElementSize" value="246" />
26
+  </component>
27
+  <component name="DockManager">
28
+    <window id="1">
29
+      <content type="file-editors">
30
+        <state>
31
+          <leaf>
32
+            <file pinned="false" current-in-tab="true">
33
+              <entry file="file://$PROJECT_DIR$/README.md">
34
+                <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
35
+                  <state split_layout="SECOND">
36
+                    <first_editor relative-caret-position="585">
37
+                      <caret line="39" selection-start-line="39" selection-end-line="39" />
38
+                    </first_editor>
39
+                    <second_editor />
40
+                  </state>
41
+                </provider>
42
+              </entry>
43
+            </file>
44
+          </leaf>
45
+        </state>
46
+      </content>
47
+    </window>
48
+  </component>
49
+  <component name="FUSProjectUsageTrigger">
50
+    <session id="1584619133">
51
+      <usages-collector id="statistics.lifecycle.project">
52
+        <counts>
53
+          <entry key="project.open.time.1" value="1" />
54
+          <entry key="project.opened" value="1" />
55
+        </counts>
56
+      </usages-collector>
57
+      <usages-collector id="statistics.file.extensions.open">
58
+        <counts>
59
+          <entry key="java" value="17" />
60
+          <entry key="md" value="2" />
61
+        </counts>
62
+      </usages-collector>
63
+      <usages-collector id="statistics.file.types.open">
64
+        <counts>
65
+          <entry key="JAVA" value="17" />
66
+          <entry key="Markdown" value="2" />
67
+        </counts>
68
+      </usages-collector>
69
+      <usages-collector id="statistics.file.extensions.edit">
70
+        <counts>
71
+          <entry key="java" value="3753" />
72
+        </counts>
73
+      </usages-collector>
74
+      <usages-collector id="statistics.file.types.edit">
75
+        <counts>
76
+          <entry key="JAVA" value="3753" />
77
+        </counts>
78
+      </usages-collector>
79
+    </session>
80
+  </component>
15 81
   <component name="FileEditorManager">
16
-    <leaf>
17
-      <file leaf-file-name="README.md" pinned="false" current-in-tab="true">
18
-        <entry file="file://$PROJECT_DIR$/README.md">
19
-          <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
20
-            <state split_layout="SPLIT">
21
-              <first_editor relative-caret-position="588">
22
-                <caret line="39" column="0" lean-forward="false" selection-start-line="39" selection-start-column="0" selection-end-line="39" selection-end-column="0" />
23
-                <folding />
24
-              </first_editor>
25
-              <second_editor />
26
-            </state>
27
-          </provider>
28
-        </entry>
29
-      </file>
30
-    </leaf>
82
+    <splitter split-orientation="horizontal" split-proportion="0.30571613">
83
+      <split-first>
84
+        <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
85
+          <file pinned="false" current-in-tab="false">
86
+            <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Payee.java">
87
+              <provider selected="true" editor-type-id="text-editor">
88
+                <state relative-caret-position="330">
89
+                  <caret line="22" column="5" selection-start-line="22" selection-start-column="5" selection-end-line="22" selection-end-column="5" />
90
+                  <folding>
91
+                    <element signature="e#151#152#0" expanded="true" />
92
+                    <element signature="e#184#185#0" expanded="true" />
93
+                    <element signature="e#316#317#0" expanded="true" />
94
+                    <element signature="e#348#349#0" expanded="true" />
95
+                    <element signature="e#479#480#0" expanded="true" />
96
+                    <element signature="e#514#515#0" expanded="true" />
97
+                  </folding>
98
+                </state>
99
+              </provider>
100
+            </entry>
101
+          </file>
102
+          <file pinned="false" current-in-tab="true">
103
+            <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
104
+              <provider selected="true" editor-type-id="text-editor">
105
+                <state relative-caret-position="1950">
106
+                  <caret line="140" lean-forward="true" selection-start-line="140" selection-end-line="140" />
107
+                  <folding>
108
+                    <element signature="imports" expanded="true" />
109
+                  </folding>
110
+                </state>
111
+              </provider>
112
+            </entry>
113
+          </file>
114
+        </leaf>
115
+      </split-first>
116
+      <split-second>
117
+        <leaf>
118
+          <file pinned="false" current-in-tab="false">
119
+            <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
120
+              <provider selected="true" editor-type-id="text-editor">
121
+                <state relative-caret-position="436">
122
+                  <caret line="431" column="1" lean-forward="true" selection-end-line="431" selection-end-column="1" />
123
+                  <folding>
124
+                    <element signature="imports" expanded="true" />
125
+                    <element signature="e#1850#1851#0" expanded="true" />
126
+                    <element signature="e#1897#1898#0" expanded="true" />
127
+                  </folding>
128
+                </state>
129
+              </provider>
130
+            </entry>
131
+          </file>
132
+          <file pinned="false" current-in-tab="false">
133
+            <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java">
134
+              <provider selected="true" editor-type-id="text-editor">
135
+                <state relative-caret-position="138">
136
+                  <caret line="60" column="48" lean-forward="true" selection-start-line="60" selection-start-column="48" selection-end-line="60" selection-end-column="48" />
137
+                  <folding>
138
+                    <element signature="imports" expanded="true" />
139
+                    <element signature="e#733#734#0" expanded="true" />
140
+                    <element signature="e#760#761#0" expanded="true" />
141
+                    <element signature="e#580#581#0" expanded="true" />
142
+                    <element signature="e#619#620#0" expanded="true" />
143
+                    <element signature="e#651#652#0" expanded="true" />
144
+                    <element signature="e#685#686#0" expanded="true" />
145
+                    <element signature="e#730#731#0" expanded="true" />
146
+                    <element signature="e#774#775#0" expanded="true" />
147
+                    <element signature="e#1132#1133#0" expanded="true" />
148
+                    <element signature="e#1175#1176#0" expanded="true" />
149
+                    <element signature="e#3723#3724#0" expanded="true" />
150
+                    <element signature="e#3756#3757#0" expanded="true" />
151
+                    <element signature="e#3790#3791#0" expanded="true" />
152
+                    <element signature="e#3820#3821#0" expanded="true" />
153
+                  </folding>
154
+                </state>
155
+              </provider>
156
+            </entry>
157
+          </file>
158
+          <file pinned="false" current-in-tab="true">
159
+            <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/GenericAccountTest.java">
160
+              <provider selected="true" editor-type-id="text-editor">
161
+                <state relative-caret-position="6255">
162
+                  <caret line="417" column="7" lean-forward="true" selection-start-line="229" selection-start-column="6" selection-end-line="417" selection-end-column="7" />
163
+                  <folding>
164
+                    <element signature="imports" expanded="true" />
165
+                    <element signature="e#2330#2331#0" expanded="true" />
166
+                    <element signature="e#2377#2378#0" expanded="true" />
167
+                  </folding>
168
+                </state>
169
+              </provider>
170
+            </entry>
171
+          </file>
172
+          <file pinned="false" current-in-tab="false">
173
+            <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
174
+              <provider selected="true" editor-type-id="text-editor">
175
+                <state relative-caret-position="105">
176
+                  <caret line="7" column="30" lean-forward="true" selection-start-line="7" selection-start-column="30" selection-end-line="7" selection-end-column="30" />
177
+                </state>
178
+              </provider>
179
+            </entry>
180
+          </file>
181
+        </leaf>
182
+      </split-second>
183
+    </splitter>
31 184
   </component>
32 185
   <component name="FileTemplateManagerImpl">
33 186
     <option name="RECENT_TEMPLATES">
34 187
       <list>
35 188
         <option value="JUnit4 Test Class" />
36
-        <option value="Class" />
37 189
         <option value="Interface" />
190
+        <option value="Class" />
38 191
       </list>
39 192
     </option>
40 193
   </component>
@@ -42,9 +195,6 @@
42 195
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
43 196
   </component>
44 197
   <component name="GradleLocalSettings">
45
-    <option name="externalProjectsViewState">
46
-      <projects_view />
47
-    </option>
48 198
     <option name="projectSyncType">
49 199
       <map>
50 200
         <entry key="$USER_HOME$/GitHub/gs-gradle/initial" value="PREVIEW" />
@@ -54,14 +204,15 @@
54 204
   <component name="IdeDocumentHistory">
55 205
     <option name="CHANGED_PATHS">
56 206
       <list>
207
+        <option value="$PROJECT_DIR$/Checkbook/src/main/java/TransactionType.java" />
208
+        <option value="$PROJECT_DIR$/README.md" />
209
+        <option value="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" />
57 210
         <option value="$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java" />
58 211
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Payee.java" />
59 212
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java" />
60 213
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java" />
61
-        <option value="$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java" />
62 214
         <option value="$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java" />
63
-        <option value="$PROJECT_DIR$/Checkbook/src/main/java/TransactionType.java" />
64
-        <option value="$PROJECT_DIR$/README.md" />
215
+        <option value="$PROJECT_DIR$/Checkbook/src/test/java/GenericAccountTest.java" />
65 216
       </list>
66 217
     </option>
67 218
   </component>
@@ -71,31 +222,25 @@
71 222
     <detection-done>true</detection-done>
72 223
     <sorting>DEFINITION_ORDER</sorting>
73 224
   </component>
225
+  <component name="MavenImportPreferences">
226
+    <option name="importingSettings">
227
+      <MavenImportingSettings>
228
+        <option name="importAutomatically" value="true" />
229
+      </MavenImportingSettings>
230
+    </option>
231
+  </component>
74 232
   <component name="ProjectFrameBounds">
75
-    <option name="x" value="115" />
76
-    <option name="y" value="45" />
77
-    <option name="width" value="1538" />
78
-    <option name="height" value="962" />
233
+    <option name="x" value="-262" />
234
+    <option name="y" value="-1057" />
235
+    <option name="width" value="1913" />
236
+    <option name="height" value="947" />
79 237
   </component>
80 238
   <component name="ProjectView">
81
-    <navigator currentView="ProjectPane" proportions="" version="1">
82
-      <flattenPackages />
83
-      <showMembers />
84
-      <showModules />
85
-      <showLibraryContents />
86
-      <hideEmptyPackages />
87
-      <abbreviatePackageNames />
88
-      <autoscrollToSource />
89
-      <autoscrollFromSource />
90
-      <sortByType />
91
-      <manualOrder />
239
+    <navigator proportions="" version="1">
92 240
       <foldersAlwaysOnTop value="true" />
93 241
     </navigator>
94 242
     <panes>
95 243
       <pane id="Scope" />
96
-      <pane id="Scratches" />
97
-      <pane id="AndroidView" />
98
-      <pane id="PackagesPane" />
99 244
       <pane id="ProjectPane">
100 245
         <subPane>
101 246
           <expand>
@@ -129,23 +274,40 @@
129 274
               <item name="main" type="462c0819:PsiDirectoryNode" />
130 275
               <item name="java" type="462c0819:PsiDirectoryNode" />
131 276
             </path>
277
+            <path>
278
+              <item name="Checkbook-OldStyle" type="b2602c69:ProjectViewProjectNode" />
279
+              <item name="Checkbook-OldStyle" type="462c0819:PsiDirectoryNode" />
280
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
281
+              <item name="src" type="462c0819:PsiDirectoryNode" />
282
+              <item name="test" type="462c0819:PsiDirectoryNode" />
283
+            </path>
284
+            <path>
285
+              <item name="Checkbook-OldStyle" type="b2602c69:ProjectViewProjectNode" />
286
+              <item name="Checkbook-OldStyle" type="462c0819:PsiDirectoryNode" />
287
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
288
+              <item name="src" type="462c0819:PsiDirectoryNode" />
289
+              <item name="test" type="462c0819:PsiDirectoryNode" />
290
+              <item name="java" type="462c0819:PsiDirectoryNode" />
291
+            </path>
132 292
           </expand>
133 293
           <select />
134 294
         </subPane>
135 295
       </pane>
296
+      <pane id="PackagesPane" />
136 297
     </panes>
137 298
   </component>
138 299
   <component name="PropertiesComponent">
139
-    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
140
-    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
141 300
     <property name="WebServerToolWindowFactoryState" value="false" />
142 301
     <property name="aspect.path.notification.shown" value="true" />
143
-    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
302
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544057555361" />
303
+    <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
144 304
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
305
+    <property name="last_opened_file_path" value="$PROJECT_DIR$" />
306
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
145 307
     <property name="project.structure.last.edited" value="Modules" />
146 308
     <property name="project.structure.proportion" value="0.0" />
147 309
     <property name="project.structure.side.proportion" value="0.0" />
148
-    <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
310
+    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
149 311
   </component>
150 312
   <component name="RecentsManager">
151 313
     <key name="CreateTestDialog.RecentsKey">
@@ -167,90 +329,109 @@
167 329
       </list>
168 330
     </option>
169 331
   </component>
170
-  <component name="RunManager">
332
+  <component name="RunManager" selected="JUnit.All in Checkbook">
171 333
     <configuration default="true" type="Applet" factoryName="Applet">
172
-      <option name="WIDTH" value="400" />
173
-      <option name="HEIGHT" value="300" />
174 334
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
175
-      <module />
335
+      <method v="2">
336
+        <option name="Make" enabled="true" />
337
+      </method>
176 338
     </configuration>
177 339
     <configuration default="true" type="Application" factoryName="Application">
178
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
179
-      <option name="MAIN_CLASS_NAME" />
180
-      <option name="VM_PARAMETERS" />
181
-      <option name="PROGRAM_PARAMETERS" />
182 340
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
183
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
184
-      <option name="ALTERNATIVE_JRE_PATH" />
185
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
186
-      <option name="ENV_VARIABLES" />
187
-      <option name="PASS_PARENT_ENVS" value="true" />
188
-      <module name="" />
189
-      <envs />
341
+      <method v="2">
342
+        <option name="Make" enabled="true" />
343
+      </method>
190 344
     </configuration>
191
-    <configuration default="true" type="JUnit" factoryName="JUnit">
192
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
193
-      <module name="" />
194
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
195
-      <option name="ALTERNATIVE_JRE_PATH" />
196
-      <option name="PACKAGE_NAME" />
197
-      <option name="MAIN_CLASS_NAME" />
198
-      <option name="METHOD_NAME" />
199
-      <option name="TEST_OBJECT" value="class" />
200
-      <option name="VM_PARAMETERS" value="-ea" />
201
-      <option name="PARAMETERS" />
345
+    <configuration name="All in Checkbook" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
346
+      <module name="Checkbook" />
347
+      <option name="PACKAGE_NAME" value="" />
348
+      <option name="TEST_OBJECT" value="package" />
202 349
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
203
-      <option name="ENV_VARIABLES" />
204
-      <option name="PASS_PARENT_ENVS" value="true" />
205
-      <option name="TEST_SEARCH_SCOPE">
206
-        <value defaultName="singleModule" />
207
-      </option>
208
-      <envs />
209
-      <patterns />
350
+      <method v="2">
351
+        <option name="Make" enabled="true" />
352
+      </method>
210 353
     </configuration>
211
-    <configuration default="true" type="Remote" factoryName="Remote">
212
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
213
-      <option name="SERVER_MODE" value="false" />
214
-      <option name="SHMEM_ADDRESS" value="javadebug" />
215
-      <option name="HOST" value="localhost" />
216
-      <option name="PORT" value="5005" />
354
+    <configuration name="CheckbookTest.testRemoveAll" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
355
+      <module name="Checkbook" />
356
+      <option name="PACKAGE_NAME" value="" />
357
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
358
+      <option name="METHOD_NAME" value="testRemoveAll" />
359
+      <option name="TEST_OBJECT" value="method" />
360
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
361
+      <method v="2">
362
+        <option name="Make" enabled="true" />
363
+      </method>
364
+    </configuration>
365
+    <configuration name="CheckbookTest.testRemoveAll2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
366
+      <module name="Checkbook" />
367
+      <option name="PACKAGE_NAME" value="" />
368
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
369
+      <option name="METHOD_NAME" value="testRemoveAll2" />
370
+      <option name="TEST_OBJECT" value="method" />
371
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
372
+      <method v="2">
373
+        <option name="Make" enabled="true" />
374
+      </method>
375
+    </configuration>
376
+    <configuration name="CheckbookTest.testRemoveAll3" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
377
+      <module name="Checkbook" />
378
+      <option name="PACKAGE_NAME" value="" />
379
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
380
+      <option name="METHOD_NAME" value="testRemoveAll3" />
381
+      <option name="TEST_OBJECT" value="method" />
382
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
383
+      <method v="2">
384
+        <option name="Make" enabled="true" />
385
+      </method>
386
+    </configuration>
387
+    <configuration name="GenericAccountTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
388
+      <module name="Checkbook" />
389
+      <option name="PACKAGE_NAME" value="" />
390
+      <option name="MAIN_CLASS_NAME" value="GenericAccountTest" />
391
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
392
+      <method v="2">
393
+        <option name="Make" enabled="true" />
394
+      </method>
395
+    </configuration>
396
+    <configuration default="true" type="JUnit" factoryName="JUnit">
397
+      <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
398
+      <method v="2">
399
+        <option name="Make" enabled="true" />
400
+      </method>
217 401
     </configuration>
218 402
     <configuration default="true" type="TestNG" factoryName="TestNG">
219
-      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
220
-      <module name="" />
221
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
222
-      <option name="ALTERNATIVE_JRE_PATH" />
223
-      <option name="SUITE_NAME" />
224
-      <option name="PACKAGE_NAME" />
225
-      <option name="MAIN_CLASS_NAME" />
226
-      <option name="METHOD_NAME" />
227
-      <option name="GROUP_NAME" />
228
-      <option name="TEST_OBJECT" value="CLASS" />
229
-      <option name="VM_PARAMETERS" value="-ea" />
230
-      <option name="PARAMETERS" />
231 403
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
232
-      <option name="OUTPUT_DIRECTORY" />
233
-      <option name="ANNOTATION_TYPE" />
234
-      <option name="ENV_VARIABLES" />
235
-      <option name="PASS_PARENT_ENVS" value="true" />
236
-      <option name="TEST_SEARCH_SCOPE">
237
-        <value defaultName="singleModule" />
238
-      </option>
239
-      <option name="USE_DEFAULT_REPORTERS" value="false" />
240
-      <option name="PROPERTIES_FILE" />
241
-      <envs />
242 404
       <properties />
243 405
       <listeners />
406
+      <method v="2">
407
+        <option name="Make" enabled="true" />
408
+      </method>
244 409
     </configuration>
245 410
     <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
246 411
       <module name="" />
247 412
       <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
248 413
       <option name="PROGRAM_PARAMETERS" />
249 414
       <predefined_log_file id="idea.log" enabled="true" />
415
+      <method v="2">
416
+        <option name="Make" enabled="true" />
417
+      </method>
250 418
     </configuration>
251
-  </component>
252
-  <component name="ShelveChangesManager" show_recycled="false">
253
-    <option name="remove_strategy" value="false" />
419
+    <list>
420
+      <item itemvalue="JUnit.CheckbookTest.testRemoveAll" />
421
+      <item itemvalue="JUnit.CheckbookTest.testRemoveAll2" />
422
+      <item itemvalue="JUnit.CheckbookTest.testRemoveAll3" />
423
+      <item itemvalue="JUnit.All in Checkbook" />
424
+      <item itemvalue="JUnit.GenericAccountTest" />
425
+    </list>
426
+    <recent_temporary>
427
+      <list>
428
+        <item itemvalue="JUnit.All in Checkbook" />
429
+        <item itemvalue="JUnit.GenericAccountTest" />
430
+        <item itemvalue="JUnit.CheckbookTest.testRemoveAll3" />
431
+        <item itemvalue="JUnit.CheckbookTest.testRemoveAll2" />
432
+        <item itemvalue="JUnit.CheckbookTest.testRemoveAll" />
433
+      </list>
434
+    </recent_temporary>
254 435
   </component>
255 436
   <component name="SvnConfiguration">
256 437
     <configuration />
@@ -263,42 +444,78 @@
263 444
       <option name="presentableId" value="Default" />
264 445
       <updated>1543958631974</updated>
265 446
       <workItem from="1543958633447" duration="3259000" />
447
+      <workItem from="1544032952824" duration="15075000" />
266 448
     </task>
267 449
     <servers />
268 450
   </component>
451
+  <component name="TestHistory">
452
+    <history-entry file="CheckbookTest_testAddAll2 - 2018.12.05 at 18h 53m 04s.xml">
453
+      <configuration name="CheckbookTest.testAddAll2" configurationId="JUnit" />
454
+    </history-entry>
455
+    <history-entry file="CheckbookTest_testAddAll2 - 2018.12.05 at 18h 53m 33s.xml">
456
+      <configuration name="CheckbookTest.testAddAll2" configurationId="JUnit" />
457
+    </history-entry>
458
+    <history-entry file="CheckbookTest_testRemoveAll - 2018.12.05 at 18h 54m 36s.xml">
459
+      <configuration name="CheckbookTest.testRemoveAll" configurationId="JUnit" />
460
+    </history-entry>
461
+    <history-entry file="CheckbookTest_testRemoveAll2 - 2018.12.05 at 18h 55m 25s.xml">
462
+      <configuration name="CheckbookTest.testRemoveAll2" configurationId="JUnit" />
463
+    </history-entry>
464
+    <history-entry file="CheckbookTest_testRemoveAll3 - 2018.12.05 at 18h 55m 57s.xml">
465
+      <configuration name="CheckbookTest.testRemoveAll3" configurationId="JUnit" />
466
+    </history-entry>
467
+    <history-entry file="CheckbookTest_testRemoveAll3 - 2018.12.05 at 18h 56m 08s.xml">
468
+      <configuration name="CheckbookTest.testRemoveAll3" configurationId="JUnit" />
469
+    </history-entry>
470
+    <history-entry file="All_in_Checkbook - 2018.12.05 at 18h 56m 15s.xml">
471
+      <configuration name="All in Checkbook" configurationId="JUnit" />
472
+    </history-entry>
473
+    <history-entry file="All_in_Checkbook - 2018.12.05 at 18h 57m 41s.xml">
474
+      <configuration name="All in Checkbook" configurationId="JUnit" />
475
+    </history-entry>
476
+    <history-entry file="GenericAccountTest - 2018.12.05 at 19h 30m 40s.xml">
477
+      <configuration name="GenericAccountTest" configurationId="JUnit" />
478
+    </history-entry>
479
+    <history-entry file="All_in_Checkbook - 2018.12.05 at 19h 30m 54s.xml">
480
+      <configuration name="All in Checkbook" configurationId="JUnit" />
481
+    </history-entry>
482
+  </component>
269 483
   <component name="TimeTrackingManager">
270
-    <option name="totallyTimeSpent" value="3259000" />
484
+    <option name="totallyTimeSpent" value="18334000" />
271 485
   </component>
272 486
   <component name="ToolWindowManager">
273
-    <frame x="115" y="45" width="1538" height="962" extended-state="0" />
487
+    <frame x="-262" y="-1057" width="1913" height="947" extended-state="0" />
274 488
     <editor active="true" />
275 489
     <layout>
276
-      <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="-1" side_tool="false" content_ui="tabs" />
277
-      <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" />
278
-      <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="-1" side_tool="false" content_ui="tabs" />
279
-      <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="-1" side_tool="false" content_ui="tabs" />
280
-      <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="-1" side_tool="false" content_ui="tabs" />
281
-      <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="-1" side_tool="true" content_ui="tabs" />
282
-      <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="-1" side_tool="false" content_ui="tabs" />
283
-      <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" />
284
-      <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="-1" side_tool="false" content_ui="tabs" />
285
-      <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="-1" side_tool="false" content_ui="tabs" />
286
-      <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="-1" side_tool="false" content_ui="tabs" />
287
-      <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="-1" side_tool="false" content_ui="tabs" />
288
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.24966353" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
289
-      <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="-1" side_tool="false" content_ui="tabs" />
290
-      <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" />
291
-      <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" />
292
-      <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="-1" side_tool="false" content_ui="tabs" />
293
-      <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="-1" side_tool="false" content_ui="tabs" />
294
-      <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" />
295
-      <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="-1" side_tool="true" content_ui="tabs" />
296
-      <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" />
297
-      <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" />
298
-      <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" />
299
-      <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" />
300
-      <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" />
301
-      <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" />
490
+      <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.16782469" />
491
+      <window_info id="Structure" order="1" weight="0.25" />
492
+      <window_info id="Image Layers" order="2" />
493
+      <window_info id="Designer" order="3" />
494
+      <window_info id="UI Designer" order="4" />
495
+      <window_info id="Capture Tool" order="5" />
496
+      <window_info id="Favorites" order="6" side_tool="true" />
497
+      <window_info anchor="bottom" id="Database Changes" show_stripe_button="false" />
498
+      <window_info anchor="bottom" id="Messages" weight="0.32982457" />
499
+      <window_info anchor="bottom" id="Message" order="0" />
500
+      <window_info anchor="bottom" id="Find" order="1" weight="0.32982457" />
501
+      <window_info anchor="bottom" id="Run" order="2" visible="true" weight="0.32982457" />
502
+      <window_info anchor="bottom" id="Debug" order="3" weight="0.4" />
503
+      <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" />
504
+      <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" />
505
+      <window_info anchor="bottom" id="TODO" order="6" />
506
+      <window_info anchor="bottom" id="Terminal" order="7" />
507
+      <window_info anchor="bottom" id="Event Log" order="8" side_tool="true" />
508
+      <window_info anchor="bottom" id="Version Control" order="9" />
509
+      <window_info anchor="right" id="Coverage" side_tool="true" weight="0.3292357" />
510
+      <window_info anchor="right" id="Commander" order="0" weight="0.4" />
511
+      <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
512
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
513
+      <window_info anchor="right" id="Palette" order="3" />
514
+      <window_info anchor="right" id="Capture Analysis" order="4" />
515
+      <window_info anchor="right" id="Theme Preview" order="5" />
516
+      <window_info anchor="right" id="Database" order="6" />
517
+      <window_info anchor="right" id="Palette&#9;" order="7" />
518
+      <window_info anchor="right" id="Maven Projects" order="8" />
302 519
     </layout>
303 520
   </component>
304 521
   <component name="TypeScriptGeneratedFilesManager">
@@ -307,122 +524,148 @@
307 524
   <component name="VcsContentAnnotationSettings">
308 525
     <option name="myLimit" value="2678400000" />
309 526
   </component>
310
-  <component name="XDebuggerManager">
311
-    <breakpoint-manager />
312
-    <watches-manager />
313
-  </component>
314 527
   <component name="editorHistoryManager">
315
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
528
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/src.zip!/java/util/concurrent/atomic/AtomicReference.java" />
529
+    <entry file="file://$PROJECT_DIR$/Checkbook/pom.xml">
530
+      <provider selected="true" editor-type-id="text-editor" />
531
+    </entry>
532
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/Arrays.java">
316 533
       <provider selected="true" editor-type-id="text-editor">
317
-        <state relative-caret-position="170">
318
-          <caret line="10" column="5" lean-forward="false" selection-start-line="10" selection-start-column="5" selection-end-line="10" selection-end-column="5" />
319
-          <folding />
534
+        <state relative-caret-position="169">
535
+          <caret line="2815" column="26" selection-start-line="2815" selection-start-column="26" selection-end-line="2815" selection-end-column="26" />
320 536
         </state>
321 537
       </provider>
322 538
     </entry>
323
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Payee.java">
539
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/time/LocalDate.java">
324 540
       <provider selected="true" editor-type-id="text-editor">
325
-        <state relative-caret-position="357">
326
-          <caret line="21" column="0" lean-forward="false" selection-start-line="21" selection-start-column="0" selection-end-line="21" selection-end-column="0" />
327
-          <folding>
328
-            <element signature="e#151#152#0" expanded="true" />
329
-            <element signature="e#184#185#0" expanded="true" />
330
-            <element signature="e#236#237#0" expanded="true" />
331
-            <element signature="e#280#281#0" expanded="true" />
332
-            <element signature="e#316#317#0" expanded="true" />
333
-            <element signature="e#348#349#0" expanded="true" />
334
-            <element signature="e#398#399#0" expanded="true" />
335
-            <element signature="e#440#441#0" expanded="true" />
336
-            <element signature="e#479#480#0" expanded="true" />
337
-            <element signature="e#514#515#0" expanded="true" />
338
-            <element signature="e#570#571#0" expanded="true" />
339
-            <element signature="e#618#619#0" expanded="true" />
340
-          </folding>
541
+        <state relative-caret-position="-614">
542
+          <caret line="136" column="19" selection-start-line="136" selection-start-column="19" selection-end-line="136" selection-end-column="19" />
341 543
         </state>
342 544
       </provider>
343 545
     </entry>
344
-    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/src.zip!/java/util/concurrent/atomic/AtomicReference.java">
546
+    <entry file="jar:///Library/Java/JavaVirtualMachines/jdk1.8.0_191.jdk/Contents/Home/src.zip!/java/util/concurrent/atomic/AtomicReference.java">
345 547
       <provider selected="true" editor-type-id="text-editor">
346
-        <state relative-caret-position="134">
347
-          <caret line="47" column="3" lean-forward="true" selection-start-line="47" selection-start-column="3" selection-end-line="47" selection-end-column="3" />
348
-          <folding />
548
+        <state relative-caret-position="195">
549
+          <caret line="48" column="13" selection-start-line="48" selection-start-column="13" selection-end-line="48" selection-end-column="13" />
349 550
         </state>
350 551
       </provider>
351 552
     </entry>
352
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java">
353
-      <provider selected="true" editor-type-id="text-editor">
354
-        <state relative-caret-position="17">
355
-          <caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
356
-          <folding />
553
+    <entry file="file://$PROJECT_DIR$/README.md">
554
+      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
555
+        <state split_layout="SECOND">
556
+          <first_editor relative-caret-position="585">
557
+            <caret line="39" selection-start-line="39" selection-end-line="39" />
558
+          </first_editor>
559
+          <second_editor />
357 560
         </state>
358 561
       </provider>
359 562
     </entry>
360 563
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/TransactionType.java">
361 564
       <provider selected="true" editor-type-id="text-editor">
362
-        <state relative-caret-position="17">
363
-          <caret line="1" column="0" lean-forward="false" selection-start-line="1" selection-start-column="0" selection-end-line="1" selection-end-column="0" />
364
-          <folding />
565
+        <state relative-caret-position="15">
566
+          <caret line="1" selection-start-line="1" selection-end-line="1" />
567
+        </state>
568
+      </provider>
569
+    </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="105">
573
+          <caret line="7" column="30" lean-forward="true" selection-start-line="7" selection-start-column="30" selection-end-line="7" selection-end-column="30" />
365 574
         </state>
366 575
       </provider>
367 576
     </entry>
368 577
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Transaction.java">
369 578
       <provider selected="true" editor-type-id="text-editor">
370
-        <state relative-caret-position="442">
371
-          <caret line="26" column="18" lean-forward="true" selection-start-line="26" selection-start-column="0" selection-end-line="27" selection-end-column="0" />
579
+        <state relative-caret-position="195">
580
+          <caret line="13" column="25" lean-forward="true" selection-start-line="13" selection-start-column="25" selection-end-line="13" selection-end-column="25" />
372 581
           <folding>
373 582
             <element signature="imports" expanded="true" />
374 583
             <element signature="e#175#184#0" expanded="true" />
375 584
             <element signature="e#259#270#0" expanded="true" />
376
-            <element signature="e#689#690#0" expanded="true" />
377
-            <element signature="e#720#721#0" expanded="true" />
378 585
             <element signature="e#754#755#0" expanded="true" />
379 586
             <element signature="e#787#788#0" expanded="true" />
380 587
             <element signature="e#827#828#0" expanded="true" />
381 588
             <element signature="e#855#856#0" expanded="true" />
382 589
             <element signature="e#886#887#0" expanded="true" />
383 590
             <element signature="e#913#914#0" expanded="true" />
384
-            <element signature="e#953#954#0" expanded="true" />
385
-            <element signature="e#985#986#0" expanded="true" />
386 591
             <element signature="e#1016#1017#0" expanded="true" />
387 592
             <element signature="e#1044#1045#0" expanded="true" />
388
-            <element signature="e#1085#1086#0" expanded="true" />
389
-            <element signature="e#1119#1120#0" expanded="true" />
593
+            <element signature="e#1225#1226#0" expanded="true" />
594
+            <element signature="e#1254#1255#0" expanded="true" />
390 595
           </folding>
391 596
         </state>
392 597
       </provider>
393 598
     </entry>
394
-    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/AccountBook.java">
599
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Payee.java">
395 600
       <provider selected="true" editor-type-id="text-editor">
396
-        <state relative-caret-position="204">
397
-          <caret line="12" column="0" lean-forward="true" selection-start-line="12" selection-start-column="0" selection-end-line="12" selection-end-column="0" />
398
-          <folding />
601
+        <state relative-caret-position="330">
602
+          <caret line="22" column="5" selection-start-line="22" selection-start-column="5" selection-end-line="22" selection-end-column="5" />
603
+          <folding>
604
+            <element signature="e#151#152#0" expanded="true" />
605
+            <element signature="e#184#185#0" expanded="true" />
606
+            <element signature="e#316#317#0" expanded="true" />
607
+            <element signature="e#348#349#0" expanded="true" />
608
+            <element signature="e#479#480#0" expanded="true" />
609
+            <element signature="e#514#515#0" expanded="true" />
610
+          </folding>
399 611
         </state>
400 612
       </provider>
401 613
     </entry>
402 614
     <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/Checkbook.java">
403 615
       <provider selected="true" editor-type-id="text-editor">
404
-        <state relative-caret-position="51">
405
-          <caret line="3" column="0" lean-forward="false" selection-start-line="3" selection-start-column="0" selection-end-line="3" selection-end-column="0" />
406
-          <folding />
616
+        <state relative-caret-position="1950">
617
+          <caret line="140" lean-forward="true" selection-start-line="140" selection-end-line="140" />
618
+          <folding>
619
+            <element signature="imports" expanded="true" />
620
+          </folding>
407 621
         </state>
408 622
       </provider>
409 623
     </entry>
410
-    <entry file="file://$PROJECT_DIR$/Checkbook/pom.xml">
624
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/CheckbookTest.java">
411 625
       <provider selected="true" editor-type-id="text-editor">
412
-        <state relative-caret-position="0">
413
-          <caret line="0" column="0" lean-forward="false" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
414
-          <folding />
626
+        <state relative-caret-position="436">
627
+          <caret line="431" column="1" lean-forward="true" selection-end-line="431" selection-end-column="1" />
628
+          <folding>
629
+            <element signature="imports" expanded="true" />
630
+            <element signature="e#1850#1851#0" expanded="true" />
631
+            <element signature="e#1897#1898#0" expanded="true" />
632
+          </folding>
415 633
         </state>
416 634
       </provider>
417 635
     </entry>
418
-    <entry file="file://$PROJECT_DIR$/README.md">
419
-      <provider selected="true" editor-type-id="split-provider[text-editor;markdown-preview-editor]">
420
-        <state split_layout="SPLIT">
421
-          <first_editor relative-caret-position="588">
422
-            <caret line="39" column="0" lean-forward="false" selection-start-line="39" selection-start-column="0" selection-end-line="39" selection-end-column="0" />
423
-            <folding />
424
-          </first_editor>
425
-          <second_editor />
636
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/main/java/GenericAccount.java">
637
+      <provider selected="true" editor-type-id="text-editor">
638
+        <state relative-caret-position="138">
639
+          <caret line="60" column="48" lean-forward="true" selection-start-line="60" selection-start-column="48" selection-end-line="60" selection-end-column="48" />
640
+          <folding>
641
+            <element signature="imports" expanded="true" />
642
+            <element signature="e#733#734#0" expanded="true" />
643
+            <element signature="e#760#761#0" expanded="true" />
644
+            <element signature="e#580#581#0" expanded="true" />
645
+            <element signature="e#619#620#0" expanded="true" />
646
+            <element signature="e#651#652#0" expanded="true" />
647
+            <element signature="e#685#686#0" expanded="true" />
648
+            <element signature="e#730#731#0" expanded="true" />
649
+            <element signature="e#774#775#0" expanded="true" />
650
+            <element signature="e#1132#1133#0" expanded="true" />
651
+            <element signature="e#1175#1176#0" expanded="true" />
652
+            <element signature="e#3723#3724#0" expanded="true" />
653
+            <element signature="e#3756#3757#0" expanded="true" />
654
+            <element signature="e#3790#3791#0" expanded="true" />
655
+            <element signature="e#3820#3821#0" expanded="true" />
656
+          </folding>
657
+        </state>
658
+      </provider>
659
+    </entry>
660
+    <entry file="file://$PROJECT_DIR$/Checkbook/src/test/java/GenericAccountTest.java">
661
+      <provider selected="true" editor-type-id="text-editor">
662
+        <state relative-caret-position="6255">
663
+          <caret line="417" column="7" lean-forward="true" selection-start-line="229" selection-start-column="6" selection-end-line="417" selection-end-column="7" />
664
+          <folding>
665
+            <element signature="imports" expanded="true" />
666
+            <element signature="e#2330#2331#0" expanded="true" />
667
+            <element signature="e#2377#2378#0" expanded="true" />
668
+          </folding>
426 669
         </state>
427 670
       </provider>
428 671
     </entry>

+ 0
- 3
Checkbook/src/main/java/AccountBook.java Dosyayı Görüntüle

@@ -1,12 +1,9 @@
1 1
 import java.time.LocalDate;
2 2
 
3 3
 public interface AccountBook {
4
-    public Integer getId();
5 4
     public LocalDate getDate();
6 5
     public TransactionType getType();
7 6
     public String getMemo() ;
8
-    public void setMemo(String memo);
9 7
     public Payee getPayee();
10
-    public void setPayee(Payee payee);
11 8
     public Double getAmount();
12 9
 }

+ 145
- 1
Checkbook/src/main/java/Checkbook.java Dosyayı Görüntüle

@@ -1,5 +1,149 @@
1
+import java.time.LocalDate;
2
+import java.util.ArrayList;
3
+import java.util.Collection;
4
+import java.util.Iterator;
5
+import java.util.List;
6
+
1 7
 public class Checkbook {
2 8
 
3
-    //blind us with your Java eloquence....
9
+    Payee owner;
10
+    double balance;
11
+    List<Transaction> checkbook;
12
+
13
+    public Checkbook(double cashAmount) {
14
+        this.balance = cashAmount;
15
+        this.checkbook = new ArrayList<>();
16
+    }
17
+
18
+    public Checkbook(Payee owner, double cashAmount) {
19
+        this.owner = owner;
20
+        this.balance = cashAmount;
21
+        this.checkbook = new ArrayList<>();
22
+    }
23
+
24
+    public int size() {
25
+        return checkbook.size();
26
+    }
27
+
28
+    public boolean isEmpty() {
29
+        return size() == 0;
30
+    }
31
+
32
+    public boolean contains(Transaction t){
33
+        return checkbook.contains(t);
34
+    }
35
+
36
+    public boolean add(Transaction t){
37
+        boolean result = checkbook.add(t);
38
+        this.balance = checkbookValue();
39
+        return result;
40
+    }
41
+
42
+    public boolean remove(Transaction t){
43
+        boolean result = checkbook.remove(t);
44
+        this.balance = checkbookValue();
45
+        return result;
46
+    }
47
+
48
+    public Iterator<Transaction> iterator(){
49
+        return checkbook.iterator();
50
+    }
51
+
52
+    public Transaction[] toArray() {
53
+        return toArray(checkbook);
54
+    }
55
+
56
+    public static Transaction[] toArray(List<Transaction> transactions) {
57
+        Transaction[] array = new Transaction[transactions.size()];
58
+        int index = 0;
59
+
60
+        for(Transaction t: transactions) {
61
+            array[index] = t;
62
+            index++;
63
+        }
64
+        return array;
65
+    }
66
+
67
+    public double checkbookValue() {
68
+        double value = this.balance;
69
+        for(Transaction t: checkbook) {
70
+            if(t.getType().equals(TransactionType.CREDIT))
71
+                value -= t.getAmount();
72
+            if(t.getType().equals(TransactionType.DEBIT))
73
+                value += t.getAmount();
74
+        }
75
+        return value;
76
+    }
77
+
78
+    public Transaction[] getTransactionsForDate(LocalDate aDate) {
79
+        ArrayList<Transaction> result = new ArrayList<>();
80
+        for(Transaction t: checkbook) {
81
+            if(t.getDate().equals(aDate))
82
+                result.add(t);
83
+        }
84
+        return toArray(result);
85
+    }
86
+
87
+    public Transaction[] getTransactionsForPayee(Payee payee) {
88
+        ArrayList<Transaction> result = new ArrayList<>();
89
+        for(Transaction t: checkbook) {
90
+            if(t.getPayee().equals(payee))
91
+                result.add(t);
92
+        }
93
+        return toArray(result);
94
+    }
95
+
96
+    public Transaction[] getAllDebitTransactions() {
97
+        ArrayList<Transaction> result = new ArrayList<>();
98
+        for(Transaction t: checkbook) {
99
+            if(t.getType() == TransactionType.DEBIT)
100
+                result.add(t);
101
+        }
102
+        return toArray(result);
103
+    }
104
+
105
+    public Transaction[] getAllCreditTransactions() {
106
+        ArrayList<Transaction> result = new ArrayList<>();
107
+        for(Transaction t: checkbook) {
108
+            if(t.getType() == TransactionType.CREDIT)
109
+                result.add(t);
110
+        }
111
+        return toArray(result);
112
+    }
113
+
114
+    public boolean containsAll(Collection c){
115
+        for(Object o : c) {
116
+            if(!contains((Transaction) o))
117
+                return false;
118
+        }
119
+        return true;
120
+    }
121
+
122
+    public boolean addAll(Collection c){
123
+        for(Object o : c) {
124
+            boolean result = add((Transaction) o);
125
+            if(!result) {
126
+                return false;
127
+            }
128
+        }
129
+        return true;
130
+    }
131
+
132
+    public boolean removeAll(Collection c){
133
+        for(Object o : c) {
134
+            boolean result = remove((Transaction) o);
135
+            if(!result) {
136
+                return false;
137
+            }
138
+        }
139
+        return true;
140
+    }
141
+
142
+    public void clear() {
143
+        checkbook.clear();
144
+    }
4 145
 
146
+    public double getBalance() {
147
+        return balance;
148
+    }
5 149
 }

+ 164
- 1
Checkbook/src/main/java/GenericAccount.java Dosyayı Görüntüle

@@ -1,3 +1,166 @@
1
+import java.lang.reflect.Array;
2
+import java.time.LocalDate;
3
+import java.util.ArrayList;
4
+import java.util.Collection;
5
+import java.util.Iterator;
6
+import java.util.List;
7
+
8
+public class GenericAccount<T extends AccountBook> {
9
+
10
+    Payee owner;
11
+    double balance;
12
+    List<T> accountRecord;
13
+    Class<T> type;
14
+
15
+    public GenericAccount(double cashAmount, Class<T> type) {
16
+        this.balance = cashAmount;
17
+        this.accountRecord = new ArrayList<>();
18
+        this.type = type;
19
+    }
20
+
21
+    public GenericAccount(Payee owner, double cashAmount, Class<T> type) {
22
+        this.owner = owner;
23
+        this.balance = cashAmount;
24
+        this.accountRecord = new ArrayList<>();
25
+        this.type = type;
26
+    }
27
+
28
+    public Class<T> getClassType() {
29
+        return type;
30
+    }
31
+
32
+    public int size() {
33
+        return accountRecord.size();
34
+    }
35
+
36
+    public boolean isEmpty() {
37
+        return size() == 0;
38
+    }
39
+
40
+    public boolean contains(T t){
41
+        return accountRecord.contains(t);
42
+    }
43
+
44
+    public boolean add(T t){
45
+        boolean result = accountRecord.add(t);
46
+        this.balance = accountRecordValue();
47
+        return result;
48
+    }
49
+
50
+    public boolean remove(T t){
51
+        boolean result = accountRecord.remove(t);
52
+        this.balance = accountRecordValue();
53
+        return result;
54
+    }
55
+
56
+    public Iterator<T> iterator(){
57
+        return accountRecord.iterator();
58
+    }
59
+
60
+    public T[] toArray() {
61
+        T[] array = (T[]) Array.newInstance(type, accountRecord.size());
62
+        int index = 0;
63
+
64
+        for(T t: accountRecord) {
65
+            array[index] = t;
66
+            index++;
67
+        }
68
+        return array;
69
+    }
70
+
71
+    public T[] toArray(List<T> ts, Class<T> c) {
72
+        T[] array = (T[]) Array.newInstance(c, ts.size());
73
+        int index = 0;
74
+
75
+        for(T t: ts) {
76
+            array[index] = t;
77
+            index++;
78
+        }
79
+        return array;
80
+    }
81
+
82
+    public double accountRecordValue() {
83
+        double value = this.balance;
84
+        for(T t: accountRecord) {
85
+            if(t.getType().equals(TransactionType.CREDIT))
86
+                value -= t.getAmount();
87
+            if(t.getType().equals(TransactionType.DEBIT))
88
+                value += t.getAmount();
89
+        }
90
+        return value;
91
+    }
92
+
93
+    public T[] getTransactionsForDate(LocalDate aDate) {
94
+        ArrayList<T> result = new ArrayList<>();
95
+        for(T t: accountRecord) {
96
+            if(t.getDate().equals(aDate))
97
+                result.add(t);
98
+        }
99
+
100
+        return toArray(result, type);
101
+    }
102
+
103
+    public T[] getTransactionsForPayee(Payee payee) {
104
+        ArrayList<T> result = new ArrayList<>();
105
+        for(T t: accountRecord) {
106
+            if(t.getPayee().equals(payee))
107
+                result.add(t);
108
+        }
109
+        return toArray(result, type);
110
+    }
111
+
112
+    public T[] getAllDebitTransactions() {
113
+        ArrayList<T> result = new ArrayList<>();
114
+        for(T t: accountRecord) {
115
+            if(t.getType() == TransactionType.DEBIT)
116
+                result.add(t);
117
+        }
118
+        return toArray(result, type);
119
+    }
120
+
121
+    public T[] getAllCreditTransactions() {
122
+        ArrayList<T> result = new ArrayList<>();
123
+        for(T t: accountRecord) {
124
+            if(t.getType() == TransactionType.CREDIT)
125
+                result.add(t);
126
+        }
127
+        return toArray(result, type);
128
+    }
129
+
130
+    public boolean containsAll(Collection c){
131
+        for(Object o : c) {
132
+            if(!contains((T) o))
133
+                return false;
134
+        }
135
+        return true;
136
+    }
137
+
138
+    public boolean addAll(Collection c){
139
+        for(Object o : c) {
140
+            boolean result = add((T) o);
141
+            if(!result) {
142
+                return false;
143
+            }
144
+        }
145
+        return true;
146
+    }
147
+
148
+    public boolean removeAll(Collection c){
149
+        for(Object o : c) {
150
+            boolean result = remove((T) o);
151
+            if(!result) {
152
+                return false;
153
+            }
154
+        }
155
+        return true;
156
+    }
157
+
158
+    public void clear() {
159
+        accountRecord.clear();
160
+    }
161
+
162
+    public double getBalance() {
163
+        return balance;
164
+    }
1 165
 
2
-public class GenericAccount {
3 166
 }

+ 17
- 10
Checkbook/src/main/java/Payee.java Dosyayı Görüntüle

@@ -4,28 +4,35 @@ public class Payee {
4 4
     private String givenName;
5 5
     private String emailAddress;
6 6
 
7
-    public String getFamilyName() {
8
-        return familyName;
7
+    public Payee(String familyName, String givenName, String emailAddress){
8
+        this.familyName = familyName;
9
+        this.givenName = givenName;
10
+        this.emailAddress = emailAddress;
9 11
     }
10 12
 
11
-    public void setFamilyName(String familyName) {
12
-        this.familyName = familyName;
13
+    public String getFamilyName() {
14
+        return familyName;
13 15
     }
14 16
 
15 17
     public String getGivenName() {
16 18
         return givenName;
17 19
     }
18 20
 
19
-    public void setGivenName(String givenName) {
20
-        this.givenName = givenName;
21
-    }
22
-
23 21
     public String getEmailAddress() {
24 22
         return emailAddress;
25 23
     }
26 24
 
27
-    public void setEmailAddress(String emailAddress) {
28
-        this.emailAddress = emailAddress;
25
+    @Override
26
+    public boolean equals(Object o) {
27
+        Payee otherPayee = (Payee) o;
28
+        if(!(otherPayee.getFamilyName().equals(familyName)))
29
+            return false;
30
+        if(!otherPayee.getEmailAddress().equals(emailAddress))
31
+            return false;
32
+        if(!otherPayee.getGivenName().equals(givenName))
33
+            return false;
34
+
35
+        return true;
29 36
     }
30 37
     // ... and a bunch more hidden stuff: for testing purposes only
31 38
 

+ 19
- 19
Checkbook/src/main/java/Transaction.java Dosyayı Görüntüle

@@ -1,9 +1,9 @@
1 1
 import java.time.LocalDate;
2 2
 import java.util.concurrent.atomic.AtomicReference;
3 3
 
4
-public class Transaction {
4
+public class Transaction implements AccountBook{
5 5
     private final AtomicReference<Integer> id = new AtomicReference<Integer>();
6
-    private final AtomicReference<LocalDate> date = new AtomicReference<LocalDate>();
6
+    private final AtomicReference<LocalDate> date = new AtomicReference<LocalDate>(LocalDate.now());
7 7
     private String memo;
8 8
     private Payee payee;
9 9
     private TransactionType typee; // Credit (reduces the checkbook), Debit (increases the checkbook)
@@ -13,11 +13,7 @@ public class Transaction {
13 13
         this.typee = typee;
14 14
         this.memo = memo;
15 15
         this.payee = payee;
16
-        this.amount = amount;
17
-    }
18
-
19
-    public Integer getId() {
20
-        return id.get();
16
+        this.amount = ((typee.equals(TransactionType.DEBIT)) ? amount : (-1 * amount));
21 17
     }
22 18
 
23 19
     public LocalDate getDate() {
@@ -32,22 +28,26 @@ public class Transaction {
32 28
         return memo;
33 29
     }
34 30
 
35
-    public void setMemo(String memo) {
36
-        this.memo = memo;
37
-    }
38
-
39 31
     public Payee getPayee() {
40 32
         return payee;
41 33
     }
42 34
 
43
-    public void setPayee(Payee payee) {
44
-        this.payee = payee;
45
-    }
46
-
47 35
     public Double getAmount() {
48
-        if (this.typee == TransactionType.DEBIT) {
49
-            return amount;
50
-        }
51
-        return (-1.0 * amount);
36
+        return amount;
37
+    }
38
+
39
+    @Override
40
+    public boolean equals(Object o) {
41
+        Transaction otherTransaction = (Transaction) o;
42
+        if(!(otherTransaction.getType() == typee))
43
+            return false;
44
+        if(!otherTransaction.getPayee().equals(payee))
45
+            return false;
46
+        if(!(otherTransaction.getAmount() == amount))
47
+            return false;
48
+        if(!otherTransaction.getMemo().equals(memo))
49
+            return false;
50
+
51
+        return true;
52 52
     }
53 53
 }

+ 420
- 0
Checkbook/src/test/java/CheckbookTest.java Dosyayı Görüntüle

@@ -1,9 +1,429 @@
1
+import org.junit.Test;
2
+
3
+import java.time.LocalDate;
4
+import java.util.ArrayList;
5
+import java.util.Arrays;
6
+import java.util.Iterator;
7
+import java.util.concurrent.atomic.AtomicReference;
8
+
1 9
 import static org.junit.Assert.*;
2 10
 
3 11
 public class CheckbookTest {
4 12
 
13
+    Payee Lauren;
14
+    Payee Dan;
15
+    Payee Hayden;
16
+    Checkbook checkbook;
17
+    Transaction transaction1;
18
+    Transaction transaction2;
19
+    Transaction transaction3;
20
+    Transaction transaction4;
21
+    Transaction transaction5;
22
+    Transaction transaction6;
23
+
5 24
     @org.junit.Before
6 25
     public void setUp() throws Exception {
26
+        Lauren = new Payee("Green", "Lauren", "lauren@email");
27
+        Dan = new Payee("Green", "Dan", "dan@email");
28
+        Hayden = new Payee("Stewart", "Hayden", "hayden@email");
29
+        transaction1 = new Transaction("Pizza", Dan, TransactionType.CREDIT, 15.50);
30
+        transaction2 = new Transaction("Cheesesteaks", Dan, TransactionType.CREDIT, 22.75);
31
+        transaction3 = new Transaction("Hot Dogs", Dan, TransactionType.DEBIT, 5.25);
32
+        transaction4 = new Transaction("Phillies Tickets", Hayden, TransactionType.CREDIT, 45.00);
33
+        transaction5 = new Transaction("Eagles Tickets", Hayden, TransactionType.DEBIT, 150.00);
34
+        transaction6 = new Transaction("Movie Tickets", Lauren, TransactionType.DEBIT, 22.99);
35
+        checkbook = new Checkbook(Lauren, 5000);
36
+    }
37
+
38
+    @Test
39
+    public void testConstructor() {
40
+        Checkbook checkbook2 = new Checkbook(500);
41
+        double expected = 500;
42
+        double actual = checkbook2.getBalance();
43
+        assertEquals(expected, actual);
44
+    }
45
+
46
+    @Test
47
+    public void testAddandContains1() {
48
+        checkbook.add(transaction1);
49
+        assertTrue(checkbook.contains(transaction1));
50
+    }
51
+
52
+    @Test
53
+    public void testAddandContains2() {
54
+        checkbook.add(transaction1);
55
+        checkbook.add(transaction2);
56
+        assertTrue(checkbook.contains(transaction2));
57
+    }
58
+
59
+    @Test
60
+    public void testAddandContains3() {
61
+        checkbook.add(transaction3);
62
+        checkbook.add(transaction1);
63
+        assertTrue(checkbook.contains(transaction1));
64
+    }
65
+
66
+    @Test
67
+    public void testContainsFalse() {
68
+        checkbook.add(transaction3);
69
+        checkbook.add(transaction1);
70
+        assertFalse(checkbook.contains(transaction2));
71
+    }
72
+
73
+    @Test
74
+    public void testIsEmpty() {
75
+        assertTrue(checkbook.isEmpty());
76
+    }
77
+
78
+    @Test
79
+    public void testIsEmptyAndRemove() {
80
+        checkbook.add(transaction3);
81
+        checkbook.remove(transaction3);
82
+        assertTrue(checkbook.isEmpty());
83
+    }
84
+
85
+    @Test
86
+    public void testIsEmptyAndClear() {
87
+        checkbook.add(transaction3);
88
+        checkbook.clear();
89
+        assertTrue(checkbook.isEmpty());
90
+    }
91
+
92
+    @Test
93
+    public void testIsEmptyFalse() {
94
+        checkbook.add(transaction3);
95
+        assertFalse(checkbook.isEmpty());
96
+    }
97
+
98
+    @Test
99
+    public void testToArray() {
100
+        checkbook.add(transaction3);
101
+        Transaction[] expected = {transaction3};
102
+        Transaction[] actual = checkbook.toArray();
103
+
104
+        assertTrue(Arrays.equals(expected, actual));
105
+    }
106
+
107
+    @Test
108
+    public void testToArray2() {
109
+        checkbook.add(transaction3);
110
+        checkbook.add(transaction5);
111
+        Transaction[] expected = {transaction3, transaction5};
112
+        Transaction[] actual = checkbook.toArray();
113
+
114
+        assertTrue(Arrays.equals(expected, actual));
115
+    }
116
+
117
+    @Test
118
+    public void testToArray3() {
119
+        checkbook.add(transaction3);
120
+        checkbook.add(transaction5);
121
+        checkbook.add(transaction6);
122
+        Transaction[] expected = {transaction3, transaction5, transaction6};
123
+        Transaction[] actual = checkbook.toArray();
124
+
125
+        assertTrue(Arrays.equals(expected, actual));
126
+    }
127
+
128
+    @Test
129
+    public void testIterator() {
130
+        checkbook.add(transaction3);
131
+        checkbook.add(transaction5);
132
+        checkbook.add(transaction6);
133
+        Iterator<Transaction> it = checkbook.iterator();
134
+        Transaction expected = transaction3;
135
+        Transaction actual = it.next();
136
+
137
+        assertEquals(expected, actual);
138
+    }
139
+
140
+    @Test
141
+    public void testIterator2() {
142
+        checkbook.add(transaction3);
143
+        checkbook.add(transaction5);
144
+        checkbook.add(transaction6);
145
+        Iterator<Transaction> it = checkbook.iterator();
146
+        Transaction expected = transaction5;
147
+        it.next();
148
+        Transaction actual = it.next();
149
+
150
+        assertEquals(expected, actual);
151
+    }
152
+
153
+    @Test
154
+    public void testIterator3() {
155
+        checkbook.add(transaction3);
156
+        checkbook.add(transaction5);
157
+        checkbook.add(transaction6);
158
+        Iterator<Transaction> it = checkbook.iterator();
159
+        Transaction expected = transaction6;
160
+        it.next();
161
+        it.next();
162
+        Transaction actual = it.next();
163
+
164
+        assertEquals(expected, actual);
165
+    }
166
+
167
+    @Test
168
+    public void testForDate() {
169
+        checkbook.add(transaction3);
170
+        Transaction[] expected = {transaction3};
171
+        Transaction[] actual = checkbook.getTransactionsForDate(LocalDate.now());
172
+
173
+        assertTrue(Arrays.equals(expected, actual));
174
+    }
175
+
176
+    @Test
177
+    public void testForDate2() {
178
+        checkbook.add(transaction3);
179
+        checkbook.add(transaction5);
180
+        Transaction[] expected = {transaction3, transaction5};
181
+        Transaction[] actual = checkbook.getTransactionsForDate(LocalDate.now());
182
+
183
+        assertTrue(Arrays.equals(expected, actual));
184
+    }
185
+
186
+    @Test
187
+    public void testForDate3() {
188
+        checkbook.add(transaction3);
189
+        checkbook.add(transaction5);
190
+        checkbook.add(transaction6);
191
+        Transaction[] expected = {transaction3, transaction5, transaction6};
192
+        Transaction[] actual = checkbook.getTransactionsForDate(LocalDate.now());
193
+
194
+        assertTrue(Arrays.equals(expected, actual));
195
+    }
196
+
197
+    @Test
198
+    public void testForPayee1() {
199
+        checkbook.add(transaction1);
200
+        checkbook.add(transaction2);
201
+        checkbook.add(transaction3);
202
+        checkbook.add(transaction4);
203
+        checkbook.add(transaction5);
204
+        checkbook.add(transaction6);
205
+        Transaction[] expected = {transaction1, transaction2, transaction3};
206
+        Transaction[] actual = checkbook.getTransactionsForPayee(Dan);
207
+
208
+        assertTrue(Arrays.equals(expected, actual));
209
+    }
210
+
211
+    @Test
212
+    public void testForPayee2() {
213
+        checkbook.add(transaction1);
214
+        checkbook.add(transaction2);
215
+        checkbook.add(transaction3);
216
+        checkbook.add(transaction4);
217
+        checkbook.add(transaction5);
218
+        checkbook.add(transaction6);
219
+        Transaction[] expected = {transaction4, transaction5};
220
+        Transaction[] actual = checkbook.getTransactionsForPayee(Hayden);
221
+
222
+        assertTrue(Arrays.equals(expected, actual));
223
+    }
224
+
225
+    @Test
226
+    public void testForPayee3() {
227
+        checkbook.add(transaction1);
228
+        checkbook.add(transaction2);
229
+        checkbook.add(transaction3);
230
+        checkbook.add(transaction4);
231
+        checkbook.add(transaction5);
232
+        checkbook.add(transaction6);
233
+        Transaction[] expected = {transaction6};
234
+        Transaction[] actual = checkbook.getTransactionsForPayee(Lauren);
235
+
236
+        assertTrue(Arrays.equals(expected, actual));
237
+    }
238
+
239
+    @Test
240
+    public void testAllCredits() {
241
+        checkbook.add(transaction1);
242
+        checkbook.add(transaction2);
243
+        checkbook.add(transaction3);
244
+        checkbook.add(transaction4);
245
+        checkbook.add(transaction5);
246
+        checkbook.add(transaction6);
247
+        Transaction[] expected = {transaction1, transaction2, transaction4};
248
+        Transaction[] actual = checkbook.getAllCreditTransactions();
249
+
250
+        assertTrue(Arrays.equals(expected, actual));
251
+    }
252
+
253
+    @Test
254
+    public void testAllCredits2() {
255
+        checkbook.add(transaction1);
256
+        checkbook.add(transaction2);
257
+        checkbook.add(transaction3);
258
+        Transaction[] expected = {transaction1, transaction2};
259
+        Transaction[] actual = checkbook.getAllCreditTransactions();
260
+
261
+        assertTrue(Arrays.equals(expected, actual));
262
+    }
263
+
264
+    @Test
265
+    public void testAllCredits3() {
266
+        checkbook.add(transaction1);
267
+        Transaction[] expected = {transaction1};
268
+        Transaction[] actual = checkbook.getAllCreditTransactions();
269
+
270
+        assertTrue(Arrays.equals(expected, actual));
271
+    }
272
+
273
+    @Test
274
+    public void testAllDebits() {
275
+        checkbook.add(transaction1);
276
+        checkbook.add(transaction2);
277
+        checkbook.add(transaction3);
278
+        checkbook.add(transaction4);
279
+        checkbook.add(transaction5);
280
+        checkbook.add(transaction6);
281
+        Transaction[] expected = {transaction3, transaction5, transaction6};
282
+        Transaction[] actual = checkbook.getAllDebitTransactions();
283
+
284
+        assertTrue(Arrays.equals(expected, actual));
285
+    }
286
+
287
+    @Test
288
+    public void testAllDebits2() {
289
+        checkbook.add(transaction1);
290
+        checkbook.add(transaction2);
291
+        checkbook.add(transaction3);
292
+        Transaction[] expected = {transaction3};
293
+        Transaction[] actual = checkbook.getAllDebitTransactions();
294
+
295
+        assertTrue(Arrays.equals(expected, actual));
296
+    }
297
+
298
+    @Test
299
+    public void testAllDebits3() {
300
+        checkbook.add(transaction3);
301
+        Transaction[] expected = {transaction3};
302
+        Transaction[] actual = checkbook.getAllDebitTransactions();
303
+
304
+        assertTrue(Arrays.equals(expected, actual));
305
+    }
306
+
307
+    @Test
308
+    public void testContainsAll() {
309
+        checkbook.add(transaction1);
310
+        checkbook.add(transaction2);
311
+        checkbook.add(transaction3);
312
+        checkbook.add(transaction4);
313
+        checkbook.add(transaction5);
314
+        checkbook.add(transaction6);
315
+        ArrayList<Transaction> testArray = new ArrayList<>();
316
+        testArray.add(transaction1);
317
+        testArray.add(transaction3);
318
+        testArray.add(transaction5);
319
+
320
+        assertTrue(checkbook.containsAll(testArray));
321
+    }
322
+
323
+    @Test
324
+    public void testContainsAll2() {
325
+        checkbook.add(transaction1);
326
+        checkbook.add(transaction2);
327
+        checkbook.add(transaction3);
328
+        ArrayList<Transaction> testArray = new ArrayList<>();
329
+        testArray.add(transaction1);
330
+        testArray.add(transaction3);
331
+        testArray.add(transaction5);
332
+
333
+        assertFalse(checkbook.containsAll(testArray));
334
+    }
335
+
336
+    @Test
337
+    public void testContainsAll3() {
338
+        checkbook.add(transaction1);
339
+        checkbook.add(transaction2);
340
+        checkbook.add(transaction3);
341
+        ArrayList<Transaction> testArray = new ArrayList<>();
342
+        testArray.add(transaction1);
343
+        testArray.add(transaction3);
344
+
345
+        assertTrue(checkbook.containsAll(testArray));
346
+    }
347
+
348
+    @Test
349
+    public void testAddAll() {
350
+        ArrayList<Transaction> testArray = new ArrayList<>();
351
+        testArray.add(transaction1);
352
+        testArray.add(transaction3);
353
+        testArray.add(transaction5);
354
+        checkbook.addAll(testArray);
355
+
356
+        assertTrue(checkbook.containsAll(testArray));
357
+    }
358
+
359
+    @Test
360
+    public void testAddAll2() {
361
+        ArrayList<Transaction> testArray = new ArrayList<>();
362
+        testArray.add(transaction1);
363
+        testArray.add(transaction3);
364
+        testArray.add(transaction5);
365
+        testArray.add(transaction2);
366
+        checkbook.addAll(testArray);
367
+
368
+        assertTrue(checkbook.containsAll(testArray));
369
+    }
370
+
371
+    @Test
372
+    public void testAddAll3() {
373
+        checkbook.add(transaction1);
374
+        checkbook.add(transaction2);
375
+        checkbook.add(transaction3);
376
+        ArrayList<Transaction> testArray = new ArrayList<>();
377
+        testArray.add(transaction4);
378
+        testArray.add(transaction5);
379
+        testArray.add(transaction6);
380
+        checkbook.addAll(testArray);
381
+
382
+        assertTrue(checkbook.containsAll(testArray));
383
+    }
384
+
385
+    @Test
386
+    public void testRemoveAll() {
387
+        checkbook.add(transaction1);
388
+        checkbook.add(transaction2);
389
+        checkbook.add(transaction3);
390
+        checkbook.add(transaction4);
391
+        checkbook.add(transaction5);
392
+        checkbook.add(transaction6);
393
+        ArrayList<Transaction> testArray = new ArrayList<>();
394
+        testArray.add(transaction1);
395
+        testArray.add(transaction3);
396
+        testArray.add(transaction5);
397
+        checkbook.removeAll(testArray);
398
+
399
+        assertFalse(checkbook.containsAll(testArray));
400
+    }
401
+
402
+    @Test
403
+    public void testRemoveAll2() {
404
+        checkbook.add(transaction1);
405
+        checkbook.add(transaction2);
406
+        checkbook.add(transaction3);
407
+        ArrayList<Transaction> testArray = new ArrayList<>();
408
+        testArray.add(transaction1);
409
+        testArray.add(transaction3);
410
+        testArray.add(transaction2);
411
+        checkbook.removeAll(testArray);
412
+
413
+        assertTrue(checkbook.isEmpty());
414
+    }
415
+
416
+    @Test
417
+    public void testRemoveAll3() {
418
+        checkbook.add(transaction1);
419
+        checkbook.add(transaction2);
420
+        checkbook.add(transaction3);
421
+        ArrayList<Transaction> testArray = new ArrayList<>();
422
+        testArray.add(transaction1);
423
+        testArray.add(transaction2);
424
+        checkbook.removeAll(testArray);
425
+
426
+        assertFalse(checkbook.containsAll(testArray));
7 427
     }
8 428
 
9 429
     @org.junit.After

+ 423
- 0
Checkbook/src/test/java/GenericAccountTest.java Dosyayı Görüntüle

@@ -0,0 +1,423 @@
1
+import org.junit.Test;
2
+
3
+import java.time.LocalDate;
4
+import java.util.ArrayList;
5
+import java.util.Arrays;
6
+import java.util.Iterator;
7
+
8
+import static org.junit.Assert.*;
9
+
10
+public class GenericAccountTest {
11
+
12
+    Payee Lauren;
13
+    Payee Dan;
14
+    Payee Hayden;
15
+    GenericAccount genericAccount;
16
+    Transaction transaction1;
17
+    Transaction transaction2;
18
+    Transaction transaction3;
19
+    Transaction transaction4;
20
+    Transaction transaction5;
21
+    Transaction transaction6;
22
+
23
+    @org.junit.Before
24
+    public void setUp() throws Exception {
25
+        Lauren = new Payee("Green", "Lauren", "lauren@email");
26
+        Dan = new Payee("Green", "Dan", "dan@email");
27
+        Hayden = new Payee("Stewart", "Hayden", "hayden@email");
28
+        transaction1 = new Transaction("Pizza", Dan, TransactionType.CREDIT, 15.50);
29
+        transaction2 = new Transaction("Cheesesteaks", Dan, TransactionType.CREDIT, 22.75);
30
+        transaction3 = new Transaction("Hot Dogs", Dan, TransactionType.DEBIT, 5.25);
31
+        transaction4 = new Transaction("Phillies Tickets", Hayden, TransactionType.CREDIT, 45.00);
32
+        transaction5 = new Transaction("Eagles Tickets", Hayden, TransactionType.DEBIT, 150.00);
33
+        transaction6 = new Transaction("Movie Tickets", Lauren, TransactionType.DEBIT, 22.99);
34
+        genericAccount = new GenericAccount<Transaction>(Lauren, 5000, Transaction.class);
35
+    }
36
+
37
+    @Test
38
+    public void testAddandContains1() {
39
+        genericAccount.add(transaction1);
40
+        assertTrue(genericAccount.contains(transaction1));
41
+    }
42
+
43
+    @Test
44
+    public void testAddandContains2() {
45
+        genericAccount.add(transaction1);
46
+        genericAccount.add(transaction2);
47
+        assertTrue(genericAccount.contains(transaction2));
48
+    }
49
+
50
+    @Test
51
+    public void testAddandContains3() {
52
+        genericAccount.add(transaction3);
53
+        genericAccount.add(transaction1);
54
+        assertTrue(genericAccount.contains(transaction1));
55
+    }
56
+
57
+    @Test
58
+    public void testContainsFalse() {
59
+        genericAccount.add(transaction3);
60
+        genericAccount.add(transaction1);
61
+        assertFalse(genericAccount.contains(transaction2));
62
+    }
63
+
64
+    @Test
65
+    public void testIsEmpty() {
66
+        assertTrue(genericAccount.isEmpty());
67
+    }
68
+
69
+    @Test
70
+    public void testIsEmptyAndRemove() {
71
+        genericAccount.add(transaction3);
72
+        genericAccount.remove(transaction3);
73
+        assertTrue(genericAccount.isEmpty());
74
+    }
75
+
76
+    @Test
77
+    public void testIsEmptyAndClear() {
78
+        genericAccount.add(transaction3);
79
+        genericAccount.clear();
80
+        assertTrue(genericAccount.isEmpty());
81
+    }
82
+
83
+    @Test
84
+    public void testIsEmptyFalse() {
85
+        genericAccount.add(transaction3);
86
+        assertFalse(genericAccount.isEmpty());
87
+    }
88
+
89
+    @Test
90
+    public void testToArray() {
91
+        genericAccount.add(transaction3);
92
+        Transaction[] expected = {transaction3};
93
+        AccountBook[] actual = genericAccount.toArray();
94
+
95
+        assertTrue(Arrays.equals(expected, actual));
96
+    }
97
+
98
+    @Test
99
+    public void testToArray2() {
100
+        genericAccount.add(transaction3);
101
+        genericAccount.add(transaction5);
102
+        Transaction[] expected = {transaction3, transaction5};
103
+        AccountBook[] actual = genericAccount.toArray();
104
+
105
+        assertTrue(Arrays.equals(expected, actual));
106
+    }
107
+
108
+    @Test
109
+    public void testToArray3() {
110
+        genericAccount.add(transaction3);
111
+        genericAccount.add(transaction5);
112
+        genericAccount.add(transaction6);
113
+        AccountBook[] expected = {transaction3, transaction5, transaction6};
114
+        AccountBook[] actual = genericAccount.toArray();
115
+
116
+        assertTrue(Arrays.equals(expected, actual));
117
+    }
118
+
119
+    @Test
120
+    public void testIterator() {
121
+        genericAccount.add(transaction3);
122
+        genericAccount.add(transaction5);
123
+        genericAccount.add(transaction6);
124
+        Iterator<Transaction> it = genericAccount.iterator();
125
+        Transaction expected = transaction3;
126
+        Transaction actual = it.next();
127
+
128
+        assertEquals(expected, actual);
129
+    }
130
+
131
+    @Test
132
+    public void testIterator2() {
133
+        genericAccount.add(transaction3);
134
+        genericAccount.add(transaction5);
135
+        genericAccount.add(transaction6);
136
+        Iterator<Transaction> it = genericAccount.iterator();
137
+        Transaction expected = transaction5;
138
+        it.next();
139
+        Transaction actual = it.next();
140
+
141
+        assertEquals(expected, actual);
142
+    }
143
+
144
+    @Test
145
+    public void testIterator3() {
146
+        genericAccount.add(transaction3);
147
+        genericAccount.add(transaction5);
148
+        genericAccount.add(transaction6);
149
+        Iterator<Transaction> it = genericAccount.iterator();
150
+        Transaction expected = transaction6;
151
+        it.next();
152
+        it.next();
153
+        Transaction actual = it.next();
154
+
155
+        assertEquals(expected, actual);
156
+    }
157
+
158
+    @Test
159
+    public void testForDate() {
160
+        genericAccount.add(transaction3);
161
+        Transaction[] expected = {transaction3};
162
+        AccountBook[] actual = genericAccount.getTransactionsForDate(LocalDate.now());
163
+
164
+        assertTrue(Arrays.equals(expected, actual));
165
+    }
166
+
167
+    @Test
168
+    public void testForDate2() {
169
+        genericAccount.add(transaction3);
170
+        genericAccount.add(transaction5);
171
+        Transaction[] expected = {transaction3, transaction5};
172
+        AccountBook[] actual = genericAccount.getTransactionsForDate(LocalDate.now());
173
+
174
+        assertTrue(Arrays.equals(expected, actual));
175
+    }
176
+
177
+    @Test
178
+    public void testForDate3() {
179
+        genericAccount.add(transaction3);
180
+        genericAccount.add(transaction5);
181
+        genericAccount.add(transaction6);
182
+        Transaction[] expected = {transaction3, transaction5, transaction6};
183
+        AccountBook[] actual = genericAccount.getTransactionsForDate(LocalDate.now());
184
+
185
+        assertTrue(Arrays.equals(expected, actual));
186
+    }
187
+
188
+    @Test
189
+    public void testForPayee1() {
190
+        genericAccount.add(transaction1);
191
+        genericAccount.add(transaction2);
192
+        genericAccount.add(transaction3);
193
+        genericAccount.add(transaction4);
194
+        genericAccount.add(transaction5);
195
+        genericAccount.add(transaction6);
196
+        Transaction[] expected = {transaction1, transaction2, transaction3};
197
+        AccountBook[] actual = genericAccount.getTransactionsForPayee(Dan);
198
+
199
+        assertTrue(Arrays.equals(expected, actual));
200
+    }
201
+
202
+    @Test
203
+    public void testForPayee2() {
204
+        genericAccount.add(transaction1);
205
+        genericAccount.add(transaction2);
206
+        genericAccount.add(transaction3);
207
+        genericAccount.add(transaction4);
208
+        genericAccount.add(transaction5);
209
+        genericAccount.add(transaction6);
210
+        Transaction[] expected = {transaction4, transaction5};
211
+        AccountBook[] actual = genericAccount.getTransactionsForPayee(Hayden);
212
+
213
+        assertTrue(Arrays.equals(expected, actual));
214
+    }
215
+
216
+    @Test
217
+    public void testForPayee3() {
218
+        genericAccount.add(transaction1);
219
+        genericAccount.add(transaction2);
220
+        genericAccount.add(transaction3);
221
+        genericAccount.add(transaction4);
222
+        genericAccount.add(transaction5);
223
+        genericAccount.add(transaction6);
224
+        Transaction[] expected = {transaction6};
225
+        AccountBook[] actual = genericAccount.getTransactionsForPayee(Lauren);
226
+
227
+        assertTrue(Arrays.equals(expected, actual));
228
+    }
229
+
230
+    @Test
231
+    public void testAllCredits() {
232
+        genericAccount.add(transaction1);
233
+        genericAccount.add(transaction2);
234
+        genericAccount.add(transaction3);
235
+        genericAccount.add(transaction4);
236
+        genericAccount.add(transaction5);
237
+        genericAccount.add(transaction6);
238
+        Transaction[] expected = {transaction1, transaction2, transaction4};
239
+        AccountBook[] actual = genericAccount.getAllCreditTransactions();
240
+
241
+        assertTrue(Arrays.equals(expected, actual));
242
+    }
243
+
244
+    @Test
245
+    public void testAllCredits2() {
246
+        genericAccount.add(transaction1);
247
+        genericAccount.add(transaction2);
248
+        genericAccount.add(transaction3);
249
+        Transaction[] expected = {transaction1, transaction2};
250
+        AccountBook[] actual = genericAccount.getAllCreditTransactions();
251
+
252
+        assertTrue(Arrays.equals(expected, actual));
253
+    }
254
+
255
+    @Test
256
+    public void testAllCredits3() {
257
+        genericAccount.add(transaction1);
258
+        Transaction[] expected = {transaction1};
259
+        AccountBook[] actual = genericAccount.getAllCreditTransactions();
260
+
261
+        assertTrue(Arrays.equals(expected, actual));
262
+    }
263
+
264
+    @Test
265
+    public void testAllDebits() {
266
+        genericAccount.add(transaction1);
267
+        genericAccount.add(transaction2);
268
+        genericAccount.add(transaction3);
269
+        genericAccount.add(transaction4);
270
+        genericAccount.add(transaction5);
271
+        genericAccount.add(transaction6);
272
+        Transaction[] expected = {transaction3, transaction5, transaction6};
273
+        AccountBook[] actual = genericAccount.getAllDebitTransactions();
274
+
275
+        assertTrue(Arrays.equals(expected, actual));
276
+    }
277
+
278
+    @Test
279
+    public void testAllDebits2() {
280
+        genericAccount.add(transaction1);
281
+        genericAccount.add(transaction2);
282
+        genericAccount.add(transaction3);
283
+        Transaction[] expected = {transaction3};
284
+        AccountBook[] actual = genericAccount.getAllDebitTransactions();
285
+
286
+        assertTrue(Arrays.equals(expected, actual));
287
+    }
288
+
289
+    @Test
290
+    public void testAllDebits3() {
291
+        genericAccount.add(transaction3);
292
+        Transaction[] expected = {transaction3};
293
+        AccountBook[] actual = genericAccount.getAllDebitTransactions();
294
+
295
+        assertTrue(Arrays.equals(expected, actual));
296
+    }
297
+
298
+    @Test
299
+    public void testContainsAll() {
300
+        genericAccount.add(transaction1);
301
+        genericAccount.add(transaction2);
302
+        genericAccount.add(transaction3);
303
+        genericAccount.add(transaction4);
304
+        genericAccount.add(transaction5);
305
+        genericAccount.add(transaction6);
306
+        ArrayList<Transaction> testArray = new ArrayList<>();
307
+        testArray.add(transaction1);
308
+        testArray.add(transaction3);
309
+        testArray.add(transaction5);
310
+
311
+        assertTrue(genericAccount.containsAll(testArray));
312
+    }
313
+
314
+    @Test
315
+    public void testContainsAll2() {
316
+        genericAccount.add(transaction1);
317
+        genericAccount.add(transaction2);
318
+        genericAccount.add(transaction3);
319
+        ArrayList<Transaction> testArray = new ArrayList<>();
320
+        testArray.add(transaction1);
321
+        testArray.add(transaction3);
322
+        testArray.add(transaction5);
323
+
324
+        assertFalse(genericAccount.containsAll(testArray));
325
+    }
326
+
327
+    @Test
328
+    public void testContainsAll3() {
329
+        genericAccount.add(transaction1);
330
+        genericAccount.add(transaction2);
331
+        genericAccount.add(transaction3);
332
+        ArrayList<Transaction> testArray = new ArrayList<>();
333
+        testArray.add(transaction1);
334
+        testArray.add(transaction3);
335
+
336
+        assertTrue(genericAccount.containsAll(testArray));
337
+    }
338
+
339
+    @Test
340
+    public void testAddAll() {
341
+        ArrayList<Transaction> testArray = new ArrayList<>();
342
+        testArray.add(transaction1);
343
+        testArray.add(transaction3);
344
+        testArray.add(transaction5);
345
+        genericAccount.addAll(testArray);
346
+
347
+        assertTrue(genericAccount.containsAll(testArray));
348
+    }
349
+
350
+    @Test
351
+    public void testAddAll2() {
352
+        ArrayList<Transaction> testArray = new ArrayList<>();
353
+        testArray.add(transaction1);
354
+        testArray.add(transaction3);
355
+        testArray.add(transaction5);
356
+        testArray.add(transaction2);
357
+        genericAccount.addAll(testArray);
358
+
359
+        assertTrue(genericAccount.containsAll(testArray));
360
+    }
361
+
362
+    @Test
363
+    public void testAddAll3() {
364
+        genericAccount.add(transaction1);
365
+        genericAccount.add(transaction2);
366
+        genericAccount.add(transaction3);
367
+        ArrayList<Transaction> testArray = new ArrayList<>();
368
+        testArray.add(transaction4);
369
+        testArray.add(transaction5);
370
+        testArray.add(transaction6);
371
+        genericAccount.addAll(testArray);
372
+
373
+        assertTrue(genericAccount.containsAll(testArray));
374
+    }
375
+
376
+    @Test
377
+    public void testRemoveAll() {
378
+        genericAccount.add(transaction1);
379
+        genericAccount.add(transaction2);
380
+        genericAccount.add(transaction3);
381
+        genericAccount.add(transaction4);
382
+        genericAccount.add(transaction5);
383
+        genericAccount.add(transaction6);
384
+        ArrayList<Transaction> testArray = new ArrayList<>();
385
+        testArray.add(transaction1);
386
+        testArray.add(transaction3);
387
+        testArray.add(transaction5);
388
+        genericAccount.removeAll(testArray);
389
+
390
+        assertFalse(genericAccount.containsAll(testArray));
391
+    }
392
+
393
+    @Test
394
+    public void testRemoveAll2() {
395
+        genericAccount.add(transaction1);
396
+        genericAccount.add(transaction2);
397
+        genericAccount.add(transaction3);
398
+        ArrayList<Transaction> testArray = new ArrayList<>();
399
+        testArray.add(transaction1);
400
+        testArray.add(transaction3);
401
+        testArray.add(transaction2);
402
+        genericAccount.removeAll(testArray);
403
+
404
+        assertTrue(genericAccount.isEmpty());
405
+    }
406
+
407
+    @Test
408
+    public void testRemoveAll3() {
409
+        genericAccount.add(transaction1);
410
+        genericAccount.add(transaction2);
411
+        genericAccount.add(transaction3);
412
+        ArrayList<Transaction> testArray = new ArrayList<>();
413
+        testArray.add(transaction1);
414
+        testArray.add(transaction2);
415
+        genericAccount.removeAll(testArray);
416
+
417
+        assertFalse(genericAccount.containsAll(testArray));
418
+    }
419
+
420
+    @org.junit.After
421
+    public void tearDown() throws Exception {
422
+    }
423
+}