import nose
from addressbook import *

'''A suite of unit tests for AddressBook.'''

def test_add_contact():
    book = AddressBook(Contact())
    # assert that book's list of Contacts has the new Contact.

def test_missing_contact():
    '''Test whether removing a non-existent Contact does something reasonable.'''
    try:
        book = AddressBook()
        book.remove_contact("Bill")
        assert False, "This line should not be reached."
    except ContactDoesNotExistException:
        pass # I expect this to happen.
    except Exception, e:
        assert False, \
               "ContactDoesNotExistException should have been thrown, but" + \
               " instead we got " + repr(e)
        
