-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathscratchpad.txt
90 lines (51 loc) · 2.89 KB
/
scratchpad.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
== Finish basic saving ==
Create smoke test to make sure TESTING_ONLY variable isn't flipped in production?
Handle SaveFile stub-out-file-system cheat more generically (duplicated between ApplicationModelTest & SaveAsDialogTest)
== Special cases / polish ==
Exploratory testing discovery: negative zeros in UI (enter $10 starting balance, $0 cost basis, $1 yearly spending)
Take a second look at IOExceptions -- are there special cases to handle?
Deal with FileDialog returning invalid directory/filename. (It can happen, according to the Java docs)
Deal with FileDialog returning null directory and valid filename.
Application menu still works when modal dialog is up -- so you can "Save As" twice in a row, for example. Fix this.
Need to decide what to do with original user-entered values in UI.
- Reformat them when moving away from field? What about invalid values?
== Loading ==
Deal with opening same file twice (see episode 137 comments, Aleksi Niiranen)
Deal with loading excessively large file
File format: consider java.util.Properties (suggested by Esko Luontola in ep 159)
---
Use a @Rule to enforce SwingUtilities.invokeAndWait on every Swing test?
---
Persistence!
- values of fields
- UI positioning
---
When tabbing to DollarsTextField, should the value be selected?
Need to handle case where cost basis is larger than starting balance--that should be illegal
Similarly, need to handle case where account runs out of money. All kinds of funkiness ensues.
---
Add remaining fields so that starting conditions can be set at runtime
---
Check that keyboard shortcuts work (including tabbing between components)
Run Swing-related stuff on event dispatching thread: http://download.oracle.com/javase/6/docs/api/javax/swing/package-summary.html#threading
Error handling for exceptions within Swing components--how?
Tip for running Swing tests: http://blog.schauderhaft.de/2010/08/15/use-cases-for-junit-rules/ (via Esko Luontola)
Tool for Swing testing: Consider 'WindowLicker' (suggested by Tony in email)
---
Polish:
- Better tooltips for invalid dollar amounts
- Need a alert dialog that wraps long lines properly (for example, save error dialog)
---
Long term:
- Cross-platform testing & support (Consider "Macify")
- Cmd-W should close window on Mac
- Does the DollarsTextField warning icon work properly in all look-and-feels that we use
- Mac needs to use Mac menu bar (currently configured with -D option in run.sh)
- Should not close application when last window is closed on the Mac
- More realistic abstraction for capital gains tax (in StockMarketYear)
ROOT CAUSE CHECKLIST:
---
Swing semantics change even when interface doesn't
Therefore... when refactoring from one Swing class to another, check usage of all Swing APIs.
When changing a test, you could break the expected behavior of the application
Therefore... go a little slower when taking out or changing expectations of tests