Sha256: 95b91d94f68ab943db335c23604fbee225108cd48ca13c430bade305f28ec128
Contents?: true
Size: 1.64 KB
Versions: 8
Compression:
Stored size: 1.64 KB
Contents
require 'sdp/description' Given /^I know what the SDP file should look like$/ do @example_sdp_file = File.read(File.dirname(__FILE__) + "/../support/sdp_file.txt") end When /^I build the Ruby object with the appropriate fields$/ do @session = SDP::Description.new @session.protocol_version = 0 @session.username = "jdoe" @session.id = 2890844526 @session.version = 2890842807 @session.network_type = :IN @session.address_type = :IP4 @session.unicast_address = "10.47.16.5" @session.name = "SDP Seminar" @session.information = "A Seminar on the session description protocol" @session.uri = "http://www.example.com/seminars/sdp.pdf" @session.email_address = "j.doe@example.com (Jane Doe)" @session.connection_network_type = "IN" @session.connection_address_type = "IP4" @session.connection_address = "224.2.17.12/127" @session.start_time = 2873397496 @session.stop_time = 2873404696 @session.attributes << { :attribute => "recvonly" } @session.media_sections << { :media => "audio", :port => 49170, :protocol => "RTP/AVP", :format => 0 } @session.media_sections << { :media => "video", :port => 51372, :protocol => "RTP/AVP", :format => 99, :attributes => [{ :attribute => "rtpmap", :value => "99 h263-1998/90000" }] } end Then /^the resulting file should look like the intended description$/ do @session.to_s.should == @example_sdp_file end Given /^I create an SDP object with no parameters$/ do @session = SDP::Description.new end When /^I convert it to a String$/ do @sdp_string = @session.to_s end Then /^it should have :version set to (\d+)$/ do |value| @sdp_string.should match /v=#{value}/ end
Version data entries
8 entries across 8 versions & 1 rubygems