Sha256: d71b0f9e56ea7e077646dfcf70b203c0d24aa74283989d78a14a4039475de42c

Contents?: true

Size: 771 Bytes

Versions: 18

Compression:

Stored size: 771 Bytes

Contents

require 'test/unit'
require 'axlsx.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

18 entries across 18 versions & 1 rubygems

Version Path
axlsx-1.0.18 test/drawing/tc_scaling.rb
axlsx-1.0.17 test/drawing/tc_scaling.rb
axlsx-1.0.16 test/drawing/tc_scaling.rb
axlsx-1.0.15 test/drawing/tc_scaling.rb
axlsx-1.0.14 test/drawing/tc_scaling.rb
axlsx-1.0.12 test/drawing/tc_scaling.rb
axlsx-1.0.11 test/drawing/tc_scaling.rb
axlsx-1.0.10 test/drawing/tc_scaling.rb
axlsx-1.0.10a test/drawing/tc_scaling.rb
axlsx-1.0.9 test/drawing/tc_scaling.rb
axlsx-1.0.8 test/drawing/tc_scaling.rb
axlsx-1.0.7 test/drawing/tc_scaling.rb
axlsx-1.0.6 test/drawing/tc_scaling.rb
axlsx-1.0.5 test/drawing/tc_scaling.rb
axlsx-1.0.4 test/drawing/tc_scaling.rb
axlsx-1.0.3 test/drawing/tc_scaling.rb
axlsx-1.0.1 test/drawing/tc_scaling.rb
axlsx-1.0.0 test/drawing/tc_scaling.rb