Exemple #1
0
 def test_fix_rule_020(self):
     oRule = instantiation.rule_020()
     oRule.fix(oFile)
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, [])
     self.assertEqual(oFile.lines[64].indentLevel,
                      oFile.lines[63].indentLevel + 1)
    def test_rule_020(self):
        oRule = instantiation.rule_020()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'instantiation')
        self.assertEqual(oRule.identifier, '020')

        dExpected = [utils.add_violation(58)]
        oRule.analyze(oFilePort)
        self.assertEqual(oRule.violations, dExpected)
Exemple #3
0
 def test_rule_020(self):
     oRule = instantiation.rule_020()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'instantiation')
     self.assertEqual(oRule.identifier, '020')
     self.assertTrue(oRule.depricated)