def test_rule_007(self):
        oRule = instantiation.rule_007()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'instantiation')
        self.assertEqual(oRule.identifier, '007')

        dExpected = [utils.add_violation(55)]
        oRule.analyze(oFilePort)
        self.assertEqual(oRule.violations, dExpected)
Пример #2
0
 def test_fix_rule_007(self):
     oRule = instantiation.rule_007()
     oRule.fix(oFile)
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, [])
Пример #3
0
 def test_rule_007(self):
     oRule = instantiation.rule_007()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'instantiation')
     self.assertEqual(oRule.identifier, '007')
     self.assertTrue(oRule.depricated)