Sha256: 3886d3907af5eec8d5171edaf0c3f56d23c3d9cac7f84a766b0cc152a07fcbc7

Contents?: true

Size: 796 Bytes

Versions: 2

Compression:

Stored size: 796 Bytes

Contents

# encoding: utf-8

require 'pio'

describe Pio::Features::Reply do
  describe '.new' do
    Given(:options) do
      {
        dpid: 0x123,
        n_buffers: 0x100,
        n_tables: 0xfe,
        capabilities: 0xc7,
        actions: 0xfff
      }
    end

    When(:features_reply) { Pio::Features::Reply.new(options) }

    Then { features_reply.ofp_version == 1 }
    Then { features_reply.message_type == Pio::Features::REPLY }
    Then { features_reply.transaction_id == 0 }
    Then { features_reply.xid == 0 }
    Then { features_reply.dpid == 0x123 }
    Then { features_reply.n_buffers == 0x100 }
    Then { features_reply.n_tables == 0xfe }
    Then { features_reply.capabilities == 0xc7 }
    Then { features_reply.actions == 0xfff }
    Then { features_reply.ports == [] }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pio-0.8.1 spec/pio/features/reply_spec.rb
pio-0.8.0 spec/pio/features/reply_spec.rb