-
Notifications
You must be signed in to change notification settings - Fork 1
/
test_userStory12.py
42 lines (27 loc) · 2.42 KB
/
test_userStory12.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import unittest
from userStories import userStory12
import HtmlTestRunner
class TestUserStory12Class(unittest.TestCase):
""" Test the marriage_after_14 function from US10 """
def test_user_story_12_1(self):
resultsList = userStory12("InputGedFiles/UserStory12_GED/testUserStory12-1.ged")
self.assertEqual(resultsList, ['ERROR: INDIVIDUAL: US12: 93: I7: Mother I7 is more than 60 years older than her child (I1): Willard Carroll Smith.'])
def test_user_story_12_2(self):
resultsList = userStory12("InputGedFiles/UserStory12_GED/testUserStory12-2.ged")
self.assertEqual(resultsList,['ERROR: INDIVIDUAL: US12: 22: I1: Father I1 is more than 80 years older than his child (I3): Trey Smith.',
'ERROR: INDIVIDUAL: US12: 22: I1: Father I1 is more than 80 years older than his child (I5): Jaden Christopher Syre Smith.',
'ERROR: INDIVIDUAL: US12: 22: I1: Father I1 is more than 80 years older than his child (I6): Willow Camille Reign Smith.'])
def test_user_story_12_3(self):
resultsList = userStory12("InputGedFiles/UserStory12_GED/testUserStory12-3.ged")
self.assertEqual(resultsList, ['ERROR: INDIVIDUAL: US12: 22: I1: Father I1 is more than 80 years older than his child (I3): Trey Smith.',
'ERROR: INDIVIDUAL: US12: 22: I1: Father I1 is more than 80 years older than his child (I5): Jaden Christopher Syre Smith.',
'ERROR: INDIVIDUAL: US12: 22: I1: Father I1 is more than 80 years older than his child (I6): Willow Camille Reign Smith.',
'ERROR: INDIVIDUAL: US12: 35: I2: Mother I2 is more than 60 years older than her child (I3): Trey Smith.'])
def test_user_story_12_4(self):
resultsList = userStory12("InputGedFiles/UserStory12_GED/testUserStory12-4.ged")
self.assertEqual(resultsList, ['ERROR: INDIVIDUAL: US12: 77: I7: Mother I7 is more than 60 years older than her child (I9): Julia Elk.'])
def test_user_story_12_5(self):
resultsList = userStory12("InputGedFiles/UserStory12_GED/testUserStory12-5.ged")
self.assertEqual(resultsList, ['ERROR: INDIVIDUAL: US12: 93: I7: Mother I7 is more than 60 years older than her child (I1): Willard Carroll Smith.'])
if __name__ == "__main__":
unittest.main(testRunner=HtmlTestRunner.HTMLTestRunner(output='./reports'))