reset password
Author Message
chuckh
Posts: 12
Posted 17:58 May 29, 2016 |

Can you explain how to do the unit test again for homework 2 in detail? Do you just copy the database methods into the the application test location and run it?

msargent
Posts: 519
Posted 08:37 May 31, 2016 |

You instantiate a SQLiteOpenHelper object (the one we implemented in class), get a readable or writable database from it, and call methods from the database object to insert and query. Use the method provided in the Sunshine application on my github site (look in the database test class in the appropriate test folder) to compare ContentValues object (the map with all the information and column names) and what you get back in the cursor returned by the query.

If you need more detail, check out the Udacity videos or visit me in my office hours.