# nametest2.py

""" Unit tests for name """

import name_phone
import cornellasserts

def test_last_name_first():
    """Calls all the tests for last_name_first"""
    print('Testing function last_name_first')

    # Test Case 1
    result = name_phone.last_name_first('Katherine Johnson')
    cornellasserts.assert_equals('Johnson, Katherine', result)
    # Test Case 2
    result = name_phone.last_name_first('Katherine     Johnson')
    cornellasserts.assert_equals('Johnson, Katherine', result)


def test_get_campus_num():
    """Calls all the tests for get_campus_num"""
    print('Testing function get_campus_num')
    # Test case 1
    result= name_phone.get_campus_num('6071231234')
    cornellasserts.assert_equals('3-1234', result)
    # Test case 2
    result= name_phone.get_campus_num('1111111111')
    cornellasserts.assert_equals('1-1111', result)


# Execution of the testing code
test_last_name_first()
test_get_campus_num()
print('All tests of the module name_phone passed')
