-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automated test coverage #11
Comments
Need to determine how we are going to do automated test coverage. Maybe we could use a framework like KIF to run scenario tests on the Test App ? We could also test the delegate logic using traditional unit tests and mocking the pan gesture recogniser. |
Can confirm that KIF supports Drag and Drop gestures, not sure how effective this will be. trying it out now. |
See branch |
… navigation methods into 1 method that accepts the example case number and chooses the case's controller's tab button accessibillity label for from a config arry
…lls between containers - untested
UPDATE branch |
…target to the pan gesture recogniser
…tinued implementing the new handling logic
…aggable if they don't have a drag data source
…d outside of any of the arena's collections
…mport statement from the gesture coordinator spec
…re because of the assignment of the given array literal. I'd assumed when calling andReturn, the value passed was retained / copied / managed by the framework but it seems that it isn't reliable held in memory. There is no bad access for example, if I declare the array as a variable like so: NSArray* recognizers = @[panGestureRecognizer] OCMStub([superview gestureRecognizers]).andReturn(recognizers); because its autoreleased at the end of the block. For now I've opted just to add gesture recognizers via the defined interface in UIView - seems much simpler
…ess interdependant There are multiple nested describe blocks, each with beforeEach blocks setting up an configuring additional mock objects. Its now at the point where these tests are no longer clear and hard to maintain. Refactoring
…le and less dependent of implicit beforEach setup
…ed how to change the design going forward
…ns if the dragDataSource is nil because the language defines this behaviour for us (returns NO for BOOl methods). Its redundant to test this
According the OCMock docs, protocol mocks work in the same way as class mocks and therefore have the same limitations when it comes to mocking the same protcol multiple times at once. We've worked around that my partially mocking an instance of a class that implements that protocol. I'm not 100% sure whether partially mocking 2 instances of the same class as once has the same limitations (the docs seems a bit ambiguous). Also removed unnecessary property in the I3TableView
…ds and refactored rearrange tests to pass. Note that now, the collection for the 'stopping a valid drop' tests is set up with a draggingItemView
…o their own un-nested describe blocks
…scribe block again. This time we've ensured that only mocked dependencies that are absolutely required across all of the drag / drop tests are set up in the top level describe block. Before, there were all sorts of dependencies that were stubbed, restubbed, overwritten and dependent on the class implementation. Now we have cleaner subsets of drag / drop tests
…d crash before have been dealt with
…plementations are delcared in .m files instead of all in the .h file. Moved all drag data source fixtures into 1 pair of .h / .m files
…ses and implemented tests for the renderer to ensure that on rearrange, the exchanging clone view clones the exchange view immediately
… Now to build some working examples as functional / acceptance tests
…h the example case. Also see comments of #28 for a recently discovered limitation
Closing this issue now. All new unit tests for the first iteration of BetweenKit pass. All further production code should be covered with tests. At the moment I'm trying to force myself to adopt TDD so BetweenKit classes should have unit tests. We also need some functional examples (maybe next phase?). |
We need some sort of automated coverage so that we can detect regressions caused by external PRs easily.
The text was updated successfully, but these errors were encountered: