Sha256: 2721210f33c1cd6a30d9b21e7f83606c6c7227b49951f893dad57e582afc8f81

Contents?: true

Size: 608 Bytes

Versions: 7

Compression:

Stored size: 608 Bytes

Contents

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

class TestCellStyle < Test::Unit::TestCase

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

  def teardown
  end

  def test_initialiation
    assert_equal(@item.hidden, nil)
    assert_equal(@item.locked, nil)
  end

  def test_hidden
    assert_raise(ArgumentError) { @item.hidden = -1 }
    assert_nothing_raised { @item.hidden = false }
    assert_equal(@item.hidden, false )
  end

  def test_locked
    assert_raise(ArgumentError) { @item.locked = -1 }
    assert_nothing_raised { @item.locked = false }
    assert_equal(@item.locked, false )
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

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