Sha256: 3ca7f36bacab15149ddd63c00ff61328d7f0a18a53e79f42ee9a877d72a17b8e

Contents?: true

Size: 690 Bytes

Versions: 5

Compression:

Stored size: 690 Bytes

Contents

require 'pio/open_flow10/set_tos'

describe Pio::OpenFlow10::SetTos do
  describe '.new' do
    context 'with 32' do
      When(:set_tos) { Pio::OpenFlow10::SetTos.new(32) }

      describe '#type_of_service' do
        Then { set_tos.type_of_service == 32 }
      end

      describe '#action_type' do
        Then { set_tos.action_type == 8 }
      end

      describe '#action_length' do
        Then { set_tos.action_length == 8 }
      end

      describe '#to_binary' do
        Then { set_tos.to_binary.length == 8 }
      end
    end

    context 'with 1' do
      When(:set_tos) { Pio::OpenFlow10::SetTos.new(1) }
      Then { set_tos == Failure(ArgumentError) }
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pio-0.30.1 spec/pio/open_flow10/set_tos_spec.rb
pio-0.30.0 spec/pio/open_flow10/set_tos_spec.rb
pio-0.29.0 spec/pio/open_flow10/set_tos_spec.rb
pio-0.28.1 spec/pio/open_flow10/set_tos_spec.rb
pio-0.28.0 spec/pio/open_flow10/set_tos_spec.rb