def test_rule_017(self): oRule = instantiation.rule_017() self.assertTrue(oRule) self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '017') dExpected = [utils.add_violation(54)] oRule.analyze(oFileGeneric) self.assertEqual(oRule.violations, dExpected)
def test_fix_rule_017(self): oRule = instantiation.rule_017() oRule.fix(self.oFileGeneric) oRule.analyze(self.oFileGeneric) self.assertEqual(oRule.violations, [])
def test_rule_017(self): oRule = instantiation.rule_017() self.assertTrue(oRule) self.assertEqual(oRule.name, 'instantiation') self.assertEqual(oRule.identifier, '017') self.assertTrue(oRule.depricated)