Removed static variable to count IDs
I will put this variable as private in the ContactManagerImpl and have the ContactImpl access it from its constructor.
Removed contactCount incrementor
Initial commit
Added stubs for all public methods
Initial commit.
Will make this class implement the interface later.
Reason is so I can test each method without having to implement the full interface and meetings/contacts classes.
Added param notes into the constructor.
Added buildup method and test to create a contact.
The buildup creates a contact manager and the test checks whether a new contact can be made with valid input.
Several additions and changes:
1. added ArrayList to hold contacts;
2. added code to test for null name/notes and if found to throw a NullPointerException;
3. addNewContact method was previousyl returning a Contact. This was for testing but now that there is a list of contacts I made it return void.
Added tests to check for NullPointerExceptions
These will fail if addNewContact accepts a null name/notes. I also removed the test for valid params because this is tested in the ContactImplTets class.
Changed assertEquals methods to ones without custom error msg.
Added test to ensure getID works.
Currently it's asserting that ID shouldn't be zero. I've made it zero to force the test to fail. I plan to use the ContactManagerImplTest class to ensure that newly created contacts get an incrementing int ID that doesn't start at zero.
Created a static variable to use for contact IDs.
This variable will increment with every new contact and will be used as the contact's ID. I decided that this was simpler than setting the ID from outside the ContactImpl class.
Removed countactCounter variable
IDs for contacts will be set from within their own class using a static class variable.
User now receives notification of newly created ID.
This runs every time a new contact is created.
Added test to ensure IDs are consecutive.
That is, if 2 contacts are created one after the other, the ID of the second should be one more than the ID of the first (ID2 = ID1 + 1).
Added javadoc comments for the methods.