diff options
| author | Randy Morgan <[email protected]> | 2011-11-20 23:22:04 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-11-20 23:22:04 +0900 |
| commit | e53f04284618713b0a90b7a691425c380e829476 (patch) | |
| tree | 801fea138160f9af426d62bf94ad5bf97123ece9 /test/stylesheet/tc_table_style_element.rb | |
| download | caxlsx-e53f04284618713b0a90b7a691425c380e829476.tar.gz caxlsx-e53f04284618713b0a90b7a691425c380e829476.zip | |
first commit
Diffstat (limited to 'test/stylesheet/tc_table_style_element.rb')
| -rw-r--r-- | test/stylesheet/tc_table_style_element.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/stylesheet/tc_table_style_element.rb b/test/stylesheet/tc_table_style_element.rb new file mode 100644 index 00000000..9cfa5204 --- /dev/null +++ b/test/stylesheet/tc_table_style_element.rb @@ -0,0 +1,37 @@ +require 'test/unit' +require 'axlsx.rb' + +class TestTableStyleElement < Test::Unit::TestCase + + def setup + @item = Axlsx::TableStyleElement.new + end + + def teardown + end + + def test_initialiation + assert_equal(@item.type, nil) + assert_equal(@item.size, nil) + assert_equal(@item.dxfId, nil) + end + + def test_type + assert_raise(ArgumentError) { @item.type = -1.1 } + assert_nothing_raised { @item.type = :blankRow } + assert_equal(@item.type, :blankRow) + end + + def test_size + assert_raise(ArgumentError) { @item.size = -1.1 } + assert_nothing_raised { @item.size = 2 } + assert_equal(@item.size, 2) + end + + def test_dxfId + assert_raise(ArgumentError) { @item.dxfId = -1.1 } + assert_nothing_raised { @item.dxfId = 7 } + assert_equal(@item.dxfId, 7) + end + +end |
