Sha256: 98afbcba1c92950d984c6d3b5e9e308c80ac50676251ca7ea7ed4e744adc357d
Contents?: true
Size: 944 Bytes
Versions: 8
Compression:
Stored size: 944 Bytes
Contents
require 'pio/open_flow10/set_vlan_vid' describe Pio::SetVlanVid do describe '.new' do When(:set_vlan_vid) { Pio::SetVlanVid.new(vlan_id) } context 'with 10' do When(:vlan_id) { 10 } describe '#vlan_id' do Then { set_vlan_vid.vlan_id == 10 } end describe '#type' do Then { set_vlan_vid.type == 1 } end describe '#message_length' do Then { set_vlan_vid.message_length == 8 } end describe '#to_binary' do Then { set_vlan_vid.to_binary.length == 8 } end end context 'with 0' do When(:vlan_id) { 0 } Then { set_vlan_vid == Failure(ArgumentError) } end context 'with 4906' do When(:vlan_id) { 4096 } Then { set_vlan_vid == Failure(ArgumentError) } end context 'with :INVALID_VLAN_ID' do When(:vlan_id) { :INVALID_VLAN_ID } Then { set_vlan_vid == Failure(TypeError) } end end end
Version data entries
8 entries across 8 versions & 1 rubygems