# File lib/puppet/vendor/rgen/test/model_builder/serializer_test.rb, line 32 def test_ecore_internal File.open(File.dirname(__FILE__)+"/ecore_internal.rb","w") do |f| serializer = RGen::ModelBuilder::ModelSerializer.new(f, RGen::ECore.ecore) serializer.serialize(RGen::ECore.ecore) end end
# File lib/puppet/vendor/rgen/test/model_builder/serializer_test.rb, line 39 def test_roundtrip model = %Q{\ statemachine "Airconditioner" do state "Off", :kind => :START compositeState "On" do state "Heating" state "Cooling" state "Dumm" end transition "_Transition1", :sourceState => "On.Cooling", :targetState => "On.Heating" transition "_Transition2", :sourceState => "On.Heating", :targetState => "On.Cooling" end } check_roundtrip(StatemachineMetamodel, model) end
# File lib/puppet/vendor/rgen/test/model_builder/serializer_test.rb, line 67 def test_roundtrip_ambiguous_role model = %Q{\ a "_A1" do b "_B1", :as => :role1 b "_B2", :as => :role2 c "_C1", :as => :role2 end } check_roundtrip(AmbiguousRoleMM, model) end