Sha256: 1685c6f907b62a66458e3554b038a599fe301438c69dc88095dc48f8536639e9

Contents?: true

Size: 752 Bytes

Versions: 15

Compression:

Stored size: 752 Bytes

Contents

# encoding: ASCII-8BIT
require 'helper'
require 'soap/marshal'


module SOAP
module Marshal


Foo1 = ::Struct.new("Foo1", :m)
Foo2 = ::Struct.new(:m)
class Foo3
  attr_accessor :m
end

class TestStruct < Test::Unit::TestCase
  def test_foo1
    org = Foo1.new
    org.m = org
    obj = convert(org)
    assert_equal(Foo1, obj.class)
    assert_equal(obj.m, obj)
  end

  def test_foo2
    org = Foo2.new
    org.m = org
    obj = convert(org)
    assert_equal(Foo2, obj.class)
    assert_equal(obj.m, obj)
  end

  def test_foo3
    org = Foo3.new
    org.m = org
    obj = convert(org)
    assert_equal(Foo3, obj.class)
    assert_equal(obj.m, obj)
  end

  def convert(obj)
    SOAP::Marshal.unmarshal(SOAP::Marshal.marshal(obj))
  end
end


end
end

Version data entries

15 entries across 15 versions & 9 rubygems

Version Path
malagant-soap4r-1.5.8.20141127181857 test/soap/marshal/test_struct.rb
rtiss_soap4r-1.6.1 test/soap/marshal/test_struct.rb
rtiss_soap4r-1.6.0 test/soap/marshal/test_struct.rb
eSpace_soap4r-1.5.8 test/soap/marshal/test_struct.rb
soap4r-ruby19-1.5.9 test/soap/marshal/test_struct.rb
tomdz-soap4r-1.5.8.20120202093209 test/soap/marshal/test_struct.rb
soap5r-2.0.3 test/soap/marshal/test_struct.rb
soap5r-2.0.2 test/soap/marshal/test_struct.rb
soap5r-2.0.1 test/soap/marshal/test_struct.rb
soap5r-2.0.0 test/soap/marshal/test_struct.rb
soap5r-2.0.0.20120130130121 test/soap/marshal/test_struct.rb
soap4r-sgonyea-1.5.9 test/soap/marshal/test_struct.rb
sunteya-soap4r-1.5.8.0 test/soap/marshal/test_struct.rb
tomdz-soap4r-1.5.8.20111103171510 test/soap/marshal/test_struct.rb
rubyjedi-soap4r-1.5.8.20100619003610 test/soap/marshal/test_struct.rb