Permalink
Browse files

новый мапер для SecurityWithSignature

  • Loading branch information...
1 parent ff526b2 commit a224fd94857deb6ff6dbb023adc6d144d8b8ab65 @bashmish bashmish committed Apr 1, 2013
@@ -0,0 +1,12 @@
+# encoding: utf-8
+
+class SecurityWithSignatureMapper
+ include XmlSchemaMapper
+ schema File.expand_path('../../vendor/ezags-protocols/retro/SecurityWithSignature.xsd', File.dirname(__FILE__))
+ type 'SecurityWithSignature'
+
+ # @return [SignatureTypeMapper]
+ # minOccurs: 1, maxOccurs: 1
+ attr_accessor :signature
+
+end
View
@@ -34,6 +34,7 @@ class CLI < Thor
def update_retro
@script.generate(xsd_path 'retro/GetResultsService.xsd')
+ @script.generate(xsd_path 'retro/SecurityWithSignature.xsd')
end
def update_upload
@@ -0,0 +1,17 @@
+require 'spec_helper'
+require "xml_schema_mapper/test_builder"
+
+ # @attr Signature [SignatureType]
+
+
+describe SecurityWithSignatureMapper do
+
+ include XmlSchemaMapper::TestBuilder::Helper
+
+ subject { build_described_mapper }
+
+ it "should be self-compatible xml <-> object" do
+ described_class.parse(subject.to_xml).to_xml.should eql subject.to_xml
+ end
+
+end

0 comments on commit a224fd9

Please sign in to comment.