Sha256: 6886cdaaefeda31ac7f5dfd371626bba77a8a81cfa1c35e740334303a30efb4e

Contents?: true

Size: 686 Bytes

Versions: 10

Compression:

Stored size: 686 Bytes

Contents

module TestsForWritableBrokers

def test_register_commands
    assert_not_nil @broker
    commands = @broker.get_command_list
    assert_not_nil commands
    assert_equal 0, commands.size

    command = RHCP::Command.new("test", "a test command", lambda {})
    @broker.register_command(command)

    commands = @test_broker.get_command_list
    assert_equal 1, commands.size
    assert_equal command, commands["test"]
  end

  def test_register_duplicate
    @broker.register_command RHCP::Command.new("test", "a test command", lambda {})
    assert_raise(RHCP::RhcpException) { @broker.register_command RHCP::Command.new("test", "a command with the same name", lambda {}) }
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
rhcp-0.2.23 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.22 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.21 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.20 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.19 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.18 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.17 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.16 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.15 test/rhcp/tests_for_writable_brokers.rb
rhcp-0.2.14 test/rhcp/tests_for_writable_brokers.rb