Sha256: e6e297edb675831b5c69e1759b8930ee34f7def7d795ebd077cffcee18ef9a55

Contents?: true

Size: 749 Bytes

Versions: 38

Compression:

Stored size: 749 Bytes

Contents

require 'tc_helper.rb'

class TestScaling < Test::Unit::TestCase
  def setup
    @scaling = Axlsx::Scaling.new
  end

  def teardown
  end

  def test_initialization
    assert(@scaling.orientation == :minMax)
  end

  def test_logBase
    assert_raise(ArgumentError) { @scaling.logBase = 1}
    assert_nothing_raised {@scaling.logBase = 10}
  end

  def test_orientation
    assert_raise(ArgumentError) { @scaling.orientation = "1"}
    assert_nothing_raised {@scaling.orientation = :maxMin}
  end


  def test_max
    assert_raise(ArgumentError) { @scaling.max = 1}
    assert_nothing_raised {@scaling.max = 10.5}
  end

  def test_min
    assert_raise(ArgumentError) { @scaling.min = 1}
    assert_nothing_raised {@scaling.min = 10.5}
  end

end

Version data entries

38 entries across 38 versions & 6 rubygems

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