Sha256: ebeb9f65a58564d441d6e8184517d720dadc74a3251e1feb9801de8189161015

Contents?: true

Size: 1004 Bytes

Versions: 38

Compression:

Stored size: 1004 Bytes

Contents

require 'tc_helper.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

38 entries across 38 versions & 6 rubygems

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