def test_rule_018(self):
        oRule = instantiation.rule_018()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'instantiation')
        self.assertEqual(oRule.identifier, '018')

        dExpected = utils.add_violation_list([26, 33, 54, 66])
        oRule.analyze(oFileGeneric)
        self.assertEqual(oRule.violations, dExpected)
 def test_fix_rule_018(self):
     oRule = instantiation.rule_018()
     oRule.fix(self.oFileGeneric)
     oRule.analyze(self.oFileGeneric)
     self.assertEqual(oRule.violations, [])
예제 #3
0
 def test_rule_018(self):
     oRule = instantiation.rule_018()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'instantiation')
     self.assertEqual(oRule.identifier, '018')
     self.assertTrue(oRule.depricated)