Sha256: 6db7592509a0f4113992f4a81ae7158a029ae6bed96129c6f5699ccc5db630bb

Contents?: true

Size: 1.01 KB

Versions: 39

Compression:

Stored size: 1.01 KB

Contents

# -*- coding: utf-8 -*-
require 'helper'
require 'write_xlsx/shape'
require 'write_xlsx/drawing'

class DrawingShape03 < Test::Unit::TestCase
  def test_drawing_shape_03
    shape = Writexlsx::Shape.new
    # Set shape properties via []= method
    shape.id          = 1000
    shape.start       = 1001
    shape.start_index = 1
    shape.end         = 1002
    shape.end_index   = 4

    @obj = Writexlsx::Drawing.new
    @obj.embedded = 1
    @obj.add_drawing_object(
                               3, 4, 8, 209550, 95250, 12, 22, 209660,
                               96260, 10000, 20000, 95250, 190500, '', shape
                               )
    @obj.__send__('write_nv_cxn_sp_pr', 1, shape)

    result = got_to_array(@obj.xml_str)
    expected = expected_to_array(<<EOS
<xdr:nvCxnSpPr>
<xdr:cNvPr id="1000" name="rect 1"/>
<xdr:cNvCxnSpPr>
<a:cxnSpLocks noChangeShapeType="1"/>
<a:stCxn id="1001" idx="1"/>
<a:endCxn id="1002" idx="4"/>
</xdr:cNvCxnSpPr>
</xdr:nvCxnSpPr>
EOS
    )
    assert_equal(expected, result)
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
write_xlsx-0.86.0 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.11 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.10 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.9 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.8 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.7 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.6 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.5 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.4 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.3 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.2 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.85.1 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.83.0 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.81.1 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.81.0 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.80.0 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.79.0 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.78.0 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.77.2 test/drawing/test_drawing_shape_03.rb
write_xlsx-0.77.1 test/drawing/test_drawing_shape_03.rb