diff options
| author | Kim van der Riet <kpvdr@apache.org> | 2012-08-03 12:13:32 +0000 |
|---|---|---|
| committer | Kim van der Riet <kpvdr@apache.org> | 2012-08-03 12:13:32 +0000 |
| commit | d43d1912b376322e27fdcda551a73f9ff5487972 (patch) | |
| tree | ce493e10baa95f44be8beb5778ce51783463196d /cpp/bindings/qpid/ruby/features | |
| parent | 04877fec0c6346edec67072d7f2d247740cf2af5 (diff) | |
| download | qpid-python-d43d1912b376322e27fdcda551a73f9ff5487972.tar.gz | |
QPID-3858: Updated branch - merged from trunk r.1368650
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/asyncstore@1368910 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/bindings/qpid/ruby/features')
6 files changed, 29 insertions, 12 deletions
diff --git a/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature b/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature index f509f49115..1f758153af 100644 --- a/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature +++ b/cpp/bindings/qpid/ruby/features/creating_a_receiver.feature @@ -21,9 +21,9 @@ Feature: Creating a receiver Scenario: The address string is fine Given an open session - Then creating a receiver with "my-queue;{create:always}" succeeds + Then creating a receiver with "my-queue;{create:always,delete:always}" succeeds Scenario: Using an Address object Given an open session - And an Address with the name "create-receiver-test" and subject "foo" and option "create" set to "always" + And an Address with the name "create-receiver-test" and subject "foo" and option "create" set to "always" and "delete" set to "always" Then creating a receiver with an Address succeeds diff --git a/cpp/bindings/qpid/ruby/features/creating_a_sender.feature b/cpp/bindings/qpid/ruby/features/creating_a_sender.feature index ac75543c2d..1c09ff837d 100644 --- a/cpp/bindings/qpid/ruby/features/creating_a_sender.feature +++ b/cpp/bindings/qpid/ruby/features/creating_a_sender.feature @@ -5,11 +5,11 @@ Feature: Creating a sender Scenario: The session is closed Given a closed session - Then creating a sender with "my-queue;{create:always}" raises an exception + Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception Scenario: The connection is closed Given an open session with a closed connection - Then creating a sender with "my-queue;{create:always}" raises an exception + Then creating a sender with "my-queue;{create:always,delete:always}" raises an exception Scenario: The address is malformed Given an open session @@ -17,7 +17,7 @@ Feature: Creating a sender Scenario: The address string is valid Given an open session - Then creating a sender with "my-queue;{create:always}" succeeds + Then creating a sender with "my-queue;{create:always,delete:always}" succeeds Scenario: Using an Address object Given an open session diff --git a/cpp/bindings/qpid/ruby/features/receiving_a_message.feature b/cpp/bindings/qpid/ruby/features/receiving_a_message.feature index b68a78c337..7b6db4a5ac 100644 --- a/cpp/bindings/qpid/ruby/features/receiving_a_message.feature +++ b/cpp/bindings/qpid/ruby/features/receiving_a_message.feature @@ -4,24 +4,26 @@ Feature: Receving a message I need to be able to receive messages Scenario: Receiving after the session is closed - Given a sender and receiver for "my-queue;{create:always}" + Given a sender and receiver for "my-queue;{create:always,delete:always}" And the message "this is a test" is sent And the session is closed Then getting the next message raises an error Scenario: Receiving after the connection is closed - Given a sender and receiver for "my-queue;{create:always}" + Given a sender and receiver for "my-queue;{create:always,delete:always}" And the message "this is a test" is sent And the connection is closed Then getting the next message raises an error Scenario: No message is received on an empty queue - Given an existing receiver for "my-queue;{create:always}" + Given an existing receiver for "my-queue;{create:always,delete:always}" And the receiver has no pending messages Then getting the next message raises an error Scenario: A message is pending - Given a sender and receiver for "my-queue;{create:always}" + Given an open session + And given a sender for "my-queue;{create:always}" + And given a receiver for "my-queue;{create:always,delete:always}" And the receiver has a capacity of 1 And the message "this is a test" is sent Then the receiver should have 1 message available diff --git a/cpp/bindings/qpid/ruby/features/sending_a_message.feature b/cpp/bindings/qpid/ruby/features/sending_a_message.feature index b1127d3664..45cbd42f06 100644 --- a/cpp/bindings/qpid/ruby/features/sending_a_message.feature +++ b/cpp/bindings/qpid/ruby/features/sending_a_message.feature @@ -5,17 +5,17 @@ Feature: Sending a message Scenario: The session is closed Given an open session - And creating a sender with "my-queue;{create:always}" succeeds + And creating a sender with "my-queue;{create:always,delete:always}" succeeds And the session is closed Then sending the message "This is a test" should raise an error Scenario: The connection is closed Given an open session - And creating a sender with "my-queue;{create:always}" succeeds + And creating a sender with "my-queue;{create:always,delete:always}" succeeds And the connection is closed Then sending the message "This is a test" should raise an error Scenario: The message sends successfully Given an open session - And creating a sender with "my-queue;{create:always}" succeeds + And creating a sender with "my-queue;{create:always,delete:always}" succeeds Then sending the message "This is a test" succeeds
\ No newline at end of file diff --git a/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb b/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb index 845cc2b116..0531e5ee69 100644 --- a/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb +++ b/cpp/bindings/qpid/ruby/features/step_definitions/address_steps.rb @@ -22,3 +22,10 @@ Given /^an Address with the name "([^"]*)" and subject "([^"]*)" and option "([^ options["#{key}"] = "#{value}" @address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options end + +Given /^an Address with the name "([^"]*)" and subject "([^"]*)" and option "([^"]*)" set to "([^"]*)" and "([^"]*)" set to "([^"]*)"$/ do |name, subject, key1, value1, key2, value2| + options = Hash.new + options["#{key1}"] = "#{value1}" + options["#{key2}"] = "#{value2}" + @address = Qpid::Messaging::Address.new "#{name}", "#{subject}", options +end diff --git a/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb b/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb index a8c8aa4a43..e454dac345 100644 --- a/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb +++ b/cpp/bindings/qpid/ruby/features/step_definitions/receiver_steps.rb @@ -59,3 +59,11 @@ Then /^the receiver should have (\d+) message available$/ do |available| sleep 1 @receiver.available.should == available.to_i end + +Given /^given a sender for "([^"]*)"$/ do |address| + @sender = @session.create_sender "#{address}" +end + +Given /^given a receiver for "([^"]*)"$/ do |address| + @receiver = @session.create_receiver "#{address}" +end |
