Sha256: 31ad51d3bcf9ca2ba2a94b69a7c12cc93c9669f5bed0de320f1f2cf92063c07a

Contents?: true

Size: 838 Bytes

Versions: 25

Compression:

Stored size: 838 Bytes

Contents

require 'test/unit'
require 'axlsx.rb'

class TestTableStyle < Test::Unit::TestCase

  def setup
    @item = Axlsx::TableStyle.new "fisher"
  end

  def teardown
  end

  def test_initialiation
    assert_equal(@item.name, "fisher")
    assert_equal(@item.pivot, nil)
    assert_equal(@item.table, nil)
  end

  def test_name    
    assert_raise(ArgumentError) { @item.name = -1.1 }
    assert_nothing_raised { @item.name = "lovely table style" }
    assert_equal(@item.name, "lovely table style")
  end

  def test_pivot
    assert_raise(ArgumentError) { @item.pivot = -1.1 }
    assert_nothing_raised { @item.pivot = true }
    assert_equal(@item.pivot, true)
  end

  def test_table
    assert_raise(ArgumentError) { @item.table = -1.1 }
    assert_nothing_raised { @item.table = true }
    assert_equal(@item.table, true)
  end

end

Version data entries

25 entries across 18 versions & 1 rubygems

Version Path
axlsx-1.0.18 test/stylesheet/tc_table_style.rb
axlsx-1.0.17 test/stylesheet/tc_table_style.rb
axlsx-1.0.16 test/stylesheet/tc_table_style.rb
axlsx-1.0.15 test/stylesheet/tc_table_style.rb
axlsx-1.0.14 test/stylesheet/tc_table_style.rb
axlsx-1.0.12 test/stylesheet/tc_table_style.rb
axlsx-1.0.11 test/stylesheet/tc_table_style.rb
axlsx-1.0.10 test/stylesheet/tc_table_style.rb
axlsx-1.0.10a test/stylesheet/tc_table_style.rb
axlsx-1.0.9 test/stylesheet/tc_table_style.rb
axlsx-1.0.8 test/stylesheet/tc_table_style.rb
axlsx-1.0.7 test/stylesheet/tc_table_style.rb
axlsx-1.0.7 test/stylesheet/tc_table_style_element.rb~
axlsx-1.0.6 test/stylesheet/tc_table_style_element.rb~
axlsx-1.0.6 test/stylesheet/tc_table_style.rb
axlsx-1.0.5 test/stylesheet/tc_table_style.rb
axlsx-1.0.5 test/stylesheet/tc_table_style_element.rb~
axlsx-1.0.4 test/stylesheet/tc_table_style.rb
axlsx-1.0.4 test/stylesheet/tc_table_style_element.rb~
axlsx-1.0.3 test/stylesheet/tc_table_style.rb