TeensyMud - 'A ruby mud server.'

Browse repository
back

test_root.rb

# Code Generated by ZenTest v. 2.4.0
# classname: asrt / meth = ratio%
# Root: 0 / 9 = 0.00%

unless defined? $ZENTEST and $ZENTEST
require 'test/unit'
require 'flexmock'
load 'mockengine.rb'
require 'storage/properties'
require 'core/root'
end

class TestRoot < Test::Unit::TestCase
def setup
$id = 0
end

def test_add_event
assert(Root.new("thing",0).add_event(0,1,:timer))
end

def test_delete_object
assert(Root.new("thing",0).delete_object(99))
end

def test_desc
assert_equal("",Root.new("thing",0).desc)
end

def test_desc_equals
r = Root.new("test",0)
r.desc = "test2"
assert_equal("test2",r.desc)
end

def test_get_object
assert_equal(2,Root.new("thing",0).get_object(99))
end

def test_log
assert_respond_to(Root.new("thing",0), :log)
end

def test_name
assert_equal("test",Root.new("test",0).name)
end

def test_name_equals
r = Root.new("test",0)
r.name = "test2"
assert_equal("test2",r.name)
end

def test_options
assert_respond_to(Root.new("thing",0), :options)
end

def test_owner
assert_equal(0,Root.new("test",0).owner)
end

def test_owner_equals
r = Root.new("test",0)
r.owner = 99
assert_equal(99,r.owner)
end

def test_parse
assert_respond_to(Root.new("thing",0), :parse)
end

def test_put_object
assert(Root.new("thing",0).put_object(78))
end

def test_world
assert_respond_to(Root.new("thing",0), :world)
end
end

# Number of errors detected: 1