kuniri 0.0.1 → 0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +9 -7
- data/COPYING +160 -656
- data/Gemfile +4 -3
- data/README.md +57 -27
- data/Rakefile +3 -1
- data/bin/kuniri +50 -26
- data/data/aggregation_lang.rb +33 -0
- data/data/attribute_lang.rb +14 -87
- data/data/class_lang.rb +19 -41
- data/data/comment_lang.rb +52 -0
- data/data/conditional_lang.rb +14 -41
- data/data/constructor_lang.rb +4 -12
- data/data/end_block_lang.rb +7 -6
- data/data/extern_requirement_lang.rb +10 -17
- data/data/function_behavior_lang.rb +17 -66
- data/data/global_function_lang.rb +26 -0
- data/data/lang_syntax.rb +82 -49
- data/data/method_lang.rb +26 -0
- data/data/module_namespace_lang.rb +8 -13
- data/data/repetition_lang.rb +19 -32
- data/data/token_lang.rb +2 -44
- data/data/variable_behaviour_lang.rb +43 -0
- data/data/variable_global_lang.rb +13 -72
- data/kuniri.gemspec +4 -4
- data/lib/kuniri/core/configuration/language_available.rb +2 -2
- data/lib/kuniri/core/kuniri.rb +32 -24
- data/lib/kuniri/core/setting.rb +51 -85
- data/lib/kuniri/error/parser_error.rb +9 -0
- data/lib/kuniri/language/abstract_container/structured_and_oo/aggregation.rb +29 -0
- data/lib/kuniri/language/abstract_container/structured_and_oo/attribute.rb +0 -40
- data/lib/kuniri/language/abstract_container/structured_and_oo/global_tokens.rb +20 -0
- data/lib/kuniri/language/abstract_container/structured_and_oo/repetition.rb +9 -1
- data/lib/kuniri/language/abstract_container/structured_and_oo/variable_global.rb +0 -35
- data/lib/kuniri/language/container_data/structured_and_oo/aggregation_data.rb +23 -0
- data/lib/kuniri/language/container_data/structured_and_oo/attribute_data.rb +4 -2
- data/lib/kuniri/language/container_data/structured_and_oo/basic_structure.rb +24 -0
- data/lib/kuniri/language/container_data/structured_and_oo/class_data.rb +13 -19
- data/lib/kuniri/language/container_data/structured_and_oo/conditional_data.rb +2 -13
- data/lib/kuniri/language/container_data/structured_and_oo/constructor_data.rb +2 -0
- data/lib/kuniri/language/container_data/structured_and_oo/extern_requirement_data.rb +11 -6
- data/lib/kuniri/language/container_data/structured_and_oo/{file_element.rb → file_element_data.rb} +11 -9
- data/lib/kuniri/language/container_data/structured_and_oo/function_abstract.rb +58 -11
- data/lib/kuniri/language/container_data/structured_and_oo/function_data.rb +3 -3
- data/lib/kuniri/language/container_data/structured_and_oo/manager_basic_structure_data.rb +55 -0
- data/lib/kuniri/language/container_data/structured_and_oo/method_data.rb +5 -4
- data/lib/kuniri/language/container_data/structured_and_oo/module_namespace_data.rb +3 -1
- data/lib/kuniri/language/container_data/structured_and_oo/repetition_data.rb +2 -13
- data/lib/kuniri/language/container_data/structured_and_oo/variable_global_data.rb +2 -0
- data/lib/kuniri/language/language.rb +37 -11
- data/lib/kuniri/language/metadata.rb +29 -0
- data/lib/kuniri/language/ruby/aggregation_ruby.rb +37 -0
- data/lib/kuniri/language/ruby/attribute_ruby.rb +23 -38
- data/lib/kuniri/language/ruby/class_ruby.rb +2 -10
- data/lib/kuniri/language/ruby/conditional_ruby.rb +20 -6
- data/lib/kuniri/language/ruby/constructor_ruby.rb +5 -7
- data/lib/kuniri/language/ruby/end_block_ruby.rb +1 -1
- data/lib/kuniri/language/ruby/function_behavior_ruby.rb +1 -9
- data/lib/kuniri/language/ruby/global_function_ruby.rb +32 -0
- data/lib/kuniri/language/ruby/method_ruby.rb +33 -0
- data/lib/kuniri/language/ruby/repetition_ruby.rb +60 -14
- data/lib/kuniri/language/ruby/ruby_syntax.rb +76 -49
- data/lib/kuniri/parser/output_factory.rb +29 -0
- data/lib/kuniri/parser/output_format.rb +134 -0
- data/lib/kuniri/parser/parser.rb +3 -7
- data/lib/kuniri/parser/xml_builder_engine.rb +94 -0
- data/lib/kuniri/parser/xml_output_format.rb +143 -0
- data/lib/kuniri/state_machine/OO_structured_fsm/aggregation_state.rb +45 -0
- data/lib/kuniri/state_machine/OO_structured_fsm/attribute_state.rb +0 -1
- data/lib/kuniri/state_machine/OO_structured_fsm/basic_structure_state.rb +182 -0
- data/lib/kuniri/state_machine/OO_structured_fsm/class_state.rb +12 -3
- data/lib/kuniri/state_machine/OO_structured_fsm/conditional_state.rb +11 -68
- data/lib/kuniri/state_machine/OO_structured_fsm/constructor_state.rb +7 -52
- data/lib/kuniri/state_machine/OO_structured_fsm/function_behaviour_state.rb +86 -0
- data/lib/kuniri/state_machine/OO_structured_fsm/include_state.rb +2 -3
- data/lib/kuniri/state_machine/OO_structured_fsm/method_state.rb +8 -50
- data/lib/kuniri/state_machine/OO_structured_fsm/oo_structured_state.rb +6 -1
- data/lib/kuniri/state_machine/OO_structured_fsm/repetition_state.rb +10 -59
- data/lib/kuniri/state_machine/OO_structured_fsm/token_state_machine.rb +4 -0
- data/lib/kuniri/state_machine/OO_structured_fsm/variable_state.rb +0 -1
- data/lib/kuniri/version.rb +1 -1
- data/other/analyseFile.asta +0 -0
- data/spec/core/kuniri_spec.rb +2 -1
- data/spec/core/setting_spec.rb +35 -61
- data/spec/language/abstract_container/aggregation_spec.rb +13 -0
- data/spec/language/abstract_container/extern_requirement_spec.rb +13 -0
- data/spec/language/container_data/structured_and_oo/aggregation_data_spec.rb +29 -0
- data/spec/language/container_data/structured_and_oo/attribute_data_spec.rb +9 -2
- data/spec/language/container_data/structured_and_oo/class_data_spec.rb +1 -46
- data/spec/language/container_data/structured_and_oo/constructor_data_spec.rb +32 -2
- data/spec/language/container_data/structured_and_oo/extern_requirement_data_spec.rb +31 -7
- data/spec/language/container_data/structured_and_oo/{file_element_spec.rb → file_element_data_spec.rb} +21 -5
- data/spec/language/container_data/structured_and_oo/function_abstract_spec.rb +213 -0
- data/spec/language/container_data/structured_and_oo/function_data_spec.rb +31 -2
- data/spec/language/container_data/structured_and_oo/manager_basic_structure_data_spec.rb +150 -0
- data/spec/language/container_data/structured_and_oo/method_data_spec.rb +80 -0
- data/spec/language/container_data/structured_and_oo/module_namespace_spec.rb +7 -1
- data/spec/language/container_data/structured_and_oo/variable_global_data_spec.rb +9 -0
- data/spec/language/language_factory_spec.rb +1 -1
- data/spec/language/language_spec.rb +46 -9
- data/spec/language/ruby/aggregation_ruby_spec.rb +80 -0
- data/spec/language/ruby/class_ruby_spec.rb +66 -6
- data/spec/language/ruby/constructor_ruby_spec.rb +1 -1
- data/spec/language/ruby/end_block_ruby_spec.rb +11 -0
- data/spec/language/ruby/extern_requirement_ruby_spec.rb +59 -0
- data/spec/language/ruby/function_behavior_ruby_spec.rb +54 -2
- data/spec/language/ruby/global_test/.kuniri.yml +4 -0
- data/spec/language/ruby/global_test/complete_class_ruby_spec.rb +161 -0
- data/spec/language/ruby/global_test/conditional/.kuniri.yml +4 -0
- data/spec/language/ruby/global_test/conditional/.kuniri1.yml +4 -0
- data/spec/language/ruby/global_test/conditional/.kuniri2.yml +4 -0
- data/spec/language/ruby/global_test/conditional/.kuniri3.yml +4 -0
- data/spec/language/ruby/global_test/conditional/.kuniri4.yml +4 -0
- data/spec/language/ruby/global_test/conditional/.kuniri5.yml +4 -0
- data/spec/language/ruby/global_test/conditional/.kuniri6.yml +4 -0
- data/spec/language/ruby/global_test/conditional/a_lot_of_conditionals_spec.rb +92 -0
- data/spec/language/ruby/global_test/conditional/constructor_very_mix_conditional_spec.rb +105 -0
- data/spec/language/ruby/global_test/conditional/function_with_conditional_spec.rb +94 -0
- data/spec/language/ruby/global_test/conditional/function_with_nested_conditional_spec.rb +56 -0
- data/spec/language/ruby/global_test/conditional/method_very_mix_conditional_spec.rb +109 -0
- data/spec/language/ruby/global_test/conditional/very_deep_conditional_structure_spec.rb +61 -0
- data/spec/language/ruby/global_test/conditional/very_mix_conditional_spec.rb +105 -0
- data/spec/language/ruby/global_test/conditionalAndRepetition/.kuniri.yml +4 -0
- data/spec/language/ruby/global_test/conditionalAndRepetition/mix_conditional_repetition_spec.rb +57 -0
- data/spec/language/ruby/global_test/repetition/.kuniri.yml +4 -0
- data/spec/language/ruby/global_test/repetition/.kuniri2.yml +4 -0
- data/spec/language/ruby/global_test/repetition/.kuniri3.yml +4 -0
- data/spec/language/ruby/global_test/repetition/.kuniri4.yml +4 -0
- data/spec/language/ruby/global_test/repetition/.kuniri5.yml +4 -0
- data/spec/language/ruby/global_test/repetition/.kuniri6.yml +4 -0
- data/spec/language/ruby/global_test/repetition/.kuniri7.yml +4 -0
- data/spec/language/ruby/global_test/repetition/.kuniri8.yml +4 -0
- data/spec/language/ruby/global_test/repetition/complete_class_integrity.rb +41 -0
- data/spec/language/ruby/global_test/repetition/complete_class_until_loop_spec.rb +42 -0
- data/spec/language/ruby/global_test/repetition/complete_class_while_loop_spec.rb +41 -0
- data/spec/language/ruby/global_test/repetition/complete_class_with_repetition_spec.rb +42 -0
- data/spec/language/ruby/global_test/repetition/constructor_with_mix_repetition_spec.rb +57 -0
- data/spec/language/ruby/global_test/repetition/method_with_mix_repetition_spec.rb +59 -0
- data/spec/language/ruby/global_test/repetition/very_mix_repetition_spec.rb +61 -0
- data/spec/language/ruby/global_test/repetition/very_nested_repetition_spec.rb +65 -0
- data/spec/language/ruby/method_ruby_spec.rb +52 -0
- data/spec/language/ruby/repetition_ruby_spec.rb +175 -8
- data/spec/language/ruby/ruby_syntax_spec.rb +213 -84
- data/spec/parser/output_factory_spec.rb +32 -0
- data/spec/parser/output_format_spec.rb +83 -0
- data/spec/parser/parser_spec.rb +7 -0
- data/spec/parser/xmlSchemaValidate/.kuniri1.yml +3 -0
- data/spec/parser/xmlSchemaValidate/.kuniri2.yml +3 -0
- data/spec/parser/xmlSchemaValidate/.kuniri3.yml +3 -0
- data/spec/parser/xmlSchemaValidate/class_data.xsd +99 -0
- data/spec/parser/xmlSchemaValidate/fullCodeTwo.xsd +119 -0
- data/spec/parser/xmlSchemaValidate/fullCodeWithComments.xsd +146 -0
- data/spec/parser/xmlSchemaValidate/simpleFunction.xsd +25 -0
- data/spec/parser/xmlSchemaValidate/validate_xml_spec.rb +52 -0
- data/spec/parser/xml_builder_engine_spec.rb +258 -0
- data/spec/parser/xml_output_format_spec.rb +274 -0
- data/spec/samples/rubySyntaxParts/aggregation/classAggregation.rb +37 -0
- data/spec/samples/rubySyntaxParts/aggregation/constructorAggregation.rb +36 -0
- data/spec/samples/rubySyntaxParts/aggregation/methodAggregation.rb +36 -0
- data/spec/samples/rubySyntaxParts/aggregation/multipleAggregation.rb +59 -0
- data/spec/samples/rubySyntaxParts/comment/simple_multiple_line_comment_class.rb +7 -0
- data/spec/samples/rubySyntaxParts/comment/simple_single_line_comment_class.rb +2 -1
- data/spec/samples/rubySyntaxParts/conditionalStatment/aLotOfConditionals.rb +42 -0
- data/spec/samples/rubySyntaxParts/conditionalStatment/commonCasesOfConditionals.rb +47 -0
- data/spec/samples/rubySyntaxParts/conditionalStatment/constructorConditional.rb +1 -1
- data/spec/samples/rubySyntaxParts/conditionalStatment/constructorMixConditional.rb +41 -0
- data/spec/samples/rubySyntaxParts/conditionalStatment/methodMixConditional.rb +41 -0
- data/spec/samples/rubySyntaxParts/conditionalStatment/mixConditionalWithRepetition.rb +20 -0
- data/spec/samples/rubySyntaxParts/conditionalStatment/nestedConditional.rb +61 -0
- data/spec/samples/rubySyntaxParts/conditionalStatment/veryDeepConditionalStructure.rb +48 -0
- data/spec/samples/rubySyntaxParts/conditionalStatment/veryMixConditional.rb +37 -0
- data/spec/samples/rubySyntaxParts/fullCode/fullCodeTwo.rb +56 -0
- data/spec/samples/rubySyntaxParts/fullCode/fullCodeWithComments.rb +64 -0
- data/spec/samples/rubySyntaxParts/fullCode/simpleFullCode.rb +9 -1
- data/spec/samples/rubySyntaxParts/method/simpleMethod.rb +2 -0
- data/spec/samples/rubySyntaxParts/repetition/beginWithWhileLoopInClass.rb +10 -0
- data/spec/samples/rubySyntaxParts/repetition/constructorWithMixRepetition.rb +22 -0
- data/spec/samples/rubySyntaxParts/repetition/forLoopInClass.rb +7 -0
- data/spec/samples/rubySyntaxParts/repetition/methodWithMixRepetition.rb +19 -0
- data/spec/samples/rubySyntaxParts/repetition/mixConditionalRepetition.rb +17 -0
- data/spec/samples/rubySyntaxParts/repetition/untilLoopInClass.rb +16 -0
- data/spec/samples/rubySyntaxParts/repetition/veryMixRepetition.rb +28 -0
- data/spec/samples/rubySyntaxParts/repetition/veryNestedRepetition.rb +17 -0
- data/spec/samples/rubySyntaxParts/repetition/whileLoopInClass.rb +12 -0
- data/spec/state_machine/OO_structured_fsm/aggregation_state_spec.rb +67 -0
- data/spec/state_machine/OO_structured_fsm/class_state_spec.rb +15 -0
- data/spec/state_machine/OO_structured_fsm/conditional_state_spec.rb +64 -0
- data/spec/state_machine/OO_structured_fsm/include_state_spec.rb +3 -3
- data/spec/state_machine/OO_structured_fsm/method_state_spec.rb +18 -0
- data/spec/state_machine/OO_structured_fsm/repetition_state_spec.rb +27 -0
- metadata +195 -28
- data/lib/kuniri/core/configuration/monitor_available.rb +0 -13
- data/lib/kuniri/language/abstract_container/structured_and_oo/constructor.rb +0 -52
- data/lib/kuniri/parser/parser_xml.rb +0 -128
- data/spec/language/abstract_container/constructor_spec.rb +0 -13
- data/spec/util/html_logger_spec.rb +0 -31
- data/spec/util/logger_spec.rb +0 -20
- data/spec/util/txt_logger_spec.rb +0 -31
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
|
2
|
+
<xs:element name="kuniri">
|
|
3
|
+
<xs:complexType>
|
|
4
|
+
<xs:sequence>
|
|
5
|
+
<xs:element name="functionData" maxOccurs="unbounded" minOccurs="0">
|
|
6
|
+
<xs:complexType mixed="true">
|
|
7
|
+
<xs:sequence>
|
|
8
|
+
<xs:element name="parameterData" maxOccurs="unbounded" minOccurs="0">
|
|
9
|
+
<xs:complexType>
|
|
10
|
+
<xs:simpleContent>
|
|
11
|
+
<xs:extension base="xs:string">
|
|
12
|
+
<xs:attribute type="xs:string" name="name" use="optional"/>
|
|
13
|
+
</xs:extension>
|
|
14
|
+
</xs:simpleContent>
|
|
15
|
+
</xs:complexType>
|
|
16
|
+
</xs:element>
|
|
17
|
+
</xs:sequence>
|
|
18
|
+
<xs:attribute type="xs:string" name="name" use="optional"/>
|
|
19
|
+
<xs:attribute type="xs:string" name="visibility" use="optional"/>
|
|
20
|
+
</xs:complexType>
|
|
21
|
+
</xs:element>
|
|
22
|
+
</xs:sequence>
|
|
23
|
+
</xs:complexType>
|
|
24
|
+
</xs:element>
|
|
25
|
+
</xs:schema>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
require_relative '../../spec_helper'
|
|
2
|
+
require "xml"
|
|
3
|
+
|
|
4
|
+
RSpec.describe 'Xml Schema Validate' do
|
|
5
|
+
|
|
6
|
+
before :all do
|
|
7
|
+
@targetFolder = "./spec/parser/xmlSchemaValidate/"
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
RSpec.shared_examples "Multiple validation" do |config, xmlOutput, xsdFile, description|
|
|
11
|
+
|
|
12
|
+
it "Validate XSD: #{description}" do
|
|
13
|
+
kuniri = Kuniri::Kuniri.new
|
|
14
|
+
kuniri.read_configuration_file(@targetFolder + config)
|
|
15
|
+
kuniri.run_analysis
|
|
16
|
+
parser = Parser::XMLOutputFormat.new(kuniri.configurationInfo[:output])
|
|
17
|
+
parser.create_all_data(kuniri.get_parser())
|
|
18
|
+
xml = XML::Document.file(@targetFolder + xmlOutput)
|
|
19
|
+
schema = XML::Schema.document(XML::Document.file(@targetFolder + xsdFile))
|
|
20
|
+
|
|
21
|
+
expect(xml.validate_schema(schema)).to be true
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
context "When have support to the parser." do
|
|
27
|
+
|
|
28
|
+
config = '.kuniri1.yml'
|
|
29
|
+
xsd = 'fullCodeTwo.xsd'
|
|
30
|
+
xml = 'fullCodeTwo.xml'
|
|
31
|
+
description = 'Check simple class'
|
|
32
|
+
include_examples "Multiple validation", config, xml, xsd, description
|
|
33
|
+
|
|
34
|
+
config = '.kuniri2.yml'
|
|
35
|
+
xsd = 'fullCodeWithComments.xsd'
|
|
36
|
+
xml = 'fullCodeWithComments.xml'
|
|
37
|
+
description = 'Check class with comments'
|
|
38
|
+
include_examples "Multiple validation", config, xml, xsd, description
|
|
39
|
+
|
|
40
|
+
config = '.kuniri3.yml'
|
|
41
|
+
xsd = 'simpleFunction.xsd'
|
|
42
|
+
xml = 'simpleFunction.xml'
|
|
43
|
+
description = 'Check simple function'
|
|
44
|
+
include_examples "Multiple validation", config, xml, xsd, description
|
|
45
|
+
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
after :all do
|
|
49
|
+
@targetFolder = nil
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
end
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
require_relative '../spec_helper'
|
|
2
|
+
|
|
3
|
+
RSpec.describe Parser::XMLBuilderEngine do
|
|
4
|
+
|
|
5
|
+
before :each do
|
|
6
|
+
@builder = Parser::XMLBuilderEngine.new
|
|
7
|
+
@basicHeader = '<?xml version="1.0" encoding="UTF-8"?>'
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
context "Default options" do
|
|
11
|
+
it "Nothing" do
|
|
12
|
+
tag = @builder.to_xml
|
|
13
|
+
expect(tag).to eq(@basicHeader)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
it "Reset" do
|
|
17
|
+
@builder.reset_engine
|
|
18
|
+
tag = @builder.to_xml
|
|
19
|
+
expect(tag).to eq(@basicHeader)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
context "Generate class" do
|
|
24
|
+
it "Generate simple class" do
|
|
25
|
+
@builder.kuniri do
|
|
26
|
+
classData :name => "Xpto", :visibility => "public" do
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
output = [@basicHeader,
|
|
30
|
+
'<kuniri>',
|
|
31
|
+
' <classData name="Xpto" visibility="public">',
|
|
32
|
+
' </classData>',
|
|
33
|
+
'</kuniri>'].join("\n") + "\n"
|
|
34
|
+
expect(@builder.to_xml).to eq(output)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
it "Generate simple class with inheritance" do
|
|
38
|
+
@builder.kuniri do
|
|
39
|
+
classData :name => "Xpto", :visibility => "public" do
|
|
40
|
+
inheritanceData :name => "Abc"
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
output = [@basicHeader,
|
|
45
|
+
'<kuniri>',
|
|
46
|
+
' <classData name="Xpto" visibility="public">',
|
|
47
|
+
' <inheritanceData name="Abc"/>',
|
|
48
|
+
' </classData>',
|
|
49
|
+
'</kuniri>'].join("\n") + "\n"
|
|
50
|
+
expect(@builder.to_xml).to eq(output)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
it "Class with attribute" do
|
|
54
|
+
@builder.kuniri do
|
|
55
|
+
classData :name => "Xpto", :visibility => "public" do
|
|
56
|
+
attributeData :name => "abc", :visibility => "public"
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
output = [@basicHeader,
|
|
61
|
+
'<kuniri>',
|
|
62
|
+
' <classData name="Xpto" visibility="public">',
|
|
63
|
+
' <attributeData name="abc" visibility="public"/>',
|
|
64
|
+
' </classData>',
|
|
65
|
+
'</kuniri>'].join("\n") + "\n"
|
|
66
|
+
expect(@builder.to_xml).to eq(output)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it "Class with constructor" do
|
|
70
|
+
@builder.kuniri do
|
|
71
|
+
classData :name => "Xpto", :visibility => "public" do
|
|
72
|
+
constructorData :name => "initialize", :visibility => "public" do
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
output = [@basicHeader,
|
|
78
|
+
'<kuniri>',
|
|
79
|
+
' <classData name="Xpto" visibility="public">',
|
|
80
|
+
' <constructorData name="initialize" visibility="public">',
|
|
81
|
+
' </constructorData>',
|
|
82
|
+
' </classData>',
|
|
83
|
+
'</kuniri>'].join("\n") + "\n"
|
|
84
|
+
expect(@builder.to_xml).to eq(output)
|
|
85
|
+
end
|
|
86
|
+
|
|
87
|
+
it "Class with method" do
|
|
88
|
+
@builder.kuniri do
|
|
89
|
+
classData :name => "Xpto", :visibility => "public" do
|
|
90
|
+
methodData :name => "abc", :visibility => "public" do
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
output = [@basicHeader,
|
|
96
|
+
'<kuniri>',
|
|
97
|
+
' <classData name="Xpto" visibility="public">',
|
|
98
|
+
' <methodData name="abc" visibility="public">',
|
|
99
|
+
' </methodData>',
|
|
100
|
+
' </classData>',
|
|
101
|
+
'</kuniri>'].join("\n") + "\n"
|
|
102
|
+
expect(@builder.to_xml).to eq(output)
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
context "Conditional and repetition statement" do
|
|
107
|
+
it "If statement" do
|
|
108
|
+
@builder.kuniri do
|
|
109
|
+
classData :name => "Xpto", :visibility => "public" do
|
|
110
|
+
methodData :name => "abc", :visibility => "public" do
|
|
111
|
+
conditionalData :type => "if",
|
|
112
|
+
:expression => "x > 2"
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
output = [@basicHeader,
|
|
118
|
+
'<kuniri>',
|
|
119
|
+
' <classData name="Xpto" visibility="public">',
|
|
120
|
+
' <methodData name="abc" visibility="public">',
|
|
121
|
+
' <conditionalData type="if" expression="x > 2"/>',
|
|
122
|
+
' </methodData>',
|
|
123
|
+
' </classData>',
|
|
124
|
+
'</kuniri>'].join("\n") + "\n"
|
|
125
|
+
expect(@builder.to_xml).to eq(output)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
it "Unless statement" do
|
|
129
|
+
@builder.kuniri do
|
|
130
|
+
classData :name => "Xpto", :visibility => "public" do
|
|
131
|
+
methodData :name => "abc", :visibility => "public" do
|
|
132
|
+
conditionalData :type => "unless",
|
|
133
|
+
:expression => "(abc < 3) && (kto > 20)"
|
|
134
|
+
end
|
|
135
|
+
end
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
output = [@basicHeader,
|
|
139
|
+
'<kuniri>',
|
|
140
|
+
' <classData name="Xpto" visibility="public">',
|
|
141
|
+
' <methodData name="abc" visibility="public">',
|
|
142
|
+
' <conditionalData type="unless" expression="(abc < 3)' +
|
|
143
|
+
' && (kto > 20)"/>',
|
|
144
|
+
' </methodData>',
|
|
145
|
+
' </classData>',
|
|
146
|
+
'</kuniri>'].join("\n") + "\n"
|
|
147
|
+
expect(@builder.to_xml).to eq(output)
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
context "Global function" do
|
|
153
|
+
it "Simple global function" do
|
|
154
|
+
@builder.kuniri do
|
|
155
|
+
functionData :name => "xpto", :visibility => "global" do
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
output = [@basicHeader,
|
|
160
|
+
'<kuniri>',
|
|
161
|
+
' <functionData name="xpto" visibility="global">',
|
|
162
|
+
' </functionData>',
|
|
163
|
+
'</kuniri>'].join("\n") + "\n"
|
|
164
|
+
expect(@builder.to_xml).to eq(output)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
it "Global function with conditional" do
|
|
168
|
+
@builder.kuniri do
|
|
169
|
+
functionData :name => "xpto", :visibility => "global" do
|
|
170
|
+
conditionalData :type => "if", :expression => "u == 5"
|
|
171
|
+
end
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
output = [@basicHeader,
|
|
175
|
+
'<kuniri>',
|
|
176
|
+
' <functionData name="xpto" visibility="global">',
|
|
177
|
+
' <conditionalData type="if" expression="u == 5"/>',
|
|
178
|
+
' </functionData>',
|
|
179
|
+
'</kuniri>'].join("\n") + "\n"
|
|
180
|
+
expect(@builder.to_xml).to eq(output)
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
it "Global function with repetition" do
|
|
184
|
+
@builder.kuniri do
|
|
185
|
+
functionData :name => "xpto", :visibility => "global" do
|
|
186
|
+
repetitionData :type => "while", :expression => "(x < 0)"
|
|
187
|
+
end
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
output = [@basicHeader,
|
|
191
|
+
'<kuniri>',
|
|
192
|
+
' <functionData name="xpto" visibility="global">',
|
|
193
|
+
' <repetitionData type="while" expression="(x < 0)"/>',
|
|
194
|
+
' </functionData>',
|
|
195
|
+
'</kuniri>',].join("\n") + "\n"
|
|
196
|
+
expect(@builder.to_xml).to eq(output)
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
it "Global function with parameters" do
|
|
200
|
+
@builder.kuniri do
|
|
201
|
+
functionData :name => "xpto", :visibility => "global" do
|
|
202
|
+
parameterData :name => "one"
|
|
203
|
+
end
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
output = [@basicHeader,
|
|
207
|
+
'<kuniri>',
|
|
208
|
+
' <functionData name="xpto" visibility="global">',
|
|
209
|
+
' <parameterData name="one"/>',
|
|
210
|
+
' </functionData>',
|
|
211
|
+
'</kuniri>'].join("\n") + "\n"
|
|
212
|
+
expect(@builder.to_xml).to eq(output)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
it "Full global function" do
|
|
216
|
+
@builder.kuniri do
|
|
217
|
+
functionData :name => "xpto", :visibility => "global" do
|
|
218
|
+
parameterData :name => "two"
|
|
219
|
+
conditionalData :type => "if", :expression => "y == x"
|
|
220
|
+
repetitionData :type => "while", :expression => "k and y"
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
output = [@basicHeader,
|
|
225
|
+
'<kuniri>',
|
|
226
|
+
' <functionData name="xpto" visibility="global">',
|
|
227
|
+
' <parameterData name="two"/>',
|
|
228
|
+
' <conditionalData type="if" expression="y == x"/>',
|
|
229
|
+
' <repetitionData type="while" expression="k and y"/>',
|
|
230
|
+
' </functionData>',
|
|
231
|
+
'</kuniri>'].join("\n") + "\n"
|
|
232
|
+
expect(@builder.to_xml).to eq(output)
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
context "Global variable" do
|
|
238
|
+
it "Simple global variable" do
|
|
239
|
+
@builder.kuniri do
|
|
240
|
+
globalVariableData :name => "xpto"
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
output = [@basicHeader,
|
|
244
|
+
'<kuniri>',
|
|
245
|
+
' <globalVariableData name="xpto"/>',
|
|
246
|
+
'</kuniri>'].join("\n") + "\n"
|
|
247
|
+
expect(@builder.to_xml).to eq(output)
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
# context "Extern requirements" do
|
|
252
|
+
# end
|
|
253
|
+
|
|
254
|
+
after :each do
|
|
255
|
+
@builder = nil
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
end
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
require_relative '../spec_helper'
|
|
2
|
+
|
|
3
|
+
RSpec.describe Parser::XMLOutputFormat do
|
|
4
|
+
|
|
5
|
+
before :each do
|
|
6
|
+
@outputFormat = Parser::XMLOutputFormat.new
|
|
7
|
+
@stringHeader = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
context "Generate class" do
|
|
11
|
+
|
|
12
|
+
it "::Simple case class" do
|
|
13
|
+
expectedString = @stringHeader
|
|
14
|
+
expectedString += "<classData name=\"Xpto\" visibility=\"public\">\n"
|
|
15
|
+
expectedString += "</classData>\n"
|
|
16
|
+
classTmp = Languages::ClassData.new
|
|
17
|
+
classTmp.name = "Xpto"
|
|
18
|
+
@outputFormat.class_generate([classTmp])
|
|
19
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
it "::Set visibility" do
|
|
23
|
+
expectedString = @stringHeader
|
|
24
|
+
expectedString += "<classData name=\"Xpto\" visibility=\"private\">\n"
|
|
25
|
+
expectedString += "</classData>\n"
|
|
26
|
+
classTmp = Languages::ClassData.new
|
|
27
|
+
classTmp.name = "Xpto"
|
|
28
|
+
classTmp.visibility = "private"
|
|
29
|
+
@outputFormat.class_generate([classTmp])
|
|
30
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
it "::Set comment" do
|
|
34
|
+
expectedString = @stringHeader
|
|
35
|
+
expectedString += "<classData name=\"Xpto\" visibility=\"public\">\n"
|
|
36
|
+
expectedString += " <commentData text=\"This is a simple comment\"/>\n"
|
|
37
|
+
expectedString += "</classData>\n"
|
|
38
|
+
classTmp = Languages::ClassData.new
|
|
39
|
+
classTmp.name = "Xpto"
|
|
40
|
+
classTmp.comments = "This is a simple comment"
|
|
41
|
+
@outputFormat.class_generate([classTmp])
|
|
42
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
it "::Set aggregation" do
|
|
46
|
+
expectedString = @stringHeader
|
|
47
|
+
expectedString += "<aggregationData name=\"Class1\"/>\n"
|
|
48
|
+
aggregationTmp = Languages::AggregationData.new "Class1"
|
|
49
|
+
@outputFormat.aggregation_generate([aggregationTmp])
|
|
50
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
context "Generate constructor" do
|
|
57
|
+
|
|
58
|
+
it "::Simple constructor" do
|
|
59
|
+
expectedString = @stringHeader
|
|
60
|
+
expectedString += "<constructorData name=\"initialize\" "
|
|
61
|
+
expectedString += "visibility=\"public\">\n"
|
|
62
|
+
expectedString += "</constructorData>\n"
|
|
63
|
+
constructorTmp = Languages::ConstructorData.new("initialize")
|
|
64
|
+
@outputFormat.function_behaviour_generate("constructorData",
|
|
65
|
+
constructorTmp)
|
|
66
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
it "::Constructor with comment" do
|
|
70
|
+
expectedString = @stringHeader
|
|
71
|
+
expectedString += "<constructorData name=\"initialize\" "
|
|
72
|
+
expectedString += "visibility=\"public\">\n"
|
|
73
|
+
expectedString += " <commentData text=\"Comment constructor\"/>\n"
|
|
74
|
+
expectedString += "</constructorData>\n"
|
|
75
|
+
constructorTmp = Languages::ConstructorData.new("initialize")
|
|
76
|
+
constructorTmp.comments = "Comment constructor"
|
|
77
|
+
@outputFormat.function_behaviour_generate("constructorData",
|
|
78
|
+
constructorTmp)
|
|
79
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
it "::Constructor with conditional" do
|
|
83
|
+
expectedString = @stringHeader
|
|
84
|
+
expectedString += "<constructorData name=\"initialize\" "
|
|
85
|
+
expectedString += "visibility=\"public\">\n"
|
|
86
|
+
expectedString += ' <if expression="(x < 3)" level="0"/>'
|
|
87
|
+
expectedString += "\n</constructorData>\n"
|
|
88
|
+
|
|
89
|
+
constructorTmp = Languages::ConstructorData.new("initialize")
|
|
90
|
+
conditionalTmp = Languages::ConditionalData.new
|
|
91
|
+
conditionalTmp.type = Languages::IF_LABEL
|
|
92
|
+
conditionalTmp.expression = "(x < 3)"
|
|
93
|
+
|
|
94
|
+
constructorTmp.add_conditional(conditionalTmp)
|
|
95
|
+
|
|
96
|
+
@outputFormat.function_behaviour_generate("constructorData",
|
|
97
|
+
constructorTmp)
|
|
98
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
it "::Constructor with repetition" do
|
|
102
|
+
expectedString = @stringHeader
|
|
103
|
+
expectedString += "<constructorData name=\"initialize\" "
|
|
104
|
+
expectedString += "visibility=\"public\">\n"
|
|
105
|
+
expectedString += ' <for expression="i in x" level="0"/>'
|
|
106
|
+
expectedString += "\n</constructorData>\n"
|
|
107
|
+
|
|
108
|
+
constructorTmp = Languages::ConstructorData.new("initialize")
|
|
109
|
+
conditionalTmp = Languages::RepetitionData.new
|
|
110
|
+
conditionalTmp.type = Languages::FOR_LABEL
|
|
111
|
+
conditionalTmp.expression = "i in x"
|
|
112
|
+
|
|
113
|
+
constructorTmp.add_repetition(conditionalTmp)
|
|
114
|
+
|
|
115
|
+
@outputFormat.function_behaviour_generate("constructorData",
|
|
116
|
+
constructorTmp)
|
|
117
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
it "::Constructor with conditional and repetition" do
|
|
121
|
+
expectedString = @stringHeader
|
|
122
|
+
expectedString += "<constructorData name=\"initialize\" "
|
|
123
|
+
expectedString += "visibility=\"public\">\n"
|
|
124
|
+
expectedString += ' <if expression="(x < 3)" level="0"/>' + "\n"
|
|
125
|
+
expectedString += ' <for expression="i in x" level="0"/>'
|
|
126
|
+
expectedString += "\n</constructorData>\n"
|
|
127
|
+
|
|
128
|
+
constructorTmp = Languages::ConstructorData.new("initialize")
|
|
129
|
+
|
|
130
|
+
conditionalTmp = Languages::ConditionalData.new
|
|
131
|
+
conditionalTmp.type = Languages::IF_LABEL
|
|
132
|
+
conditionalTmp.expression = "(x < 3)"
|
|
133
|
+
constructorTmp.add_conditional(conditionalTmp)
|
|
134
|
+
|
|
135
|
+
conditionalTmp = Languages::RepetitionData.new
|
|
136
|
+
conditionalTmp.type = Languages::FOR_LABEL
|
|
137
|
+
conditionalTmp.expression = "i in x"
|
|
138
|
+
constructorTmp.add_repetition(conditionalTmp)
|
|
139
|
+
|
|
140
|
+
@outputFormat.function_behaviour_generate("constructorData",
|
|
141
|
+
constructorTmp)
|
|
142
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
context "::Generate initialize" do
|
|
148
|
+
|
|
149
|
+
it "::Simple inheritance" do
|
|
150
|
+
expectedString = @stringHeader
|
|
151
|
+
expectedString += "<inheritanceData name=\"Xpto\"/>\n"
|
|
152
|
+
inheritanceTmp = Languages::ClassData.new
|
|
153
|
+
inheritanceTmp.inheritances.push("Xpto")
|
|
154
|
+
@outputFormat.inheritance_generate(inheritanceTmp.inheritances)
|
|
155
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
it "::Double inheritance" do
|
|
159
|
+
expectedString = @stringHeader
|
|
160
|
+
expectedString += "<inheritanceData name=\"Xpto1\"/>\n\n"
|
|
161
|
+
expectedString += "<inheritanceData name=\"Xpto2\"/>\n"
|
|
162
|
+
inheritanceTmp = Languages::ClassData.new
|
|
163
|
+
inheritanceTmp.inheritances.push("Xpto1")
|
|
164
|
+
inheritanceTmp.inheritances.push("Xpto2")
|
|
165
|
+
@outputFormat.inheritance_generate(inheritanceTmp.inheritances)
|
|
166
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
it "::No inheritance" do
|
|
170
|
+
expectedString = @stringHeader.gsub("\n", "")
|
|
171
|
+
inheritanceTmp = Languages::ClassData.new
|
|
172
|
+
@outputFormat.inheritance_generate(inheritanceTmp.inheritances)
|
|
173
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
context "::Generate methods" do
|
|
179
|
+
|
|
180
|
+
it "::Generate simple method" do
|
|
181
|
+
expectedString = @stringHeader
|
|
182
|
+
expectedString += "<methodData name=\"xpto\" visibility=\"public\">\n"
|
|
183
|
+
expectedString += "</methodData>\n"
|
|
184
|
+
methodTmp = Languages::MethodData.new("xpto")
|
|
185
|
+
@outputFormat.function_behaviour_generate("methodData", methodTmp)
|
|
186
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
context "Cannot call unimplemented method." do
|
|
192
|
+
|
|
193
|
+
it "Create all data" do
|
|
194
|
+
expect(@outputFormat.create_all_data(nil)).to eq(nil)
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
it "Generate parameters" do
|
|
198
|
+
expectedString = @stringHeader
|
|
199
|
+
expectedString += "<parameterData name=\"value=1\"/>\n"
|
|
200
|
+
parameterTmp = {"value" => "1"}
|
|
201
|
+
@outputFormat.parameters_generate(parameterTmp)
|
|
202
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
it "Generate attribute" do
|
|
206
|
+
expectedString = @stringHeader
|
|
207
|
+
expectedString += "<attributeData name=\"xpto\" "
|
|
208
|
+
expectedString += "visibility=\"public\"/>\n"
|
|
209
|
+
attributeTmp = Languages::AttributeData.new("xpto")
|
|
210
|
+
@outputFormat.attribute_generate([attributeTmp])
|
|
211
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
it "Generate function" do
|
|
215
|
+
expectedString = @stringHeader
|
|
216
|
+
expectedString += '<functionData name="xpto" visibility="global">'
|
|
217
|
+
expectedString += "\n</functionData>\n"
|
|
218
|
+
functionTmp = Languages::FunctionData.new("xpto")
|
|
219
|
+
functionTmp.visibility = "global"
|
|
220
|
+
@outputFormat.function_behaviour_generate("functionData", functionTmp)
|
|
221
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
it "Generate global variable" do
|
|
225
|
+
expectedString = @stringHeader
|
|
226
|
+
expectedString += "<globalVariableData name=\"xpto\"/>\n"
|
|
227
|
+
globalVariableTmp = Languages::VariableGlobalData.new("xpto")
|
|
228
|
+
@outputFormat.global_variable_generate([globalVariableTmp])
|
|
229
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
it "Generate require" do
|
|
233
|
+
expectedString = @stringHeader
|
|
234
|
+
expectedString += "<externRequirementData name=\"xpto\"/>\n"
|
|
235
|
+
requireTmp = Languages::ExternRequirementData.new("xpto")
|
|
236
|
+
@outputFormat.extern_requirement_generate([requireTmp])
|
|
237
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
it "Generate module" do
|
|
241
|
+
expectedString = @stringHeader
|
|
242
|
+
expectedString += "<moduleData name=\"xpto\"/>\n"
|
|
243
|
+
moduleTmp = Languages::ModuleNamespaceData.new("xpto")
|
|
244
|
+
@outputFormat.module_generate([moduleTmp])
|
|
245
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
it "Generate repetition" do
|
|
249
|
+
expectedString = @stringHeader
|
|
250
|
+
expectedString += "<while expression=\"x>3\" level=\"0\"/>\n"
|
|
251
|
+
repetitionTmp = Languages::RepetitionData.new
|
|
252
|
+
repetitionTmp.type = Languages::WHILE_LABEL
|
|
253
|
+
repetitionTmp.expression = "x>3"
|
|
254
|
+
@outputFormat.basic_structure_generate([repetitionTmp])
|
|
255
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
it "Generate conditional" do
|
|
259
|
+
expectedString = @stringHeader
|
|
260
|
+
expectedString += "<if expression=\"y < 3\" level=\"0\"/>\n"
|
|
261
|
+
conditionalTmp = Languages::ConditionalData.new
|
|
262
|
+
conditionalTmp.type = Languages::IF_LABEL
|
|
263
|
+
conditionalTmp.expression = "y < 3"
|
|
264
|
+
@outputFormat.basic_structure_generate([conditionalTmp])
|
|
265
|
+
expect(@outputFormat.outputEngine.to_xml).to eq(expectedString)
|
|
266
|
+
end
|
|
267
|
+
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
after :each do
|
|
271
|
+
@outputFormat = nil
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
end
|