Sha256: 5f4e2b9732c852957310de16c479f0faba9371c063c91867edb514aea794d982

Contents?: true

Size: 702 Bytes

Versions: 7

Compression:

Stored size: 702 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" }
  end

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

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

  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
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~