Sha256: 8025740d7dd482f367007b70f0a72db2e78cf7b4d0b92b1dc465843726526d80

Contents?: true

Size: 813 Bytes

Versions: 6

Compression:

Stored size: 813 Bytes

Contents

require 'parser_helper'
require 'mws/orders/parsers/shipping_address'

class ShippingAddressParserTest < ParserTest
  def setup
    node = fixture('orders/orders').xpath('//xmlns:ShippingAddress').first
    @address = MWS::Orders::Parsers::ShippingAddress.new(node)
  end

  def test_name
    assert_kind_of String, @address.name
  end

  def test_address_lines
    assert_kind_of Array, @address.address_lines
    @address.address_lines.each do |line|
      assert_kind_of String, line
    end
  end

  def test_city
    assert_kind_of String, @address.city
  end

  def test_state_or_region
    assert_kind_of String, @address.state_or_region
  end

  def test_postal_code
    assert_kind_of String, @address.postal_code
  end

  def test_country_code
    assert_kind_of String, @address.country_code
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
peddler-0.6.5 test/mws/orders/parsers/test_shipping_address.rb
peddler-0.6.4 test/mws/orders/parsers/test_shipping_address.rb
peddler-0.6.3 test/mws/orders/parsers/test_shipping_address.rb
peddler-0.6.2 test/mws/orders/parsers/test_shipping_address.rb
peddler-0.6.1 test/mws/orders/parsers/test_shipping_address.rb
peddler-0.6.0 test/mws/orders/parsers/test_shipping_address.rb