diff options
author | Kevin Clark <kclark@apache.org> | 2008-06-18 00:52:26 +0000 |
---|---|---|
committer | Kevin Clark <kclark@apache.org> | 2008-06-18 00:52:26 +0000 |
commit | c669efa48ba7ade8cdaf77d4ca9a939db8a56f05 (patch) | |
tree | 0108ad918c2656c7b0bf74697b63d053a4efa8ef /test/rb | |
parent | a7e7c04e9da4d740ddd48f17b22ed7e9aa493269 (diff) | |
download | thrift-c669efa48ba7ade8cdaf77d4ca9a939db8a56f05.tar.gz |
rb: Add deprecate! method Rename TTransport#readAll/isOpen, and deprecate
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@668899 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/rb')
-rw-r--r-- | test/rb/core/transport/test_ttransport.rb | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/test/rb/core/transport/test_ttransport.rb b/test/rb/core/transport/test_ttransport.rb index 5811dece8..bb876dccc 100644 --- a/test/rb/core/transport/test_ttransport.rb +++ b/test/rb/core/transport/test_ttransport.rb @@ -18,8 +18,8 @@ class TestTTransport < Test::Unit::TestCase @trans = TTransport.new end - def test_isOpen - assert_nil @trans.isOpen + def test_is_open? + assert_nil @trans.is_open? end def test_open @@ -39,7 +39,7 @@ class TestTTransport < Test::Unit::TestCase # It _looks_ like read isn't guarenteed to return the length # you ask for and readAll is. This means our test needs to check # for blocking. -- Kevin Clark 3/27/08 - def test_readAll + def test_read_all # Implements read t = DummyTransport.new("hello") assert_equal "hello", t.readAll(5) @@ -52,4 +52,20 @@ class TestTTransport < Test::Unit::TestCase def test_flush assert_nil @trans.flush end +end + +class TestTTransportDeprecation < Test::Unit::TestCase + def setup + @trans = TTransport.new + end + + def test_isOpen + assert_nil @trans.isOpen + end + + def test_readAll + # Implements read + t = DummyTransport.new("hello") + assert_equal "hello", t.readAll(5) + end end
\ No newline at end of file |