Browse Source

need to fix one method

thulasi 6 years ago
parent
commit
a98f70e46c

+ 16
- 0
Checkbook/.idea/compiler.xml View File

@@ -0,0 +1,16 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="CompilerConfiguration">
4
+    <annotationProcessing>
5
+      <profile name="Maven default annotation processors profile" enabled="true">
6
+        <sourceOutputDir name="target/generated-sources/annotations" />
7
+        <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
8
+        <outputRelativeToContentRoot value="true" />
9
+        <module name="Checkbook" />
10
+      </profile>
11
+    </annotationProcessing>
12
+    <bytecodeTargetLevel>
13
+      <module name="Checkbook" target="1.8" />
14
+    </bytecodeTargetLevel>
15
+  </component>
16
+</project>

+ 13
- 0
Checkbook/.idea/libraries/Maven__junit_junit_4_0.xml View File

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

+ 13
- 0
Checkbook/.idea/misc.xml View File

@@ -0,0 +1,13 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="MavenProjectsManager">
4
+    <option name="originalFiles">
5
+      <list>
6
+        <option value="$PROJECT_DIR$/pom.xml" />
7
+      </list>
8
+    </option>
9
+  </component>
10
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
11
+    <output url="file://$PROJECT_DIR$/classes" />
12
+  </component>
13
+</project>

+ 8
- 0
Checkbook/.idea/modules.xml View File

@@ -0,0 +1,8 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ProjectModuleManager">
4
+    <modules>
5
+      <module fileurl="file://$PROJECT_DIR$/Checkbook.iml" filepath="$PROJECT_DIR$/Checkbook.iml" />
6
+    </modules>
7
+  </component>
8
+</project>

+ 6
- 0
Checkbook/.idea/vcs.xml View File

@@ -0,0 +1,6 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="VcsDirectoryMappings">
4
+    <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
5
+  </component>
6
+</project>

+ 563
- 0
Checkbook/.idea/workspace.xml View File

