Sha256: 7263d33b9112dcab6ba291b89f96abfbe0ea311ba7d7757517e2eff16b3be764

Contents?: true

Size: 790 Bytes

Versions: 38

Compression:

Stored size: 790 Bytes

Contents

require 'tc_helper.rb'

class TestBorderPr < Test::Unit::TestCase
  def setup
    @bpr = Axlsx::BorderPr.new
  end
  def teardown
  end
  def test_initialiation
    assert_equal(@bpr.color, nil)
    assert_equal(@bpr.style, nil)
    assert_equal(@bpr.name, nil)
  end

  def test_color
    assert_raise(ArgumentError) { @bpr.color = :red }
    assert_nothing_raised { @bpr.color = Axlsx::Color.new :rgb=>"FF000000" }
    assert(@bpr.color.is_a?(Axlsx::Color))
  end

  def test_style
    assert_raise(ArgumentError) { @bpr.style = :red }
    assert_nothing_raised { @bpr.style = :thin }
    assert_equal(@bpr.style, :thin)
  end

  def test_name
    assert_raise(ArgumentError) { @bpr.name = :red }
    assert_nothing_raised { @bpr.name = :top }
    assert_equal(@bpr.name, :top)
  end
end

Version data entries

38 entries across 38 versions & 6 rubygems

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