Permalink
Browse files

End of episode 196

  • Loading branch information...
1 parent 64028df commit 292ed5351c633be4b3f3631d0bf35055920f04b3 @jamesshore committed Jun 4, 2012
View
@@ -1,30 +1,34 @@
-Create smoke test to make sure TESTING_ONLY variable isn't flipped in production?
+== Finish basic saving ==
-Get rid of ApplicationModel.lastSavedPathOrNullIfNeverSaved() pass-through by injecting UserConfiguration in test?
+Create smoke test to make sure TESTING_ONLY variable isn't flipped in production?
Handle SaveFile stub-out-file-system cheat more generically (not just in ApplicationModelTest)
-Move save file data clump into a "configuration" object?
+Consider eliminating __ApplicationModelSpy entirely
-File format: consider java.util.Properties (suggested by Esko Luontola in ep 159)
-Need to decide what to do with original user-entered values in UI.
- - Reformat them when moving away from field? What about invalid values?
+== Special cases / polish ==
-Consider eliminating __ApplicationModelSpy entirely
-
-Deal with opening same file twice (see episode 137 comments, Aleksi Niiranen)
+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.
-Deal with loading excessively large file
+Application menu still works when modal dialog is up -- so you can "Save As" twice in a row, for example. Fix this.
-Handle IOExceptions -- are there other cases to handle?
+Need to decide what to do with original user-entered values in UI.
+ - Reformat them when moving away from field? What about invalid values?
-Application menu still works when modal dialog is up -- so you can "Save As" twice in a row, for example. Fix this.
+== 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?
@@ -69,4 +69,8 @@ public StockMarketProjection stockMarketProjection() {
public void save(File path) throws IOException {
configuration.save(path);
}
+
+ public void configurationUpdated() {
+ stockMarketTableModel.setProjection(stockMarketProjection());
+ }
}
@@ -66,6 +66,13 @@ public void changingYearlySpendingShouldChangeStockMarketTableModel() {
assertEquals("configuration", new ValidDollars(423), model.yearlySpending());
}
+ @Test
+ public void configurationUpdated_ResultsInStockMarketTableModelChanging() {
+ configuration.yearlySpending = new UserEnteredDollars("423");
+ model.configurationUpdated();
+ assertEquals("stock market table model", new ValidDollars(423), model.stockMarketTableModel().yearlySpending());
+ }
+
@Test
public void saveShouldSaveConfiguration() throws IOException {
assertNull("configuration should not be saved", configuration.lastSavedPathOrNullIfNeverSaved());

0 comments on commit 292ed53

Please sign in to comment.