@@ -0,0 +1,563 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<project version="4">
3
+  <component name="ChangeListManager">
4
+    <list default="true" id="6740fffe-7f4d-4976-ad48-af24e6914f17" name="Default Changelist" comment="">
5
+      <change afterPath="$PROJECT_DIR$/.idea/libraries/Maven__junit_junit_4_0.xml" afterDir="false" />
6
+      <change afterPath="$PROJECT_DIR$/.idea/modules.xml" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/Checkbook.iml" beforeDir="false" afterPath="$PROJECT_DIR$/Checkbook.iml" afterDir="false" />
8
+      <change beforePath="$PROJECT_DIR$/src/main/java/Checkbook.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Checkbook.java" afterDir="false" />
9
+      <change beforePath="$PROJECT_DIR$/src/main/java/GenericAccount.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/GenericAccount.java" afterDir="false" />
10
+      <change beforePath="$PROJECT_DIR$/src/main/java/Payee.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Payee.java" afterDir="false" />
11
+      <change beforePath="$PROJECT_DIR$/src/main/java/Transaction.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/Transaction.java" afterDir="false" />
12
+      <change beforePath="$PROJECT_DIR$/src/test/java/CheckbookTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/test/java/CheckbookTest.java" afterDir="false" />
13
+    </list>
14
+    <ignored path="$PROJECT_DIR$/target/" />
15
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
16
+    <option name="SHOW_DIALOG" value="false" />
17
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
18
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
19
+    <option name="LAST_RESOLUTION" value="IGNORE" />
20
+  </component>
21
+  <component name="FUSProjectUsageTrigger">
22
+    <session id="-406354203">
23
+      <usages-collector id="statistics.lifecycle.project">
24
+        <counts>
25
+          <entry key="project.closed" value="2" />
26
+          <entry key="project.open.time.16" value="1" />
27
+          <entry key="project.open.time.3" value="1" />
28
+          <entry key="project.open.time.4" value="1" />
29
+          <entry key="project.opened" value="3" />
30
+        </counts>
31
+      </usages-collector>
32
+      <usages-collector id="statistics.file.extensions.open">
33
+        <counts>
34
+          <entry key="java" value="10" />
35
+        </counts>
36
+      </usages-collector>
37
+      <usages-collector id="statistics.file.types.open">
38
+        <counts>
39
+          <entry key="JAVA" value="10" />
40
+        </counts>
41
+      </usages-collector>
42
+      <usages-collector id="statistics.file.extensions.edit">
43
+        <counts>
44
+          <entry key="java" value="3480" />
45
+        </counts>
46
+      </usages-collector>
47
+      <usages-collector id="statistics.file.types.edit">
48
+        <counts>
49
+          <entry key="JAVA" value="3480" />
50
+        </counts>
51
+      </usages-collector>
52
+    </session>
53
+  </component>
54
+  <component name="FileEditorManager">
55
+    <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
56
+      <file pinned="false" current-in-tab="false">
57
+        <entry file="file://$PROJECT_DIR$/src/main/java/Checkbook.java">
58
+          <provider selected="true" editor-type-id="text-editor">
59
+            <state relative-caret-position="231">
60
+              <caret line="119" column="53" selection-start-line="119" selection-start-column="53" selection-end-line="119" selection-end-column="53" />
61
+              <folding>
62
+                <element signature="imports" expanded="true" />
63
+                <element signature="e#841#842#0" expanded="true" />
64
+                <element signature="e#889#890#0" expanded="true" />
65
+                <element signature="e#1105#1106#0" expanded="true" />
66
+                <element signature="e#1186#1187#0" expanded="true" />
67
+                <element signature="e#3231#3232#0" expanded="true" />
68
+                <element signature="e#3265#3266#0" expanded="true" />
69
+                <element signature="e#3355#3356#0" expanded="true" />
70
+                <element signature="e#3389#3390#0" expanded="true" />
71
+                <element signature="e#3477#3478#0" expanded="true" />
72
+                <element signature="e#3511#3512#0" expanded="true" />
73
+              </folding>
74
+            </state>
75
+          </provider>
76
+        </entry>
77
+      </file>
78
+      <file pinned="false" current-in-tab="true">
79
+        <entry file="file://$PROJECT_DIR$/src/test/java/CheckbookTest.java">
80
+          <provider selected="true" editor-type-id="text-editor">
81
+            <state relative-caret-position="231">
82
+              <caret line="467" column="25" lean-forward="true" selection-start-line="467" selection-start-column="25" selection-end-line="467" selection-end-column="25" />
83
+              <folding>
84
+                <element signature="imports" expanded="true" />
85
+              </folding>
86
+            </state>
87
+          </provider>
88
+        </entry>
89
+      </file>
90
+      <file pinned="false" current-in-tab="false">
91
+        <entry file="file://$PROJECT_DIR$/src/main/java/Payee.java">
92
+          <provider selected="true" editor-type-id="text-editor">
93
+            <state relative-caret-position="345">
94
+              <caret line="35" column="37" selection-start-line="35" selection-start-column="37" selection-end-line="35" selection-end-column="37" />
95
+              <folding>
96
+                <element signature="e#1143#1144#0" expanded="true" />
97
+                <element signature="e#1215#1216#0" expanded="true" />
98
+              </folding>
99
+            </state>
100
+          </provider>
101
+        </entry>
102
+      </file>
103
+      <file pinned="false" current-in-tab="false">
104
+        <entry file="file://$PROJECT_DIR$/src/main/java/GenericAccount.java">
105
+          <provider selected="true" editor-type-id="text-editor">
106
+            <state relative-caret-position="15">
107
+              <caret line="1" column="29" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
108
+            </state>
109
+          </provider>
110
+        </entry>
111
+      </file>
112
+      <file pinned="false" current-in-tab="false">
113
+        <entry file="file://$PROJECT_DIR$/src/main/java/Transaction.java">
114
+          <provider selected="true" editor-type-id="text-editor">
115
+            <state relative-caret-position="60">
116
+              <caret line="6" column="31" selection-start-line="6" selection-start-column="31" selection-end-line="6" selection-end-column="31" />
117
+              <folding>
118
+                <element signature="e#715#716#0" expanded="true" />
119
+                <element signature="e#746#747#0" expanded="true" />
120
+                <element signature="e#780#781#0" expanded="true" />
121
+                <element signature="e#813#814#0" expanded="true" />
122
+                <element signature="e#853#854#0" expanded="true" />
123
+                <element signature="e#881#882#0" expanded="true" />
124
+                <element signature="e#912#913#0" expanded="true" />
125
+                <element signature="e#939#940#0" expanded="true" />
126
+                <element signature="e#979#980#0" expanded="true" />
127
+                <element signature="e#1011#1012#0" expanded="true" />
128
+                <element signature="e#1042#1043#0" expanded="true" />
129
+                <element signature="e#1070#1071#0" expanded="true" />
130
+                <element signature="e#1111#1112#0" expanded="true" />
131
+                <element signature="e#1145#1146#0" expanded="true" />
132
+                <element signature="e#1846#1847#0" expanded="true" />
133
+                <element signature="e#1919#1920#0" expanded="true" />
134
+              </folding>
135
+            </state>
136
+          </provider>
137
+        </entry>
138
+      </file>
139
+    </leaf>
140
+  </component>
141
+  <component name="Git.Settings">
142
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
143
+  </component>
144
+  <component name="IdeDocumentHistory">
145
+    <option name="CHANGED_PATHS">
146
+      <list>
147
+        <option value="$PROJECT_DIR$/src/main/java/GenericAccount.java" />
148
+        <option value="$PROJECT_DIR$/src/main/java/Transaction.java" />
149
+        <option value="$PROJECT_DIR$/src/main/java/Payee.java" />
150
+        <option value="$PROJECT_DIR$/src/main/java/Checkbook.java" />
151
+        <option value="$PROJECT_DIR$/src/test/java/CheckbookTest.java" />
152
+      </list>
153
+    </option>
154
+  </component>
155
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
156
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
157
+  <component name="JsGulpfileManager">
158
+    <detection-done>true</detection-done>
159
+    <sorting>DEFINITION_ORDER</sorting>
160
+  </component>
161
+  <component name="ProjectFrameBounds">
162
+    <option name="y" value="23" />
163
+    <option name="width" value="1280" />
164
+    <option name="height" value="709" />
165
+  </component>
166
+  <component name="ProjectLevelVcsManager" settingsEditedManually="true" />
167
+  <component name="ProjectView">
168
+    <navigator proportions="" version="1">
169
+      <foldersAlwaysOnTop value="true" />
170
+    </navigator>
171
+    <panes>
172
+      <pane id="PackagesPane" />
173
+      <pane id="Scope" />
174
+      <pane id="ProjectPane">
175
+        <subPane>
176
+          <expand>
177
+            <path>
178
+              <item name="Checkbook" type="b2602c69:ProjectViewProjectNode" />
179
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
180
+            </path>
181
+            <path>
182
+              <item name="Checkbook" type="b2602c69:ProjectViewProjectNode" />
183
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
184
+              <item name="src" type="462c0819:PsiDirectoryNode" />
185
+            </path>
186
+            <path>
187
+              <item name="Checkbook" type="b2602c69:ProjectViewProjectNode" />
188
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
189
+              <item name="src" type="462c0819:PsiDirectoryNode" />
190
+              <item name="main" type="462c0819:PsiDirectoryNode" />
191
+            </path>
192
+            <path>
193
+              <item name="Checkbook" type="b2602c69:ProjectViewProjectNode" />
194
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
195
+              <item name="src" type="462c0819:PsiDirectoryNode" />
196
+              <item name="main" type="462c0819:PsiDirectoryNode" />
197
+              <item name="java" type="462c0819:PsiDirectoryNode" />
198
+            </path>
199
+            <path>
200
+              <item name="Checkbook" type="b2602c69:ProjectViewProjectNode" />
201
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
202
+              <item name="src" type="462c0819:PsiDirectoryNode" />
203
+              <item name="test" type="462c0819:PsiDirectoryNode" />
204
+            </path>
205
+            <path>
206
+              <item name="Checkbook" type="b2602c69:ProjectViewProjectNode" />
207
+              <item name="Checkbook" type="462c0819:PsiDirectoryNode" />
208
+              <item name="src" type="462c0819:PsiDirectoryNode" />
209
+              <item name="test" type="462c0819:PsiDirectoryNode" />
210
+              <item name="java" type="462c0819:PsiDirectoryNode" />
211
+            </path>
212
+          </expand>
213
+          <select />
214
+        </subPane>
215
+      </pane>
216
+    </panes>
217
+  </component>
218
+  <component name="PropertiesComponent">
219
+    <property name="WebServerToolWindowFactoryState" value="false" />
220
+    <property name="aspect.path.notification.shown" value="true" />
221
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544369669468" />
222
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/pom.xml" />
223
+    <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
224
+    <property name="nodejs_npm_path_reset_for_default_project" value="true" />
225
+    <property name="project.structure.last.edited" value="SDKs" />
226
+    <property name="project.structure.proportion" value="0.0" />
227
+    <property name="project.structure.side.proportion" value="0.2" />
228
+    <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
229
+  </component>
230
+  <component name="RunDashboard">
231
+    <option name="ruleStates">
232
+      <list>
233
+        <RuleState>
234
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
235
+        </RuleState>
236
+        <RuleState>
237
+          <option name="name" value="StatusDashboardGroupingRule" />
238
+        </RuleState>
239
+      </list>
240
+    </option>
241
+  </component>
242
+  <component name="RunManager" selected="JUnit.CheckbookTest">
243
+    <configuration name="CheckbookTest" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
244
+      <module name="Checkbook" />
245
+      <option name="PACKAGE_NAME" value="" />
246
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
247
+      <method v="2">
248
+        <option name="Make" enabled="true" />
249
+      </method>
250
+    </configuration>
251
+    <configuration name="CheckbookTest.test1GetTransactionsForDate" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
252
+      <module name="Checkbook" />
253
+      <option name="PACKAGE_NAME" value="" />
254
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
255
+      <option name="METHOD_NAME" value="test1GetTransactionsForDate" />
256
+      <option name="TEST_OBJECT" value="method" />
257
+      <method v="2">
258
+        <option name="Make" enabled="true" />
259
+      </method>
260
+    </configuration>
261
+    <configuration name="CheckbookTest.test2GetTransactionsForDate" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
262
+      <module name="Checkbook" />
263
+      <option name="PACKAGE_NAME" value="" />
264
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
265
+      <option name="METHOD_NAME" value="test2GetTransactionsForDate" />
266
+      <option name="TEST_OBJECT" value="method" />
267
+      <method v="2">
268
+        <option name="Make" enabled="true" />
269
+      </method>
270
+    </configuration>
271
+    <configuration name="CheckbookTest.test3GetAllCreditTransactions" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
272
+      <module name="Checkbook" />
273
+      <option name="PACKAGE_NAME" value="" />
274
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
275
+      <option name="METHOD_NAME" value="test3GetAllCreditTransactions" />
276
+      <option name="TEST_OBJECT" value="method" />
277
+      <method v="2">
278
+        <option name="Make" enabled="true" />
279
+      </method>
280
+    </configuration>
281
+    <configuration name="CheckbookTest.test3GetAllDebitTransactions" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
282
+      <module name="Checkbook" />
283
+      <option name="PACKAGE_NAME" value="" />
284
+      <option name="MAIN_CLASS_NAME" value="CheckbookTest" />
285
+      <option name="METHOD_NAME" value="test3GetAllDebitTransactions" />
286
+      <option name="TEST_OBJECT" value="method" />
287
+      <method v="2">
288
+        <option name="Make" enabled="true" />
289
+      </method>
290
+    </configuration>
291
+    <list>
292
+      <item itemvalue="JUnit.CheckbookTest.test3GetAllCreditTransactions" />
293
+      <item itemvalue="JUnit.CheckbookTest.test3GetAllDebitTransactions" />
294
+      <item itemvalue="JUnit.CheckbookTest.test1GetTransactionsForDate" />
295
+      <item itemvalue="JUnit.CheckbookTest.test2GetTransactionsForDate" />
296
+      <item itemvalue="JUnit.CheckbookTest" />
297
+    </list>
298
+    <recent_temporary>
299
+      <list>
300
+        <item itemvalue="JUnit.CheckbookTest" />
301
+        <item itemvalue="JUnit.CheckbookTest.test1GetTransactionsForDate" />
302
+        <item itemvalue="JUnit.CheckbookTest.test2GetTransactionsForDate" />
303
+        <item itemvalue="JUnit.CheckbookTest.test3GetAllDebitTransactions" />
304
+        <item itemvalue="JUnit.CheckbookTest.test3GetAllCreditTransactions" />
305
+      </list>
306
+    </recent_temporary>
307
+  </component>
308
+  <component name="SvnConfiguration">
309
+    <configuration />
310
+  </component>
311
+  <component name="TaskManager">
312
+    <task active="true" id="Default" summary="Default task">
313
+      <changelist id="6740fffe-7f4d-4976-ad48-af24e6914f17" name="Default Changelist" comment="" />
314
+      <created>1544225864730</created>
315
+      <option name="number" value="Default" />
316
+      <option name="presentableId" value="Default" />
317
+      <updated>1544225864730</updated>
318
+      <workItem from="1544225868313" duration="8881000" />
319
+      <workItem from="1544319987271" duration="10272000" />
320
+      <workItem from="1544361451727" duration="6640000" />
321
+    </task>
322
+    <servers />
323
+  </component>
324
+  <component name="TestHistory">
325
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 20m 27s.xml">
326
+      <configuration name="CheckbookTest" configurationId="JUnit" />
327
+    </history-entry>
328
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 21m 17s.xml">
329
+      <configuration name="CheckbookTest" configurationId="JUnit" />
330
+    </history-entry>
331
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 22m 07s.xml">
332
+      <configuration name="CheckbookTest" configurationId="JUnit" />
333
+    </history-entry>
334
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 24m 03s.xml">
335
+      <configuration name="CheckbookTest" configurationId="JUnit" />
336
+    </history-entry>
337
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 24m 20s.xml">
338
+      <configuration name="CheckbookTest" configurationId="JUnit" />
339
+    </history-entry>
340
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 24m 48s.xml">
341
+      <configuration name="CheckbookTest" configurationId="JUnit" />
342
+    </history-entry>
343
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 28m 14s.xml">
344
+      <configuration name="CheckbookTest" configurationId="JUnit" />
345
+    </history-entry>
346
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 29m 04s.xml">
347
+      <configuration name="CheckbookTest" configurationId="JUnit" />
348
+    </history-entry>
349
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 29m 20s.xml">
350
+      <configuration name="CheckbookTest" configurationId="JUnit" />
351
+    </history-entry>
352
+    <history-entry file="CheckbookTest - 2018.12.09 at 10h 29m 28s.xml">
353
+      <configuration name="CheckbookTest" configurationId="JUnit" />
354
+    </history-entry>
355
+  </component>
356
+  <component name="TimeTrackingManager">
357
+    <option name="totallyTimeSpent" value="25793000" />
358
+  </component>
359
+  <component name="ToolWindowManager">
360
+    <frame x="0" y="23" width="1280" height="709" extended-state="0" />
361
+    <editor active="true" />
362
+    <layout>
363
+      <window_info id="Designer" order="0" />
364
+      <window_info id="UI Designer" order="1" />
365
+      <window_info id="Capture Tool" order="2" />
366
+      <window_info id="Favorites" order="3" side_tool="true" />
367
+      <window_info id="Image Layers" order="4" />
368
+      <window_info content_ui="combo" id="Project" order="5" sideWeight="0.496633" visible="true" weight="0.105815835" />
369
+      <window_info id="Structure" order="6" sideWeight="0.503367" side_tool="true" weight="0.19063005" />
370
+      <window_info anchor="bottom" id="Version Control" order="0" show_stripe_button="false" />
371
+      <window_info anchor="bottom" id="Terminal" order="1" />
372
+      <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
373
+      <window_info anchor="bottom" id="Message" order="3" />
374
+      <window_info anchor="bottom" id="Find" order="4" />
375
+      <window_info active="true" anchor="bottom" id="Run" order="5" visible="true" weight="0.32996634" />
376
+      <window_info anchor="bottom" id="Database Changes" order="6" show_stripe_button="false" />
377
+      <window_info anchor="bottom" id="Debug" order="7" weight="0.3989899" />
378
+      <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
379
+      <window_info anchor="bottom" id="Inspection" order="9" weight="0.4" />
380
+      <window_info anchor="bottom" id="TODO" order="10" />
381
+      <window_info anchor="bottom" id="Messages" order="11" weight="0.32996634" />
382
+      <window_info anchor="right" id="Capture Analysis" order="0" />
383
+      <window_info anchor="right" id="Theme Preview" order="1" />
384
+      <window_info anchor="right" id="Palette&#9;" order="2" />
385
+      <window_info anchor="right" id="Database" order="3" />
386
+      <window_info anchor="right" id="Maven Projects" order="4" weight="0.3296875" />
387
+      <window_info anchor="right" id="Palette" order="5" />
388
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="6" type="SLIDING" weight="0.4" />
389
+      <window_info anchor="right" id="Ant Build" order="7" weight="0.25" />
390
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="8" weight="0.25" />
391
+    </layout>
392
+    <layout-to-restore>
393
+      <window_info id="Designer" order="0" />
394
+      <window_info id="UI Designer" order="1" />
395
+      <window_info id="Capture Tool" order="2" />
396
+      <window_info id="Favorites" order="3" side_tool="true" />
397
+      <window_info id="Image Layers" order="4" />
398
+      <window_info content_ui="combo" id="Project" order="5" sideWeight="0.496633" visible="true" weight="0.19063005" />
399
+      <window_info id="Structure" order="6" sideWeight="0.503367" side_tool="true" weight="0.19063005" />
400
+      <window_info anchor="bottom" id="Version Control" order="0" show_stripe_button="false" />
401
+      <window_info anchor="bottom" id="Terminal" order="1" />
402
+      <window_info anchor="bottom" id="Event Log" order="2" side_tool="true" />
403
+      <window_info anchor="bottom" id="Message" order="3" />
404
+      <window_info anchor="bottom" id="Find" order="4" />
405
+      <window_info anchor="bottom" id="Run" order="5" />
406
+      <window_info anchor="bottom" id="Database Changes" order="6" show_stripe_button="false" />
407
+      <window_info anchor="bottom" id="Debug" order="7" weight="0.4" />
408
+      <window_info anchor="bottom" id="Cvs" order="8" weight="0.25" />
409
+      <window_info anchor="bottom" id="Inspection" order="9" weight="0.4" />
410
+      <window_info anchor="bottom" id="TODO" order="10" />
411
+      <window_info anchor="right" id="Capture Analysis" order="0" />
412
+      <window_info anchor="right" id="Theme Preview" order="1" />
413
+      <window_info anchor="right" id="Palette&#9;" order="2" />
414
+      <window_info anchor="right" id="Database" order="3" />
415
+      <window_info anchor="right" id="Maven Projects" order="4" weight="0.3296875" />
416
+      <window_info anchor="right" id="Palette" order="5" />
417
+      <window_info anchor="right" id="Commander" internal_type="SLIDING" order="6" type="SLIDING" weight="0.4" />
418
+      <window_info anchor="right" id="Ant Build" order="7" weight="0.25" />
419
+      <window_info anchor="right" content_ui="combo" id="Hierarchy" order="8" weight="0.25" />
420
+    </layout-to-restore>
421
+  </component>
422
+  <component name="TypeScriptGeneratedFilesManager">
423
+    <option name="version" value="1" />
424
+  </component>
425
+  <component name="VcsContentAnnotationSettings">
426
+    <option name="myLimit" value="2678400000" />
427
+  </component>
428
+  <component name="editorHistoryManager">
429
+    <entry file="file://$PROJECT_DIR$/src/main/java/AccountBook.java">
430
+      <provider selected="true" editor-type-id="text-editor">
431
+        <state relative-caret-position="45">
432
+          <caret line="3" column="27" selection-start-line="3" selection-start-column="27" selection-end-line="3" selection-end-column="27" />
433
+        </state>
434
+      </provider>
435
+    </entry>
436
+    <entry file="file://$PROJECT_DIR$/src/main/java/TransactionType.java">
437
+      <provider selected="true" editor-type-id="text-editor" />
438
+    </entry>
439
+    <entry file="file://$PROJECT_DIR$/src/main/java/Transaction.java">
440
+      <provider selected="true" editor-type-id="text-editor">
441
+        <state relative-caret-position="60">
442
+          <caret line="6" column="31" selection-start-line="6" selection-start-column="31" selection-end-line="6" selection-end-column="31" />
443
+          <folding>
444
+            <element signature="e#715#716#0" expanded="true" />
445
+            <element signature="e#746#747#0" expanded="true" />
446
+            <element signature="e#780#781#0" expanded="true" />
447
+            <element signature="e#813#814#0" expanded="true" />
448
+            <element signature="e#853#854#0" expanded="true" />
449
+            <element signature="e#881#882#0" expanded="true" />
450
+            <element signature="e#912#913#0" expanded="true" />
451
+            <element signature="e#939#940#0" expanded="true" />
452
+            <element signature="e#979#980#0" expanded="true" />
453
+            <element signature="e#1011#1012#0" expanded="true" />
454
+            <element signature="e#1042#1043#0" expanded="true" />
455
+            <element signature="e#1070#1071#0" expanded="true" />
456
+            <element signature="e#1111#1112#0" expanded="true" />
457
+            <element signature="e#1145#1146#0" expanded="true" />
458
+            <element signature="e#1846#1847#0" expanded="true" />
459
+            <element signature="e#1919#1920#0" expanded="true" />
460
+          </folding>
461
+        </state>
462
+      </provider>
463
+    </entry>
464
+    <entry file="file://$PROJECT_DIR$/src/main/java/Payee.java">
465
+      <provider selected="true" editor-type-id="text-editor">
466
+        <state relative-caret-position="345">
467
+          <caret line="35" column="37" selection-start-line="35" selection-start-column="37" selection-end-line="35" selection-end-column="37" />
468
+          <folding>
469
+            <element signature="e#1143#1144#0" expanded="true" />
470
+            <element signature="e#1215#1216#0" expanded="true" />
471
+          </folding>
472
+        </state>
473
+      </provider>
474
+    </entry>
475
+    <entry file="file://$PROJECT_DIR$/src/main/java/GenericAccount.java">
476
+      <provider selected="true" editor-type-id="text-editor">
477
+        <state relative-caret-position="15">
478
+          <caret line="1" column="29" selection-start-line="1" selection-start-column="29" selection-end-line="1" selection-end-column="29" />
479
+        </state>
480
+      </provider>
481
+    </entry>
482
+    <entry file="file://$PROJECT_DIR$/src/main/java/Checkbook.java">
483
+      <provider selected="true" editor-type-id="text-editor">
484
+        <state relative-caret-position="231">
485
+          <caret line="119" column="53" selection-start-line="119" selection-start-column="53" selection-end-line="119" selection-end-column="53" />
486
+          <folding>
487
+            <element signature="imports" expanded="true" />
488
+            <element signature="e#841#842#0" expanded="true" />
489
+            <element signature="e#889#890#0" expanded="true" />
490
+            <element signature="e#1105#1106#0" expanded="true" />
491
+            <element signature="e#1186#1187#0" expanded="true" />
492
+            <element signature="e#3231#3232#0" expanded="true" />
493
+            <element signature="e#3265#3266#0" expanded="true" />
494
+            <element signature="e#3355#3356#0" expanded="true" />
495
+            <element signature="e#3389#3390#0" expanded="true" />
496
+            <element signature="e#3477#3478#0" expanded="true" />
497
+            <element signature="e#3511#3512#0" expanded="true" />
498
+          </folding>
499
+        </state>
500
+      </provider>
501
+    </entry>
502
+    <entry file="file://$PROJECT_DIR$/src/test/java/CheckbookTest.java">
503
+      <provider selected="true" editor-type-id="text-editor">
504
+        <state relative-caret-position="231">
505
+          <caret line="467" column="25" lean-forward="true" selection-start-line="467" selection-start-column="25" selection-end-line="467" selection-end-column="25" />
506
+          <folding>
507
+            <element signature="imports" expanded="true" />
508
+          </folding>
509
+        </state>
510
+      </provider>
511
+    </entry>
512
+  </component>
513
+  <component name="masterDetails">
514
+    <states>
515
+      <state key="GlobalLibrariesConfigurable.UI">
516
+        <settings>
517
+          <splitter-proportions>
518
+            <option name="proportions">
519
+              <list>
520
+                <option value="0.2" />
521
+              </list>
522
+            </option>
523
+          </splitter-proportions>
524
+        </settings>
525
+      </state>
526
+      <state key="JdkListConfigurable.UI">
527
+        <settings>
528
+          <last-edited>1.8</last-edited>
529
+          <splitter-proportions>
530
+            <option name="proportions">
531
+              <list>
532
+                <option value="0.2" />
533
+              </list>
534
+            </option>
535
+          </splitter-proportions>
536
+        </settings>
537
+      </state>
538
+      <state key="ProjectJDKs.UI">
539
+        <settings>
540
+          <last-edited>1.8</last-edited>
541
+          <splitter-proportions>
542
+            <option name="proportions">
543
+              <list>
544
+                <option value="0.2" />
545
+              </list>
546
+            </option>
547
+          </splitter-proportions>
548
+        </settings>
549
+      </state>
550
+      <state key="ProjectLibrariesConfigurable.UI">
551
+        <settings>
552
+          <splitter-proportions>
553
+            <option name="proportions">
554
+              <list>
555
+                <option value="0.2" />
556
+              </list>
557
+            </option>
558
+          </splitter-proportions>
559
+        </settings>
560
+      </state>
561
+    </states>
562
+  </component>
563
+</project>

