
import unittest

from vowel_rule import VowelRule
from diphthong_rule import DiphthongRule
from consonant_rule import ConsonantRule
from hyphenation_rule import HyphenationRule
from rule_based_hyphenator import RuleBasedHyphenator

class Test(unittest.TestCase):


    def setUp(self):
        self.vowel_rule = VowelRule()
        self.diphthong_rule = DiphthongRule()
        self.consonant_rule = ConsonantRule()

    
    def test_vowel_rule(self):
        '''
        Tests the VowelRule class.
        '''
        self.assertEqual(2, self.vowel_rule.next_hyphen("SEOTA", 0),
                "seota should have one of its hyphens placed by VowelRule at character position 2. ")

        # WRITE MORE TESTS




    def test_consonant_rule(self):
        '''
        Tests the ConsonantRule class.
        '''

        self.assertEqual(3, self.consonant_rule.next_hyphen("SEOTA", 2), 
                          "seota should have one of its hyphens placed by ConsonantRule at character position 3. ")

        # WRITE MORE TESTS



    def test_diphthong_rule(self):
        self.assertEqual(3, self.diphthong_rule.next_hyphen("LIIAN", 0), 
                          "liian should have one of its hyphens placed by DiphthongRule at character position 3. ")

        # WRITE MORE TESTS        

    

if __name__ == "__main__":
    #import sys;sys.argv = ['', 'Test.testName']
    unittest.main()
    

