Sha256: 52e0ae961984ea49b2207406b0c98475d63ca3f1de9eb77d4743fa3fab4aabc5

Contents?: true

Size: 821 Bytes

Versions: 18

Compression:

Stored size: 821 Bytes

Contents

require 'tc_helper.rb'

class TestSerAxis < Test::Unit::TestCase
  def setup
    @axis = Axlsx::SerAxis.new 12345, 54321
  end
  def teardown
  end

  def test_options
    a = Axlsx::SerAxis.new 12345, 54321, :tickLblSkip => 9, :tickMarkSkip => 7
    assert_equal(a.tickLblSkip, 9)
    assert_equal(a.tickMarkSkip, 7)
  end


  def test_tickLblSkip
    assert_raise(ArgumentError, "requires valid tickLblSkip") { @axis.tickLblSkip = -1 }
    assert_nothing_raised("accepts valid tickLblSkip") { @axis.tickLblSkip = 1 }
    assert_equal(@axis.tickLblSkip, 1)
  end


  def test_tickMarkSkip
    assert_raise(ArgumentError, "requires valid tickMarkSkip") { @axis.tickMarkSkip = :my_eyes }
    assert_nothing_raised("accepts valid tickMarkSkip") { @axis.tickMarkSkip = 2 }
    assert_equal(@axis.tickMarkSkip, 2)
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
axlsx-1.3.5 test/drawing/tc_ser_axis.rb
axlsx-1.3.4 test/drawing/tc_ser_axis.rb
axlsx-1.3.3 test/drawing/tc_ser_axis.rb
axlsx-1.3.2 test/drawing/tc_ser_axis.rb
axlsx-1.3.1 test/drawing/tc_ser_axis.rb
axlsx-1.2.3 test/drawing/tc_ser_axis.rb
axlsx-1.2.2 test/drawing/tc_ser_axis.rb
axlsx-1.2.1 test/drawing/tc_ser_axis.rb
axlsx-1.2.0 test/drawing/tc_ser_axis.rb
axlsx-1.1.8 test/drawing/tc_ser_axis.rb
axlsx-1.1.7 test/drawing/tc_ser_axis.rb
axlsx-1.1.6 test/drawing/tc_ser_axis.rb
axlsx-1.1.5 test/drawing/tc_ser_axis.rb
axlsx-1.1.4 test/drawing/tc_ser_axis.rb
axlsx-1.1.3 test/drawing/tc_ser_axis.rb
axlsx-1.1.2 test/drawing/tc_ser_axis.rb
axlsx-1.1.1 test/drawing/tc_ser_axis.rb
axlsx-1.1.0 test/drawing/tc_ser_axis.rb