Sha256: a2d08300fbcb78cbb5a9e69790b1fa6b6643afd953f188d6f15dbbe028ff8d73

Contents?: true

Size: 1.03 KB

Versions: 3

Compression:

Stored size: 1.03 KB

Contents

require 'test/unit'
require 'yaml'
require File.expand_path '../../../../lib/model/ws_config.rb', __FILE__
require File.expand_path '../../../../lib/config/app_config_params.rb', __FILE__

class TestWsConfig < Test::Unit::TestCase

  include Theotokos::Model
  include Theotokos::Configuration
  
  def test_load_ws_config
    _prepare_test
    
    conf = WsConfig.load_ws_config
    assert_equal conf.namespaces, { 'xmlns:soapenv' => 'http://schemas.xmlsoap.org/soap/envelope/', 'xmlns:wsdl' => 'http://interfaceSiconv.cs.siconv.mp.gov.br/' }
    assert_equal conf.env_namespace, 'soapenv'
    assert_equal conf.ssl_verify_mode, :none
    assert_equal conf.ssl_version, :SSLv3
    assert_equal conf.ssl_cert_file, '/path/to/cert.file'
    assert_equal conf.ssl_cert_key_file, '/path/to/cert/key/file'
    assert_equal conf.ssl_ca_cert_file, '/path/to/ca/cert/file'
    assert_equal conf.ssl_cert_key_password, 'pass'
  end
  
  private
  def _prepare_test
    ENV['app.cfg.path'] = 'test/app-cfg.yml'
    AppConfigParams.load_app_config_params
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
theotokos-0.1.3 test/unit/model/test_ws_config.rb
theotokos-0.1.2 test/unit/model/test_ws_config.rb
theotokos-0.1.1 test/unit/model/test_ws_config.rb