Unthrilled
Here’s a test for the Cappuccino app I’m working on. It’s about what happens when, for example, you click on “blood collection for transfusion” in the right table here:
- (void)testPutBackAProcedure { [scenario previousAction: function() { [self procedure: “Betical“ hasBeenSelectedFrom: [”alpha“, “Betical“, “order“]]; } during: function() { [self putBackProcedure: “Betical“]; } behold: function() { [self listenersWillReceiveNotification: ProcedureUpdateNews containingObject: []]; [self tablesWillReloadData]; } andSo: function() { [self unchosenProcedureTableWillContain: [”alpha“, “Betical“, “order“]]; [self chosenProcedureTableWillContain: []]; } ]; }
Here’s the code to pass the test (after inlining one method):
- (void)unchooseProcedure: (id) sender { [self moveProcedureAtIndex: [chosenProcedureTable clickedRow] from: chosenProcedures to: unchosenProcedures]; [NotificationCenter postNotificationName: ProcedureUpdateNews object: chosenProcedures]; [chosenProcedureTable reloadData]; [unchosenProcedureTable reloadData]; }
Did the test clarify my design thinking? No, not really. Will it be useful for regression? I doubt it. Is it good documentation for the app’s UI behavior? No.
Something seems wrong here.