+ 1
- 2
Checkbook/Checkbook.iml View File

@@ -5,11 +5,10 @@
5 5
     <output-test url="file://$MODULE_DIR$/target/test-classes" />
6 6
     <content url="file://$MODULE_DIR$">
7 7
       <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
8
-      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
9 8
       <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
10 9
       <excludeFolder url="file://$MODULE_DIR$/target" />
11 10
     </content>
12
-    <orderEntry type="jdk" jdkName="1.8" jdkType="JavaSDK" />
11
+    <orderEntry type="inheritedJdk" />
13 12
     <orderEntry type="sourceFolder" forTests="false" />
14 13
     <orderEntry type="library" name="Maven: junit:junit:4.0" level="project" />
15 14
   </component>

+ 121
- 0
Checkbook/src/main/java/Checkbook.java View File

@@ -1,5 +1,126 @@
1
+import java.time.LocalDate;
2
+import java.util.ArrayList;
3
+import java.util.Arrays;
4
+import java.util.Iterator;
5
+import java.util.List;
6
+import java.util.stream.Collectors;
7
+
1 8
 public class Checkbook {
2 9
 
3 10
     //blind us with your Java eloquence....
11
+    Payee owner;
12
+    double amount;
13
+
14
+    List<Transaction> transactions = new ArrayList<>();
15
+
16
+    public Checkbook(double cashAmount) {
17
+        this.amount = cashAmount;
18
+        new Checkbook(new Payee(), cashAmount);
19
+    }
20
+
21
+    public Checkbook(Payee owner, double cashAmount ) {
22
+        this.owner = owner;
23
+        this.amount = cashAmount;
24
+    }
25
+
26
+    public int size(){
27
+        return transactions.size();
28
+    }
29
+
30
+    public boolean isEmpty(){
31
+        return transactions.isEmpty();
32
+    }
33
+
34
+    public boolean contains(Transaction element){
35
+        return transactions.contains(element);
36
+    }
37
+
38
+    public boolean add(Transaction element){
39
+        return transactions.add(element);
40
+    }
41
+
42
+    public boolean remove(Transaction element){
43
+        return transactions.remove(element);
44
+    }
45
+
46
+    public Iterator iterator(){
47
+        return transactions.iterator();
48
+    }
49
+
50
+    public Transaction[] toArray(){
51
+        return transactions.toArray(new Transaction[transactions.size()]);
52
+    }
53
+
54
+    public Transaction[] toArray(Transaction[] a){
55
+        transactions.addAll(Arrays.asList(a));
56
+        return transactions.toArray(new Transaction[transactions.size()]);
57
+    }
58
+
59
+    public double checkbookValue(){
60
+        double sum = 0;
61
+        for(Transaction transaction : transactions){
62
+            sum += transaction.getAmount();
63
+        }
64
+        return sum;
65
+    }
66
+
67
+    public Transaction[] getTransactionsForDate(LocalDate aDate){
68
+        List<Transaction> list = new ArrayList<>();
69
+        for(Transaction transaction : transactions){
70
+            if(aDate.equals(transaction.getDate()))
71
+                list.add(transaction);
72
+        }
73
+
74
+        /*list = transactions.stream().collect(Collectors.groupingBy(Transaction::getDate))
75
+                .*/
76
+
77
+        return list.toArray(new Transaction[0]);
78
+    }
79
+
80
+
81
+    public Transaction[] getAllTransactionsForPayee(String name) {
82
+        List<Transaction> list = new ArrayList<>();
83
+        for(Transaction transaction : transactions){
84
+            if(transaction.getPayee().getGivenName().equals(name)){
85
+                list.add(transaction);
86
+            }
87
+        }
88
+        return list.toArray(new Transaction[list.size()]);
89
+    }
90
+
91
+    public Transaction[] getAllDebitTransactions() {
92
+        List<Transaction> list = new ArrayList<>();
93
+        for(Transaction transaction : transactions){
94
+            if(transaction.getType().equals(TransactionType.DEBIT)){
95
+                list.add(transaction);
96
+            }
97
+        }
98
+        return list.toArray(new Transaction[list.size()]);
99
+    }
100
+
101
+    public Transaction[] getAllCreditTransactions() {
102
+        List<Transaction> creditTransactions = new ArrayList<>();
103
+        for(Transaction transaction : transactions){
104
+            if(transaction.getType().equals(TransactionType.CREDIT))
105
+                 creditTransactions.add(transaction);
106
+        }
107
+        return creditTransactions.toArray(new Transaction[creditTransactions.size()]);
108
+    }
109
+
110
+    public boolean containsAll(List<Transaction> transactions2) {
111
+        return transactions.containsAll(transactions2);
112
+    }
113
+
114
+
115
+    public boolean addAll(List<Transaction> transactions2) {
116
+        return transactions.addAll(transactions2);
117
+    }
118
+
119
+    public boolean removeAll(List<Transaction> transactions2) {
120
+        return transactions.removeAll(transactions2);
121
+    }
4 122
 
123
+    public void clear() {
124
+        transactions.clear();
125
+    }
5 126
 }

