Sha256: de7307b4bb16ede23df2e96a2456020a26ea5e6f79e468f1840f1751ff106bef

Contents?: true

Size: 599 Bytes

Versions: 38

Compression:

Stored size: 599 Bytes

Contents

require 'tc_helper.rb'

class TestNumFmt < Test::Unit::TestCase

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

  def teardown
  end


  def test_initialiation
    assert_equal(@item.numFmtId, 0)
    assert_equal(@item.formatCode, "")
  end

  def test_numFmtId
    assert_raise(ArgumentError) { @item.numFmtId = -1.1 }
    assert_nothing_raised { @item.numFmtId = 2 }
    assert_equal(@item.numFmtId, 2)
  end

  def test_fomatCode
    assert_raise(ArgumentError) { @item.formatCode = -1.1 }
    assert_nothing_raised { @item.formatCode = "0" }
    assert_equal(@item.formatCode, "0")
  end

end

Version data entries

38 entries across 38 versions & 6 rubygems

Version Path
caxlsx-3.1.1 test/stylesheet/tc_num_fmt.rb
caxlsx-3.1.0 test/stylesheet/tc_num_fmt.rb
bonio-axlsx-2.2.3 test/stylesheet/tc_num_fmt.rb
caxlsx-3.0.4 test/stylesheet/tc_num_fmt.rb
caxlsx-3.0.3 test/stylesheet/tc_num_fmt.rb
caxlsx-3.0.2 test/stylesheet/tc_num_fmt.rb
caxlsx-2.0.2 test/stylesheet/tc_num_fmt.rb
caxlsx-3.0.1 test/stylesheet/tc_num_fmt.rb
caxlsx-3.0.0 test/stylesheet/tc_num_fmt.rb
axlsx-alt-3.0.1 test/stylesheet/tc_num_fmt.rb
axlsx-alt-3.0.0 test/stylesheet/tc_num_fmt.rb
axlsx-3.0.0.pre test/stylesheet/tc_num_fmt.rb
bonio-axlsx-2.2.2 test/stylesheet/tc_num_fmt.rb
bonio-axlsx-2.2.1 test/stylesheet/tc_num_fmt.rb
dg-axlsx-2.1.0 test/stylesheet/tc_num_fmt.rb
axlsx-2.1.0.pre test/stylesheet/tc_num_fmt.rb
l_axlsx-2.0.1 test/stylesheet/tc_num_fmt.rb
axlsx-2.0.1 test/stylesheet/tc_num_fmt.rb
axlsx-2.0.0 test/stylesheet/tc_num_fmt.rb
axlsx-1.3.6 test/stylesheet/tc_num_fmt.rb