def test_rule_022(self):
        oRule = instantiation.rule_022()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'instantiation')
        self.assertEqual(oRule.identifier, '022')

        dExpected = utils.add_violation_list([26, 27])
        oRule.analyze(oFilePort)
        self.assertEqual(oRule.violations, dExpected)
Example #2
0
 def test_fix_rule_022(self):
     oRule = instantiation.rule_022()
     oRule.fix(oFile)
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, [])
Example #3
0
 def test_rule_022(self):
     oRule = instantiation.rule_022()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'instantiation')
     self.assertEqual(oRule.identifier, '022')
     self.assertTrue(oRule.depricated)