def test_rule_028(self):
     oRule = process.rule_028()
     self.assertTrue(oRule)
     self.assertEqual(oRule.name, 'process')
     self.assertEqual(oRule.identifier, '028')
     dExpected = utils.add_violation_list([27, 33])
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)
 def test_fix_rule_028(self):
     oRule = process.rule_028()
     dExpected = []
     oRule.fix(oFile)
     oRule.analyze(oFile)
     self.assertEqual(oRule.violations, dExpected)
     self.assertEqual(oFile.lines[37].line, '          ) is -- This is a comment')
     self.assertEqual(oFile.lines[43].line, '          ) is')
     self.assertEqual(oFile.lines[31].line, '          ) is')
    def test_fix_rule_028(self):
        oRule = process.rule_028()
        dExpected = []
        oRule.fix(self.oFile)
        self.assertEqual(self.oFile.lines[27].line, '             ) iS')
        self.assertEqual(self.oFile.lines[33].line, '        )   Is -- This is a comment')

        oRule.analyze(self.oFile)
        self.assertEqual(oRule.violations, dExpected)
    def test_rule_028(self):
        oRule = process.rule_028()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'process')
        self.assertEqual(oRule.identifier, '028')

        lExpected = [19, 24]

        oRule.analyze(self.oFile)
        self.assertEqual(lExpected, utils.extract_violation_lines_from_violation_object(oRule.violations))
    def test_fix_rule_028(self):
        oRule = process.rule_028()

        oRule.fix(self.oFile)

        lActual = self.oFile.get_lines()

        self.assertEqual(lExpected, lActual)

        oRule.analyze(self.oFile)
        self.assertEqual(oRule.violations, [])