Sha256: 2f71dc6e06485bd8224d31e3c7c5509af87180e0b398f4d17df2f2b902ff9514
Contents?: true
Size: 1.1 KB
Versions: 11
Compression:
Stored size: 1.1 KB
Contents
require 'test_helper' class ServiceTest < Test::Unit::TestCase context "A Service" do should "be creatable with host and port" do svc = BERTRPC::Service.new('localhost', 9941) assert svc.is_a?(BERTRPC::Service) end should "be creatable with host, port, and timeout" do svc = BERTRPC::Service.new('localhost', 9941, 5) assert svc.is_a?(BERTRPC::Service) end end context "A Service Instance's" do setup do @svc = BERTRPC::Service.new('localhost', 9941) end context "accessors" do should "return it's host" do assert_equal 'localhost', @svc.host end should "return it's port" do assert_equal 9941, @svc.port end end context "call method" do should "return a call type Request" do req = @svc.call assert req.is_a?(BERTRPC::Request) assert_equal :call, req.kind end end context "cast method" do should "return a cast type Request" do req = @svc.cast assert req.is_a?(BERTRPC::Request) assert_equal :cast, req.kind end end end end
Version data entries
11 entries across 11 versions & 2 rubygems