Sha256: 83982279ce98e4a3af5ea0a30416a741e3353488aa98944a214059b74d457eca

Contents?: true

Size: 785 Bytes

Versions: 1

Compression:

Stored size: 785 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

1 entries across 1 versions & 1 rubygems

Version Path
caxlsx-3.2.0 test/drawing/tc_scaling.rb