示例#1
0
 def test_fix_fule_025(self):
     oRule = instantiation.rule_025()
     oRule.fix(self.oFileGeneric)
     oRule.analyze(self.oFileGeneric)
     self.assertEqual(oRule.violations, [])
     self.assertEqual(self.oFileGeneric.lines[81].line, '    generic map (')
     self.assertEqual(self.oFileGeneric.lines[82].line, '      GENERIC_1 =>   generic_1,')
    def test_rule_025(self):
        oRule = instantiation.rule_025()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'instantiation')
        self.assertEqual(oRule.identifier, '025')

        dExpected = [utils.add_violation(81)]
        oRule.analyze(oFileGeneric)
        self.assertEqual(oRule.violations, dExpected)