#!/usr/bin/env python3

import unittest
from emails import find_email


class EmailsTest(unittest.TestCase):
  def test_basic(self):
    testcase = [None, "Bree", "Campbell"]
    expected = "breee@abc.edu"
    self.assertEqual(find_email(testcase), expected)

  def test_one_name(self):
    testcase = [None, "John"]
    expected = "Missing parameters"
    self.assertEqual(find_email(testcase), expected)

  def test_two_name(self):
    testcase = [None, "Roy","Cooper"]
    expected = "No email address found"
    self.assertEqual(find_email(testcase), expected)

if __name__ == '__main__':
  unittest.main()

"""
Here, variable test case contains the parameters to be passed to the script emails.py.
 As we mentioned, the script file is the first element of input parameters through command line using argv. 
 Since we already imported the function find_email from emails.py earlier,
 we will pass None in place of the script file and call it later in the script. 
 Adding to None, we will pass a first name and last name as parameters.
"""