# Code Generated by ZenTest v. 2.3.0 # classname: asrt / meth = ratio% # Session: 23 / 9 = 255.56% unless defined? $ZENTEST and $ZENTEST require 'test/unit' require 'network/session' end class TestSession < Test::Unit::TestCase def setup @sess = Session.new("foo") end def test_accepting assert_equal(false, @sess.accepting) @sess.accepting = true assert_equal(true, @sess.accepting) end def test_accepting_equals assert_equal(true, @sess.accepting = true) end def test_closing assert_equal(false, @sess.closing) @sess.closing = true assert_equal(true, @sess.closing) end def test_closing_equals assert_equal(true, @sess.closing = true) end def test_connected assert_equal(false, @sess.connected) @sess.connected = true assert_equal(true, @sess.connected) end def test_connected_equals assert_equal(true, @sess.connected = true) end def test_handle_close assert_respond_to(@sess, :handle_close) end def test_handle_input assert_respond_to(@sess, :handle_input) end def test_handle_oob assert_respond_to(@sess, :handle_oob) end def test_handle_output assert_respond_to(@sess, :handle_output) end def test_init assert(true, @sess.init) end def test_is_readable_eh assert_equal(false, @sess.is_readable?) @sess.accepting = true assert_equal(true, @sess.is_readable?) end def test_is_writable_eh assert_equal(false, @sess.is_writable?) @sess.write_blocked = true assert_equal(true, @sess.is_writable?) end def test_sock assert_respond_to(@sess, :sock) end def test_write_blocked assert_equal(false, @sess.write_blocked) @sess.write_blocked = true assert_equal(true, @sess.write_blocked) end def test_write_blocked_equals assert_equal(true, @sess.write_blocked = true) end end # Number of errors detected: 1