Sha256: 97999ebaa1abe4bed64e611a8e93d0f1e39bb94d77e1338456b639a51434754f

Contents?: true

Size: 949 Bytes

Versions: 32

Compression:

Stored size: 949 Bytes

Contents

# encoding: UTF-8

require 'winrm/psrp/message_data/base'
require 'winrm/psrp/message_data/pipeline_host_call'

describe WinRM::PSRP::MessageData::PipelineHostCall do
  let(:raw_data) do
    "\xEF\xBB\xBF<Obj RefId=\"0\"><MS><I64 N=\"ci\">-100</I64><Obj N=\"mi\" RefId=\"1\">"\
    '<TN RefId="0"><T>System.Management.Automation.Remoting.RemoteHostMethodId</T>'\
    '<T>System.Enum</T><T>System.ValueType</T><T>System.Object</T></TN>'\
    '<ToString>WriteLine3</ToString><I32>17</I32></Obj><Obj N="mp" RefId="2">'\
    '<TN RefId="1"><T>System.Collections.ArrayList</T><T>System.Object</T></TN><LST>'\
    '<I32>7</I32><I32>0</I32><S>hello</S></LST></Obj></MS></Obj>'
  end

  subject { described_class.new(raw_data) }

  it 'parses method identifier' do
    expect(subject.method_identifier).to eq('WriteLine3')
  end

  it 'parses method parameters' do
    expect(subject.method_parameters[:s]).to eq('hello')
  end
end

Version data entries

32 entries across 29 versions & 3 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.2.5.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.2.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.2.3.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.2.2.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.2.0.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.1.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.1.2.0 vendor/bundle/ruby/2.3.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.1.1.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.0.4.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.0.3.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.0.2.0 vendor/bundle/ruby/2.5.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.0.1.0 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-2.0.0.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-1.9.8.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb
vagrant-unbundled-1.9.7.1 vendor/bundle/ruby/2.4.0/gems/winrm-2.2.3/tests/spec/psrp/message_data/pipeline_host_call_spec.rb