douglascraigschmidt/POSA-14 — pull request #4 by mawalker (2014-05-09 08:30:34+00:00)
Title: Multi file w1 a0 update with Unit Testing

Unfortunately my auto-format changed every line... so it is hard to track which lines were actually changed. (We'll need to standardize on an auto-format standard, that way this doesn't happen in the future.)

However, what I did was: I took the single file impl. that has the new descriptive error output (as helper hints), and split out the BuggyBlockingQueue and the Main test-driver into their own class files (to dramatically clean up/shorten/focus the SynchronizedQueue classfile.)

Then I created the package edu.vuum.mooca in both src/ and test/ (a new source directory)

(which had the effect of moving the java files, but it shouldn't be a problem with pre-existing Eclipse instances b/c it just deepens the path, not changes the root.)

And put the single unit test in that test package.

The unit-test and the test-driver are functionally equivalent, just where the output goes/format. (Except that the test-driver tries to test the BuggyBlockingQueue, whereas the unit-test doesn't even bother, since it doesn't give the wide range of outputs based on what you could do wrong, as does the target SynchronizedQueue) .