Sha256: 617196b5cc97c48148d45a126055793c6d29d7145aa3644baf449c105622a39f

Contents?: true

Size: 1.4 KB

Versions: 8

Compression:

Stored size: 1.4 KB

Contents

require_relative '../test/core_pro_test_base'
require_relative '../lib/corepro/customer_beneficiary'

class AdCustomerBeneficiaryTest < CoreProTestBase

  def test_create
    cb = CorePro::CustomerBeneficiary.new
    cb.customerId = @@exampleCustomerId
    cb.firstName = 'Freddie'
    cb.lastName = "Mercury Ruby #{@@timestamp}"
    cb.birthDate = '1969-05-05T00:00:00.000+00:00'
    cb.taxId = '123412349'
    @@exampleCustomerBeneficiaryId = cb.create @@exampleConn, nil
    assert @@exampleCustomerBeneficiaryId > 0
  end

  def test_get
    cb = CorePro::CustomerBeneficiary.get @@exampleCustomerId, @@exampleCustomerBeneficiaryId, @@exampleConn, nil
    assert_instance_of CorePro::CustomerBeneficiary, cb
  end

  def test_list
    cbs = CorePro::CustomerBeneficiary.list @@exampleCustomerId, @@exampleConn, nil
    assert cbs.length > 0
  end

  def test_update
    cb = CorePro::CustomerBeneficiary.new
    cb.customerId = @@exampleCustomerId
    cb.customerBeneficiaryId = @@exampleCustomerBeneficiaryId
    cb.firstName = "Freddie #{@@timestamp}"
    cbid = cb.update @@exampleConn, nil
    assert_equal @@exampleCustomerBeneficiaryId, cbid
  end

  def test_zzz_deactivate
    cb = CorePro::CustomerBeneficiary.new
    cb.customerId = @@exampleCustomerId
    cb.customerBeneficiaryId = @@exampleCustomerBeneficiaryId
    cbid = cb.deactivate @@exampleConn, nil
    assert_equal @@exampleCustomerBeneficiaryId, cbid
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
corepro_fvr-1.0.9 test/ad_customer_beneficiary_test.rb
corepro_eg-1.0.8 test/ad_customer_beneficiary_test.rb
corepro_eg-1.0.7 test/ad_customer_beneficiary_test.rb
corepro_eg-1.0.6 test/ad_customer_beneficiary_test.rb
corepro_eg-1.0.5 test/ad_customer_beneficiary_test.rb
corepro_eg-1.0.4 test/ad_customer_beneficiary_test.rb
corepro_eg-1.0.3 test/ad_customer_beneficiary_test.rb
corepro_eg-1.0.2 test/ad_customer_beneficiary_test.rb