Sha256: 901c69fb80c0dce8ac9f67df5024c8f3c58efd7069c6f390314e83192cc8b5be

Contents?: true

Size: 782 Bytes

Versions: 7

Compression:

Stored size: 782 Bytes

Contents

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

class TestXf < Test::Unit::TestCase

  def setup
    @item = Axlsx::Xf.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

7 entries across 7 versions & 1 rubygems

Version Path
axlsx-1.0.7 test/stylesheet/tc_xf.rb~
axlsx-1.0.6 test/stylesheet/tc_xf.rb~
axlsx-1.0.5 test/stylesheet/tc_xf.rb~
axlsx-1.0.4 test/stylesheet/tc_xf.rb~
axlsx-1.0.3 test/stylesheet/tc_xf.rb~
axlsx-1.0.1 test/stylesheet/tc_xf.rb~
axlsx-1.0.0 test/stylesheet/tc_xf.rb~