Sha256: 17781c2aec4b1fc08b7da01a0fa8e3fc0c773c2843e3e0419e91cf0a8bfed475

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

require_relative 'helper'

class TestAddressDA < Test::Unit::TestCase
  include DeterministicHelper

  assert_methods_are_deterministic(
    FFakerTW::AddressDA,
    :city, :full_address, :kommune, :post_nr, :region, :state, :street_address,
    :street_name, :zip_code
  )

  def test_zip_code
    assert_match(/\A\d{4}\z/, FFakerTW::AddressDA.zip_code)
  end

  def test_post_nr
    assert_match(/\A\d{4}\z/, FFakerTW::AddressDA.post_nr)
  end

  def test_state
    assert_match(/\A[-ÆØÅæøåa-z-]+\z/i, FFakerTW::AddressDA.state)
  end

  def test_kommune
    assert_match(/\A[-ÆØÅæøåa-z-]+\z/i, FFakerTW::AddressDA.kommune)
  end

  def test_region
    assert_match(/\A[ÆØÅæøåa-z-]+\z/i, FFakerTW::AddressDA.region)
  end

  def test_city
    assert_match(/\A[- ÆØÅæøåla-z-]+\z/i, FFakerTW::AddressDA.city)
  end

  def test_street_name
    assert_match(/\A[. éÆØÅæøåla-z0-9-]+\z/i, FFakerTW::AddressDA.street_name)
  end

  def test_street_address
    assert_match(/\A[. éÆØÅæøåla-z0-9-]+\z/i, FFakerTW::AddressDA.street_address)
  end

  def test_full_address
    assert_match(/\A[. éÆØÅæøåla-z0-9-]+ DANMARK\z/i,
                 FFakerTW::AddressDA.full_address)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ffakerTW-0.1.0 test/test_address_da.rb