blob: 9ac287a75860abbca282e60424eb5329de832397 [file] [log] [blame]
Mark Slee89f57162008-01-10 00:53:08 +00001#!/usr/bin/env ruby
2
3$:.push('gen-rb')
4$:.push('../../lib/rb/lib')
5
6require 'SmallService'
7require 'rubygems'
8require 'test/unit'
9
10class TestSmallService < Test::Unit::TestCase
11
12 def test_default_value
13 hello = Hello.new
14
15 assert_kind_of(Hello, hello)
16 assert_nil(hello.complexer)
17
18 assert_equal(hello.simple, 53)
19 assert_equal(hello.words, 'words')
20
21 assert_kind_of(Goodbyez, hello.thinz)
22 assert_equal(hello.thinz.val, 36632)
23
24 assert_kind_of(Hash, hello.complex)
25 assert_equal(hello.complex, { 6243 => 632, 2355 => 532, 23 => 532})
26 end
27
28 def test_goodbyez
29 assert_equal(Goodbyez.new.val, 325)
30 end
31
32end