def test_rule_019(self):
        oRule = entity.rule_019()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'entity')
        self.assertEqual(oRule.identifier, '019')

        lExpected = [{'lines': [{'number': 133}], 'entity': 'entity1'}]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, lExpected)
    def test_rule_019(self):
        oRule = entity.rule_019()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'entity')
        self.assertEqual(oRule.identifier, '019')

        dExpected = [133]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)
    def test_rule_019(self):
        oRule = entity.rule_019()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'entity')
        self.assertEqual(oRule.identifier, '019')

        dExpected = [{'entity': 'ENTITY1', 'lineNumber': 133}]
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)
Example #4
0
    def test_rule_019_remove(self):
        oRule = entity.rule_019()
        oRule.action = 'remove'

        lExpected = [4]

        oRule.analyze(self.oFile)
        self.assertEqual(
            lExpected,
            utils.extract_violation_lines_from_violation_object(
                oRule.violations))
Example #5
0
    def test_fix_rule_019_add(self):
        oRule = entity.rule_019()

        oRule.fix(self.oFile)

        lActual = self.oFile.get_lines()

        self.assertEqual(lExpected_add, lActual)

        oRule.analyze(self.oFile)
        self.assertEqual(oRule.violations, [])
Example #6
0
    def test_rule_019_add(self):
        oRule = entity.rule_019()
        self.assertTrue(oRule)
        self.assertEqual(oRule.name, 'entity')
        self.assertEqual(oRule.identifier, '019')

        lExpected = [9]

        oRule.analyze(self.oFile)
        self.assertEqual(
            lExpected,
            utils.extract_violation_lines_from_violation_object(
                oRule.violations))
 def test_fix_rule_019(self):
     oRule = entity.rule_019()
     oRule.fix(self.oFile)
     oRule.analyze(self.oFile)
     self.assertEqual(self.oFile.lines[133].line, 'end entity ENTITY1;')
     self.assertEqual(oRule.violations, [])
    def test_rule_entity_019_enclosed_with_vsg_off_and_vsg_on(self):
        oRule = entity.rule_019()

        dExpected = []
        oRule.analyze(oFile)
        self.assertEqual(oRule.violations, dExpected)
Example #9
0
    def test_rule_entity_019(self):
        oRule = entity.rule_019()

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