Sha256: 07a8c486fb4440a8ca9d74032a88f47901d536f0fd62e70906d4cdf08b53bf94

Contents?: true

Size: 1.94 KB

Versions: 38

Compression:

Stored size: 1.94 KB

Contents

require 'tc_helper.rb'

class TestPictureLocking < Test::Unit::TestCase
  def setup
    @item = Axlsx::PictureLocking.new
  end
  def teardown
  end

  def test_initialiation
    assert_equal(@item.instance_values.size, 1)
    assert_equal(@item.noChangeAspect, true)
  end

  def test_noGrp
    assert_raise(ArgumentError) { @item.noGrp = -1 }
    assert_nothing_raised { @item.noGrp = false }
    assert_equal(@item.noGrp, false )
  end

  def test_noRot
    assert_raise(ArgumentError) { @item.noRot = -1 }
    assert_nothing_raised { @item.noRot = false }
    assert_equal(@item.noRot, false )
  end

  def test_noChangeAspect
    assert_raise(ArgumentError) { @item.noChangeAspect = -1 }
    assert_nothing_raised { @item.noChangeAspect = false }
    assert_equal(@item.noChangeAspect, false )
  end

  def test_noMove
    assert_raise(ArgumentError) { @item.noMove = -1 }
    assert_nothing_raised { @item.noMove = false }
    assert_equal(@item.noMove, false )
  end

  def test_noResize
    assert_raise(ArgumentError) { @item.noResize = -1 }
    assert_nothing_raised { @item.noResize = false }
    assert_equal(@item.noResize, false )
  end

  def test_noEditPoints
    assert_raise(ArgumentError) { @item.noEditPoints = -1 }
    assert_nothing_raised { @item.noEditPoints = false }
    assert_equal(@item.noEditPoints, false )
  end

  def test_noAdjustHandles
    assert_raise(ArgumentError) { @item.noAdjustHandles = -1 }
    assert_nothing_raised { @item.noAdjustHandles = false }
    assert_equal(@item.noAdjustHandles, false )
  end

  def test_noChangeArrowheads
    assert_raise(ArgumentError) { @item.noChangeArrowheads = -1 }
    assert_nothing_raised { @item.noChangeArrowheads = false }
    assert_equal(@item.noChangeArrowheads, false )
  end

  def test_noChangeShapeType
    assert_raise(ArgumentError) { @item.noChangeShapeType = -1 }
    assert_nothing_raised { @item.noChangeShapeType = false }
    assert_equal(@item.noChangeShapeType, false )
  end




end

Version data entries

38 entries across 38 versions & 6 rubygems

Version Path
caxlsx-3.1.1 test/drawing/tc_picture_locking.rb
caxlsx-3.1.0 test/drawing/tc_picture_locking.rb
bonio-axlsx-2.2.3 test/drawing/tc_picture_locking.rb
caxlsx-3.0.4 test/drawing/tc_picture_locking.rb
caxlsx-3.0.3 test/drawing/tc_picture_locking.rb
caxlsx-3.0.2 test/drawing/tc_picture_locking.rb
caxlsx-2.0.2 test/drawing/tc_picture_locking.rb
caxlsx-3.0.1 test/drawing/tc_picture_locking.rb
caxlsx-3.0.0 test/drawing/tc_picture_locking.rb
axlsx-alt-3.0.1 test/drawing/tc_picture_locking.rb
axlsx-alt-3.0.0 test/drawing/tc_picture_locking.rb
axlsx-3.0.0.pre test/drawing/tc_picture_locking.rb
bonio-axlsx-2.2.2 test/drawing/tc_picture_locking.rb
bonio-axlsx-2.2.1 test/drawing/tc_picture_locking.rb
dg-axlsx-2.1.0 test/drawing/tc_picture_locking.rb
axlsx-2.1.0.pre test/drawing/tc_picture_locking.rb
l_axlsx-2.0.1 test/drawing/tc_picture_locking.rb
axlsx-2.0.1 test/drawing/tc_picture_locking.rb
axlsx-2.0.0 test/drawing/tc_picture_locking.rb
axlsx-1.3.6 test/drawing/tc_picture_locking.rb