Sha256: 332390a198101438f61f5cad84a3db1eb33334ec25086296d9831d096627fc23

Contents?: true

Size: 1 KB

Versions: 18

Compression:

Stored size: 1 KB

Contents

require 'test/unit'
require 'axlsx.rb'

class TestBorder < Test::Unit::TestCase
  def setup    
    @b = Axlsx::Border.new
  end
  def teardown
  end
  def test_initialiation
    assert_equal(@b.diagonalUp, nil)
    assert_equal(@b.diagonalDown, nil)
    assert_equal(@b.outline, nil)    
    assert(@b.prs.is_a?(Axlsx::SimpleTypedList))
  end

  def test_diagonalUp
    assert_raise(ArgumentError) { @b.diagonalUp = :red }
    assert_nothing_raised { @b.diagonalUp = true }
    assert_equal(@b.diagonalUp, true )
  end

  def test_diagonalDown
    assert_raise(ArgumentError) { @b.diagonalDown = :red }
    assert_nothing_raised { @b.diagonalDown = true }
    assert_equal(@b.diagonalDown, true )
  end

  def test_outline
    assert_raise(ArgumentError) { @b.outline = :red }
    assert_nothing_raised { @b.outline = true }
    assert_equal(@b.outline, true )
  end

  def test_prs
    assert_nothing_raised { @b.prs << Axlsx::BorderPr.new(:name=>:top, :style=>:thin, :color => Axlsx::Color.new(:rgb=>"FF0000FF")) }
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

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