class Sloe::Expectations::Ixia::HavePacketLossDurationLessThan
Public Class Methods
new(duration)
click to toggle source
# File lib/sloe/expectations.rb, line 21 def initialize(duration) @duration = duration end
Public Instance Methods
failure_message_for_should()
click to toggle source
# File lib/sloe/expectations.rb, line 34 def failure_message_for_should @lossy_flows end
match(actual)
click to toggle source
# File lib/sloe/expectations.rb, line 25 def match(actual) @lossy_flows = actual.select do |row| if row['Packet Loss Duration (ms)'].to_f > @duration.to_f "#{row['Traffic Item']}\t #{row['Source/Dest Endpoint Pair']}:\t\t #{row['Packet Loss Duration (ms)']}\n" end end @lossy_flows.size == 0 end