+ 1
- 0
Checkbook/src/main/java/GenericAccount.java View File

@@ -1,3 +1,4 @@
1 1
 
2 2
 public class GenericAccount {
3
+
3 4
 }

+ 16
- 0
Checkbook/src/main/java/Payee.java View File

@@ -1,3 +1,5 @@
1
+import java.util.Objects;
2
+
1 3
 public class Payee {
2 4
 
3 5
     private String familyName;
@@ -30,4 +32,18 @@ public class Payee {
30 32
     // ... and a bunch more hidden stuff: for testing purposes only
31 33
 
32 34
 
35
+    @Override
36
+    public boolean equals(Object o) {
37
+        if (this == o) return true;
38
+        if (o == null || getClass() != o.getClass()) return false;
39
+        Payee payee = (Payee) o;
40
+        return Objects.equals(familyName, payee.familyName) &&
41
+                Objects.equals(givenName, payee.givenName) &&
42
+                Objects.equals(emailAddress, payee.emailAddress);
43
+    }
44
+
45
+    @Override
46
+    public int hashCode() {
47
+        return Objects.hash(familyName, givenName, emailAddress);
48
+    }
33 49
 }

+ 19
- 0
Checkbook/src/main/java/Transaction.java View File

@@ -1,4 +1,5 @@
1 1
 import java.time.LocalDate;
2
+import java.util.Objects;
2 3
 import java.util.concurrent.atomic.AtomicReference;
3 4
 
4 5
 public class Transaction {
@@ -50,4 +51,22 @@ public class Transaction {
50 51
         }
51 52
         return (-1.0 * amount);
52 53
     }
54
+
55
+    @Override
56
+    public boolean equals(Object o) {
57
+        if (this == o) return true;
58
+        if (o == null || getClass() != o.getClass()) return false;
59
+        Transaction that = (Transaction) o;
60
+        return Objects.equals(id, that.id) &&
61
+                Objects.equals(date, that.date) &&
62
+                Objects.equals(memo, that.memo) &&
63
+                Objects.equals(payee, that.payee) &&
64
+                typee == that.typee &&
65
+                Objects.equals(amount, that.amount);
66
+    }
67
+
68
+    @Override
69
+    public int hashCode() {
70
+        return Objects.hash(id, date, memo, payee, typee, amount);
71
+    }
53 72
 }

