zsweedyk/CS121F14S4_Team5 — pull request #63 by jeansung (2014-12-02 18:25:02+00:00)
Title: Feature - unit tests that check for valid input. 

I added the checks for invalid input / file for the grid generator, audio manager and grid model classes. The unit tests are at the bottom of our existing unit tests (2 methods).

Some caveats on testing:
1) I had to move some of the private methods in grid generator into the public header file because I was using them for the test case. I know we don't have a fix for this, I thought this would be a heads up.

2) I threw exceptions whenever there was a chance of using a nil. I could, however, only test the exceptions if the object that might be nil was an input. This means that I can't really test the PDAudioManager class for errors because to reach into the methods to check / assert if nil means changing radically the code we have and I wanted to talk about that more with everyone if I was to do that.

3) I replaced the
if (_cells == nil) {
return 0;
}
and methods like:
if (cell == nil) {
return NO;
}
with nil checks and exception throwing.

Here is evidence that all my tests pass:

![screen shot 2014-12-02 at 10 16 53 am](https://cloud.githubusercontent.com/assets/4502178/5268338/6e878904-7a0d-11e4-8761-ec42dc595ffb.png)

But of course, please test on your own machine!