Closed logicminds closed 8 years ago
We should be able to take advantage of the new future parser and more intelligently build out the test code without having to use conditional logic to figure things out.
For example we can use code like below to get at the model tree
require 'puppet/pops' parser = Puppet::Pops::Parser::EvaluatingParser.new result = parser.parse_file(file_name) ast = result.current class_def = ast.body parameters = class_def.parameters param.eAllContents.entries data_type = Puppet::Pops::Types::TypeCalculator.infer( ast.eAllContents program.body.bodies[0].title.eContainer.eContainer.type_name.value econtainerFeature type = p1.type_expr.value
We should be able to take advantage of the new future parser and more intelligently build out the test code without having to use conditional logic to figure things out.
For example we can use code like below to get at the model tree