+ 460
- 0
Checkbook/src/test/java/CheckbookTest.java View File

@@ -1,12 +1,472 @@
1
+import junit.framework.Assert;
2
+import org.junit.Test;
3
+
4
+import java.time.LocalDate;
5
+import java.util.ArrayList;
6
+import java.util.Iterator;
7
+import java.util.List;
8
+
1 9
 import static org.junit.Assert.*;
2 10
 
3 11
 public class CheckbookTest {
12
+    Checkbook checkbook;
13
+    Transaction transaction;
14
+    Payee payee1;
15
+    Transaction transaction2;
16
+    Payee payee2;
17
+    Transaction transaction3;
18
+    Payee payee3;
19
+    Transaction transaction4;
20
+    Payee payee4;
21
+
4 22
 
5 23
     @org.junit.Before
6 24
     public void setUp() throws Exception {
25
+        checkbook = new Checkbook(20000);
26
+        payee1 = new Payee();
27
+        payee2 = new Payee();
28
+        payee3 = new Payee();
29
+        payee3 = new Payee();
30
+        transaction = new Transaction("one",payee1, TransactionType.DEBIT, 200.0);
31
+        transaction2 = new Transaction("two",payee2, TransactionType.CREDIT, 580.0);
32
+        transaction3 = new Transaction("three",payee3, TransactionType.DEBIT, 800.0);
33
+        transaction4 = new Transaction("four",payee4, TransactionType.CREDIT, 950.0);
7 34
     }
8 35
 
9 36
     @org.junit.After
10 37
     public void tearDown() throws Exception {
11 38
     }
39
+
40
+    @Test
41
+    public void test1AddAndSize(){
42
+        checkbook.add(transaction);
43
+        int expected = 1;
44
+        int actual = checkbook.size();
45
+        Assert.assertEquals(expected, actual);
46
+    }
47
+
48
+    @Test
49
+    public void test2AddAndSize(){
50
+        checkbook.add(transaction);
51
+        checkbook.add(transaction2);
52
+        int expected = 2;
53
+        int actual = checkbook.size();
54
+        Assert.assertEquals(expected, actual);
55
+    }
56
+
57
+    @Test
58
+    public void test3AddAndSize(){
59
+        checkbook.add(transaction);
60
+        checkbook.add(transaction2);
61
+        checkbook.add(transaction3);
62
+        int expected = 3;
63
+        int actual = checkbook.size();
64
+        Assert.assertEquals(expected, actual);
65
+    }
66
+
67
+    @Test
68
+    public void test1IsEmpty(){
69
+        checkbook.transactions.add(transaction3);
70
+        Assert.assertFalse(checkbook.isEmpty());
71
+    }
72
+
73
+    @Test
74
+    public void test2IsEmpty(){
75
+        checkbook.transactions.clear();
76
+        Assert.assertTrue(checkbook.isEmpty());
77
+    }
78
+
79
+    @Test
80
+    public void test3IsEmpty(){
81
+        checkbook.transactions.add(transaction);
82
+        checkbook.transactions.clear();
83
+        Assert.assertTrue(checkbook.isEmpty());
84
+    }
85
+
86
+    @Test
87
+    public void test1RemoveAndContains(){
88
+        checkbook.transactions.add(transaction3);
89
+        Assert.assertTrue(checkbook.contains(transaction3));
90
+        checkbook.remove(transaction3);
91
+        Assert.assertFalse(checkbook.contains(transaction3));
92
+    }
93
+
94
+    @Test
95
+    public void test2RemoveAndContains(){
96
+        checkbook.transactions.add(transaction2);
97
+        Assert.assertTrue(checkbook.contains(transaction2));
98
+        checkbook.remove(transaction2);
99
+        Assert.assertFalse(checkbook.contains(transaction2));
100
+    }
101
+
102
+    @Test
103
+    public void test3RemoveAndContains(){
104
+        checkbook.transactions.add(transaction);
105
+        Assert.assertTrue(checkbook.contains(transaction));
106
+        checkbook.remove(transaction);
107
+        Assert.assertFalse(checkbook.contains(transaction));
108
+    }
109
+
110
+    @Test
111
+    public void test1Iterator(){
112
+        checkbook.transactions.add(transaction);
113
+        Iterator iterator = checkbook.iterator();
114
+        Assert.assertTrue(iterator.hasNext());
115
+    }
116
+
117
+    @Test
118
+    public void test2Iterator(){
119
+        checkbook.transactions.clear();
120
+        Iterator iterator = checkbook.iterator();
121
+        Assert.assertFalse(iterator.hasNext());
122
+    }
123
+
124
+    @Test
125
+    public void test3Iterator(){
126
+        checkbook.transactions.add(transaction3);
127
+        Iterator iterator = checkbook.iterator();
128
+        Assert.assertTrue(iterator.hasNext());
129
+    }
130
+
131
+    @Test
132
+    public void test1ToArray(){
133
+        checkbook.add(transaction);
134
+        Transaction[] expected = {transaction};
135
+        Transaction[] actual = checkbook.toArray();
136
+        Assert.assertEquals(expected.length, actual.length);
137
+        Assert.assertEquals(expected[0], actual[0]);
138
+    }
139
+
140
+    @Test
141
+    public void test2ToArray(){
142
+        checkbook.add(transaction);
143
+        checkbook.add(transaction2);
144
+        Transaction[] expected = {transaction,transaction2};
145
+        Transaction[] actual = checkbook.toArray();
146
+        Assert.assertEquals(expected.length, actual.length);
147
+        Assert.assertEquals(expected[0], actual[0]);
148
+        Assert.assertEquals(expected[1], actual[1]);
149
+    }
150
+
151
+    @Test
152
+    public void test3ToArray(){
153
+        checkbook.add(transaction);
154
+        checkbook.add(transaction2);
155
+        checkbook.add(transaction3);
156
+        Transaction[] expected = {transaction, transaction2, transaction3};
157
+        Transaction[] actual = checkbook.toArray();
158
+        Assert.assertEquals(expected.length, actual.length);
159
+        Assert.assertEquals(expected[0], actual[0]);
160
+        Assert.assertEquals(expected[1], actual[1]);
161
+        Assert.assertEquals(expected[2], actual[2]);
162
+
163
+    }
164
+
165
+    @Test
166
+    public void test1ToArray2(){
167
+        checkbook.add(transaction);
168
+        Transaction[] transactions = {transaction2};
169
+        Transaction[] expected = {transaction, transaction2};
170
+        Transaction[] actual = checkbook.toArray(transactions);
171
+        Assert.assertEquals(expected.length, actual.length);
172
+        Assert.assertEquals(expected[0], actual[0]);
173
+        Assert.assertEquals(expected[1], actual[1]);
174
+    }
175
+
176
+    @Test
177
+    public void test2ToArray2(){
178
+        checkbook.add(transaction);
179
+        checkbook.add(transaction2);
180
+        Transaction[] transactions = {transaction3};
181
+        Transaction[] expected = {transaction,transaction2, transaction3};
182
+        Transaction[] actual = checkbook.toArray(transactions);
183
+        Assert.assertEquals(expected.length, actual.length);
184
+        Assert.assertEquals(expected[0], actual[0]);
185
+        Assert.assertEquals(expected[1], actual[1]);
186
+        Assert.assertEquals(expected[2], actual[2]);
187
+    }
188
+
189
+    @Test
190
+    public void test3ToArray2(){
191
+        checkbook.add(transaction);
192
+        checkbook.add(transaction2);
193
+        checkbook.add(transaction3);
194
+        Transaction[] transactions = {transaction4};
195
+        Transaction[] expected = {transaction, transaction2, transaction3, transaction4};
196
+        Transaction[] actual = checkbook.toArray(transactions);
197
+        Assert.assertEquals(expected.length, actual.length);
198
+        Assert.assertEquals(expected[0], actual[0]);
199
+        Assert.assertEquals(expected[1], actual[1]);
200
+        Assert.assertEquals(expected[2], actual[2]);
201
+        Assert.assertEquals(expected[3], actual[3]);
202
+    }
203
+
204
+    @Test
205
+    public void test1CheckBookValue(){
206
+        checkbook.add(transaction);
207
+        double expected = 200.0;
208
+        double actual = checkbook.checkbookValue();
209
+        Assert.assertEquals(expected, actual, 0.0);
210
+    }
211
+
212
+    @Test
213
+    public void test2CheckBookValue(){
214
+        checkbook.transactions.clear();
215
+        checkbook.add(transaction);
216
+        checkbook.add(transaction);
217
+        double expected = 400.0;
218
+        double actual = checkbook.checkbookValue();
219
+        Assert.assertEquals(expected, actual, 0.0);
220
+    }
221
+
222
+    @Test
223
+    public void test3CheckBookValue(){
224
+        checkbook.add(transaction);
225
+        checkbook.add(transaction3);
226
+        double expected = 1000.0;
227
+        double actual = checkbook.checkbookValue();
228
+        Assert.assertEquals(expected, actual, 0.0);
229
+    }
230
+
231
+    @Test
232
+    public void test1GetTransactionsForDate(){
233
+        checkbook.add(transaction);
234
+        Transaction[] expected = {transaction};
235
+        Transaction[] actual = checkbook.getTransactionsForDate(LocalDate.now());
236
+        Assert.assertEquals(expected.length, actual.length);
237
+    }
238
+
239
+    @Test
240
+    public void test2GetTransactionsForDate(){
241
+        checkbook.transactions.clear();
242
+        checkbook.add(transaction);
243
+        checkbook.add(transaction2);
244
+        Transaction[] expected = {transaction, transaction2};
245
+        Transaction[] actual = checkbook.getTransactionsForDate(LocalDate.now());
246
+        Assert.assertEquals(expected.length, actual.length);
247
+    }
248
+
249
+    @Test
250
+    public void test3GetTransactionsForDate(){
251
+        checkbook.transactions.clear();
252
+        checkbook.add(transaction);
253
+        Transaction[] expected = {transaction};
254
+        Transaction[] actual = checkbook.getTransactionsForDate(LocalDate.now());
255
+        Assert.assertEquals(expected.length, actual.length);
256
+    }
257
+
258
+    @Test
259
+    public void test1GetAllTransactionsForPayee(){
260
+        payee1.setGivenName("thulasi");
261
+        payee1.setFamilyName("puppala");
262
+        payee1.setEmailAddress("thulasi@gmail.com");
263
+        checkbook.add(transaction);
264
+        Transaction[] expected = {transaction};
265
+        Transaction[] actual = checkbook.getAllTransactionsForPayee("thulasi");
266
+        Assert.assertEquals(expected[0], actual[0]);
267
+
268
+    }
269
+
270
+    @Test
271
+    public void test2GetAllTransactionsForPayee(){
272
+        payee2.setGivenName("sreeram");
273
+        payee2.setFamilyName("jonnageddala");
274
+        payee2.setEmailAddress("sreeram@gmail.com");
275
+        checkbook.add(transaction2);
276
+        Transaction[] expected = {transaction2};
277
+        Transaction[] actual = checkbook.getAllTransactionsForPayee("sreeram");
278
+        Assert.assertEquals(expected[0], actual[0]);
279
+
280
+    }
281
+
282
+    @Test
283
+    public void test3GetAllTransactionsForPayee(){
284
+        payee3.setGivenName("sreya");
285
+        payee3.setFamilyName("jonnageddala");
286
+        payee3.setEmailAddress("sreya@gmail.com");
287
+        checkbook.add(transaction3);
288
+        Transaction[] expected = {transaction3};
289
+        Transaction[] actual = checkbook.getAllTransactionsForPayee("sreya");
290
+        Assert.assertEquals(expected[0], actual[0]);
291
+
292
+    }
293
+
294
+    @Test
295
+    public void test1GetAllDebitTransactions(){
296
+        checkbook.add(transaction);
297
+        checkbook.add(transaction2);
298
+        checkbook.add(transaction3);
299
+        Transaction[] expected = {transaction, transaction3};
300
+        Transaction[] actual = checkbook.getAllDebitTransactions();
301
+        Assert.assertEquals(expected[0], actual[0]);
302
+        Assert.assertEquals(expected[1], actual[1]);
303
+    }
304
+
305
+    @Test
306
+    public void test2GetAllDebitTransactions(){
307
+        checkbook.add(transaction);
308
+        Transaction[] expected = {transaction};
309
+        Transaction[] actual = checkbook.getAllDebitTransactions();
310
+        Assert.assertEquals(expected[0], actual[0]);
311
+    }
312
+
313
+    @Test
314
+    public void test3GetAllDebitTransactions(){
315
+        checkbook.transactions.clear();
316
+        Transaction[] expected = {};
317
+        Transaction[] actual = checkbook.getAllDebitTransactions();
318
+        Assert.assertEquals(expected.length, actual.length);
319
+    }
320
+
321
+    @Test
322
+    public void test1GetAllCreditTransactions(){
323
+        checkbook.add(transaction2);
324
+        checkbook.add(transaction3);
325
+        checkbook.add(transaction4);
326
+        Transaction[] expected = {transaction2, transaction4};
327
+        Transaction[] actual = checkbook.getAllCreditTransactions();
328
+        Assert.assertEquals(expected[0], actual[0]);
329
+        Assert.assertEquals(expected[1], actual[1]);
330
+    }
331
+
332
+    @Test
333
+    public void test2GetAllCreditTransactions(){
334
+        checkbook.transactions.clear();
335
+        checkbook.add(transaction);
336
+        Transaction[] expected = {};
337
+        Transaction[] actual = checkbook.getAllCreditTransactions();
338
+        Assert.assertEquals(expected.length, actual.length);
339
+    }
340
+
341
+    @Test
342
+    public void test3GetAllCreditTransactions(){
343
+        checkbook.transactions.clear();
344
+        Transaction[] expected = {};
345
+        Transaction[] actual = checkbook.getAllCreditTransactions();
346
+        Assert.assertEquals(expected.length, actual.length);
347
+    }
348
+
349
+    @Test
350
+    public void test1ContainsAll(){
351
+        checkbook.add(transaction);
352
+        checkbook.add(transaction2);
353
+        List<Transaction> transactions = new ArrayList<>();
354
+        transactions.add(transaction);
355
+        transactions.add(transaction2);
356
+        boolean actual = checkbook.containsAll(transactions);
357
+        Assert.assertTrue(actual);
358
+    }
359
+
360
+    @Test
361
+    public void test2ContainsAll(){
362
+        checkbook.add(transaction2);
363
+        List<Transaction> transactions = new ArrayList<>();
364
+        transactions.add(transaction);
365
+        transactions.add(transaction2);
366
+        boolean actual = checkbook.containsAll(transactions);
367
+        Assert.assertFalse(actual);
368
+    }
369
+
370
+    @Test
371
+    public void test3ContainsAll(){
372
+        checkbook.add(transaction);
373
+        checkbook.add(transaction2);
374
+        checkbook.add(transaction3);
375
+        List<Transaction> transactions = new ArrayList<>();
376
+        transactions.add(transaction);
377
+        transactions.add(transaction2);
378
+        transactions.add(transaction3);
379
+        boolean actual = checkbook.containsAll(transactions);
380
+        Assert.assertTrue(actual);
381
+    }
382
+
383
+
384
+    @Test
385
+    public void test1AddAll(){
386
+        List<Transaction> transactions = new ArrayList<>();
387
+        transactions.add(transaction);
388
+        transactions.add(transaction2);
389
+        boolean actual = checkbook.addAll(transactions);
390
+        Assert.assertTrue(actual);
391
+    }
392
+
393
+    @Test
394
+    public void test2AddAll(){
395
+        List<Transaction> transactions = new ArrayList<>();
396
+        transactions.add(transaction);
397
+        boolean actual = checkbook.addAll(transactions);
398
+        Assert.assertTrue(actual);
399
+    }
400
+
401
+    @Test
402
+    public void test3AddAll(){
403
+        List<Transaction> transactions = new ArrayList<>();
404
+        transactions.add(transaction);
405
+        transactions.add(transaction2);
406
+        transactions.add(transaction3);
407
+        boolean actual = checkbook.addAll(transactions);
408
+        Assert.assertTrue(actual);
409
+    }
410
+
411
+    @Test
412
+    public void test1removeAll(){
413
+        checkbook.add(transaction);
414
+        checkbook.add(transaction2);
415
+        List<Transaction> transactions = new ArrayList<>();
416
+        transactions.add(transaction);
417
+        transactions.add(transaction2);
418
+        boolean actual = checkbook.removeAll(transactions);
419
+        Assert.assertTrue(actual);
420
+    }
421
+
422
+    @Test
423
+    public void test2removeAll(){
424
+        checkbook.add(transaction);
425
+        checkbook.add(transaction2);
426
+        checkbook.add(transaction);
427
+        List<Transaction> transactions = new ArrayList<>();
428
+        transactions.add(transaction3);
429
+        transactions.add(transaction2);
430
+        boolean actual = checkbook.removeAll(transactions);
431
+        Assert.assertTrue(actual);
432
+    }
433
+
434
+    @Test
435
+    public void test3removeAll(){
436
+        checkbook.add(transaction2);
437
+        checkbook.add(transaction4);
438
+        List<Transaction> transactions = new ArrayList<>();
439
+        transactions.add(transaction2);
440
+        transactions.add(transaction4);
441
+        boolean actual = checkbook.removeAll(transactions);
442
+        Assert.assertTrue(actual);
443
+    }
444
+
445
+    @Test
446
+    public void test1Clear(){
447
+        checkbook.add(transaction2);
448
+        checkbook.add(transaction3);
449
+        checkbook.add(transaction4);
450
+        checkbook.clear();
451
+        int expected = 0;
452
+        int actual = checkbook.size();
453
+        Assert.assertEquals(expected, actual);
454
+    }
455
+
456
+    @Test
457
+    public void test2Clear(){
458
+        checkbook.add(transaction4);
459
+        checkbook.clear();
460
+        int expected = 0;
461
+        int actual = checkbook.size();
462
+        Assert.assertEquals(expected, actual);
463
+    }
464
+
465
+    @Test
466
+    public void test3Clear(){
467
+        checkbook.clear();
468
+        int expected = 0;
469
+        int actual = checkbook.size();
470
+        Assert.assertEquals(expected, actual);
471
+    }
12 472
 }