2018-04-26 11:31:37 +02:00
|
|
|
require_relative "helper"
|
2016-12-16 00:14:09 +01:00
|
|
|
|
2018-03-26 13:04:13 +02:00
|
|
|
module Parfait
|
2018-04-26 11:31:37 +02:00
|
|
|
class TestNamedLists < ParfaitTest
|
2016-12-16 00:14:09 +01:00
|
|
|
|
2018-03-26 13:04:13 +02:00
|
|
|
def setup
|
2018-04-26 11:31:37 +02:00
|
|
|
super
|
2018-09-01 10:24:16 +02:00
|
|
|
@named_list = @space.get_next_for(:Message).frame
|
2018-03-26 13:04:13 +02:00
|
|
|
@type = @named_list.get_type
|
|
|
|
end
|
2016-12-16 00:14:09 +01:00
|
|
|
|
2018-03-26 13:04:13 +02:00
|
|
|
def test_named_list_get_type
|
|
|
|
assert_equal Type , @type.class
|
|
|
|
assert @type.names
|
|
|
|
assert @named_list.get_instance_variables
|
|
|
|
end
|
2016-12-25 17:02:39 +01:00
|
|
|
|
2018-03-26 13:04:13 +02:00
|
|
|
def test_new
|
|
|
|
list = NamedList.new
|
|
|
|
assert list.get_type
|
|
|
|
end
|
|
|
|
def test_var_names
|
|
|
|
list = NamedList.new
|
|
|
|
assert_equal List , list.get_instance_variables.class
|
|
|
|
end
|
|
|
|
def test_var_names_length
|
|
|
|
list = NamedList.new
|
|
|
|
assert_equal 1 , list.get_instance_variables.get_length
|
|
|
|
end
|
2016-12-25 17:02:39 +01:00
|
|
|
end
|
2016-12-16 00:14:09 +01:00
|
|
|
end
|