znmud-0.0.1/benchmark/
znmud-0.0.1/cmd/
znmud-0.0.1/cmd/emotes/
znmud-0.0.1/cmd/objects/
znmud-0.0.1/cmd/tiny/
znmud-0.0.1/doc/
znmud-0.0.1/farts/
znmud-0.0.1/lib/
znmud-0.0.1/lib/combat/
znmud-0.0.1/lib/core/bodytypes/
znmud-0.0.1/lib/engine/
znmud-0.0.1/lib/farts/
znmud-0.0.1/logs/
# Code Generated by ZenTest v. 2.3.0
#                 classname: asrt / meth =  ratio%
#                  PacketIO:    2 /    3 =  66.67%

unless defined? $ZENTEST and $ZENTEST
require 'test/unit'
require 'network/packetio'
require 'mocksocket'
end

class TestPacketIO < Test::Unit::TestCase
  def setup
    @data = ["hello world\000".size].pack("N") + "hello world\000foobar"
    sock = MockSocket.new(@data)
    @sock = PacketIO.new(sock)
  end

  def test_read
    assert_equal("hello world", @sock.read)
  end

  def test_write
    assert_equal(true, @sock.write("hello world\r\n"))
  end
end