Sha256: 4e02bc0dbd11a82ac9d0bf47a2e5e105f2e0d17876b0892844739135cbf8324e

Contents?: true

Size: 805 Bytes

Versions: 1

Compression:

Stored size: 805 Bytes

Contents

require 'tc_helper.rb'

class TestTableStyles < Test::Unit::TestCase

  def setup
    @item = Axlsx::TableStyles.new
  end

  def teardown
  end

  def test_initialiation
    assert_equal(@item.defaultTableStyle, "TableStyleMedium9")
    assert_equal(@item.defaultPivotStyle, "PivotStyleLight16")
  end

  def test_defaultTableStyle
    assert_raise(ArgumentError) { @item.defaultTableStyle = -1.1 }
    assert_nothing_raised { @item.defaultTableStyle = "anyones guess" }
    assert_equal(@item.defaultTableStyle, "anyones guess")
  end

  def test_defaultPivotStyle
    assert_raise(ArgumentError) { @item.defaultPivotStyle = -1.1 }
    assert_nothing_raised { @item.defaultPivotStyle = "anyones guess" }
    assert_equal(@item.defaultPivotStyle, "anyones guess")
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caxlsx-3.2.0 test/stylesheet/tc_table_styles.rb