Sha256: 100623eee09661fb65eee42c41fcba522f7620d2296bfc4d8c03ccb2b4257603

Contents?: true

Size: 780 Bytes

Versions: 14

Compression:

Stored size: 780 Bytes

Contents

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

class TestTwoCellAnchor < Test::Unit::TestCase
  def setup    
    @p = Axlsx::Package.new
    ws = @p.workbook.add_worksheet
    @row = ws.add_row :values=>["one", 1, Time.now]
    @title = Axlsx::Title.new
    @chart = ws.add_chart Axlsx::Bar3DChart
    @anchor = @chart.graphic_frame.anchor
  end

  def teardown
  end

  def test_initialization
    assert(@anchor.from.col == 0)
    assert(@anchor.from.row == 0)
    assert(@anchor.to.col == 5)
    assert(@anchor.to.row == 10)
  end
  
  def test_start_at
    @anchor.start_at 5, 10
    assert(@anchor.from.col == 5)
    assert(@anchor.from.row == 10)
  end
  
  def test_end_at
    @anchor.end_at 10, 15
    assert(@anchor.to.col == 10)
    assert(@anchor.to.row == 15)
  end

  
end

Version data entries

14 entries across 7 versions & 1 rubygems

Version Path
axlsx-1.0.7 test/drawing/tc_view_3D.rb~
axlsx-1.0.7 test/drawing/tc_two_cell_anchor.rb~
axlsx-1.0.6 test/drawing/tc_view_3D.rb~
axlsx-1.0.6 test/drawing/tc_two_cell_anchor.rb~
axlsx-1.0.5 test/drawing/tc_two_cell_anchor.rb~
axlsx-1.0.5 test/drawing/tc_view_3D.rb~
axlsx-1.0.4 test/drawing/tc_view_3D.rb~
axlsx-1.0.4 test/drawing/tc_two_cell_anchor.rb~
axlsx-1.0.3 test/drawing/tc_view_3D.rb~
axlsx-1.0.3 test/drawing/tc_two_cell_anchor.rb~
axlsx-1.0.1 test/drawing/tc_view_3D.rb~
axlsx-1.0.1 test/drawing/tc_two_cell_anchor.rb~
axlsx-1.0.0 test/drawing/tc_two_cell_anchor.rb
axlsx-1.0.0 test/drawing/tc_view_3D.rb~