Sha256: 613ea9d660953aa6f7fb2c739d0d8af8135e9099e39e27357efe15cb2ee02d1f

Contents?: true

Size: 953 Bytes

Versions: 1

Compression:

Stored size: 953 Bytes

Contents

require 'tc_helper.rb'

class TestMarker < Test::Unit::TestCase
  def setup
    @marker = Axlsx::Marker.new
  end

  def teardown
  end

  def test_initialization
    assert(@marker.col == 0)
    assert(@marker.colOff == 0)
    assert(@marker.row == 0)
    assert(@marker.rowOff == 0)
  end

  def test_col
    assert_raise(ArgumentError) { @marker.col = -1}
    assert_nothing_raised {@marker.col = 10}
  end

  def test_colOff
    assert_raise(ArgumentError) { @marker.colOff = "1"}
    assert_nothing_raised {@marker.colOff = -10}
  end

  def test_row
    assert_raise(ArgumentError) { @marker.row = -1}
    assert_nothing_raised {@marker.row = 10}
  end

  def test_rowOff
    assert_raise(ArgumentError) { @marker.rowOff = "1"}
    assert_nothing_raised {@marker.rowOff = -10}
  end

  def test_coord
    @marker.coord 5, 10
    assert_equal(@marker.col, 5)
    assert_equal(@marker.row, 10)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caxlsx-3.2.0 test/drawing/tc_marker.rb