Sha256: 1c5988579defd36f50f8dffa1f8bccaae843f76b39ead9e84251ec615123c064

Contents?: true

Size: 1.96 KB

Versions: 7

Compression:

Stored size: 1.96 KB

Contents

require 'test/unit'
require 'axlsx.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

7 entries across 7 versions & 1 rubygems

Version Path
axlsx-1.0.18 test/drawing/tc_picture_locking.rb
axlsx-1.0.17 test/drawing/tc_picture_locking.rb
axlsx-1.0.16 test/drawing/tc_picture_locking.rb
axlsx-1.0.15 test/drawing/tc_picture_locking.rb
axlsx-1.0.14 test/drawing/tc_picture_locking.rb
axlsx-1.0.12 test/drawing/tc_picture_locking.rb
axlsx-1.0.11 test/drawing/tc_picture_locking.rb