Sha256: 3f845d5ec5a1a7fdda6f8bfbfaedb781df9fc7c21e8b7ce2cff90d912aaeb971

Contents?: true

Size: 814 Bytes

Versions: 18

Compression:

Stored size: 814 Bytes

Contents

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

18 entries across 18 versions & 1 rubygems

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