axlsx 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. data/README.md +161 -134
  2. data/examples/example.rb +133 -153
  3. data/lib/axlsx.rb +3 -1
  4. data/lib/axlsx/#cfb.xlsx# +0 -0
  5. data/lib/axlsx/drawing/axis.rb +13 -10
  6. data/lib/axlsx/drawing/bar_3D_chart.rb +19 -11
  7. data/lib/axlsx/drawing/bar_series.rb +1 -1
  8. data/lib/axlsx/drawing/cat_axis.rb +5 -5
  9. data/lib/axlsx/drawing/cat_axis_data.rb +7 -7
  10. data/lib/axlsx/drawing/chart.rb +29 -15
  11. data/lib/axlsx/drawing/drawing.rb +1 -1
  12. data/lib/axlsx/drawing/graphic_frame.rb +10 -10
  13. data/lib/axlsx/drawing/line_3D_chart.rb +15 -7
  14. data/lib/axlsx/drawing/marker.rb +1 -1
  15. data/lib/axlsx/drawing/one_cell_anchor.rb +4 -4
  16. data/lib/axlsx/drawing/pic.rb +14 -14
  17. data/lib/axlsx/drawing/pie_3D_chart.rb +2 -2
  18. data/lib/axlsx/drawing/pie_series.rb +1 -1
  19. data/lib/axlsx/drawing/scaling.rb +5 -5
  20. data/lib/axlsx/drawing/ser_axis.rb +3 -3
  21. data/lib/axlsx/drawing/series.rb +3 -3
  22. data/lib/axlsx/drawing/series_title.rb +7 -7
  23. data/lib/axlsx/drawing/title.rb +13 -9
  24. data/lib/axlsx/drawing/two_cell_anchor.rb +4 -4
  25. data/lib/axlsx/drawing/val_axis.rb +2 -2
  26. data/lib/axlsx/drawing/val_axis_data.rb +7 -9
  27. data/lib/axlsx/drawing/view_3D.rb +7 -7
  28. data/lib/axlsx/package.rb +8 -0
  29. data/lib/axlsx/util/constants.rb +0 -4
  30. data/lib/axlsx/util/ms_off_crypto.rb +88 -0
  31. data/lib/axlsx/util/ms_off_crypto.rb~ +3 -0
  32. data/lib/axlsx/util/ms_offcrypto.rb~ +0 -0
  33. data/lib/axlsx/version.rb +1 -1
  34. data/lib/axlsx/workbook/workbook.rb +1 -0
  35. data/lib/axlsx/workbook/worksheet/cell.rb +21 -8
  36. data/lib/axlsx/workbook/worksheet/worksheet.rb +74 -18
  37. data/test/content_type/tc_content_type.rb +81 -0
  38. data/test/content_type/tc_default.rb +40 -0
  39. data/test/content_type/tc_override.rb +40 -0
  40. data/test/doc_props/tc_app.rb +19 -0
  41. data/test/doc_props/tc_core.rb +34 -0
  42. data/test/drawing/tc_axis.rb +40 -0
  43. data/test/drawing/tc_bar_3D_chart.rb +66 -0
  44. data/test/drawing/tc_bar_series.rb +34 -0
  45. data/test/drawing/tc_cat_axis.rb +32 -0
  46. data/test/drawing/tc_cat_axis_data.rb +18 -0
  47. data/test/drawing/tc_chart.rb +73 -0
  48. data/test/drawing/tc_drawing.rb +80 -0
  49. data/test/drawing/tc_graphic_frame.rb +26 -0
  50. data/test/drawing/tc_line_3d_chart.rb +48 -0
  51. data/test/drawing/tc_line_series.rb +27 -0
  52. data/test/drawing/tc_line_series.tc~ +34 -0
  53. data/test/drawing/tc_marker.rb +45 -0
  54. data/test/drawing/tc_one_cell_anchor.rb +67 -0
  55. data/test/drawing/tc_pic.rb +71 -0
  56. data/test/drawing/tc_picture_locking.rb +73 -0
  57. data/test/drawing/tc_picture_locking.rb~ +77 -0
  58. data/test/drawing/tc_pie_3D_chart.rb +33 -0
  59. data/test/drawing/tc_pie_series.rb +35 -0
  60. data/test/drawing/tc_scaling.rb +37 -0
  61. data/test/drawing/tc_ser_axis.rb +31 -0
  62. data/test/drawing/tc_series.rb +24 -0
  63. data/test/drawing/tc_series_title.rb +34 -0
  64. data/test/drawing/tc_title.rb +34 -0
  65. data/test/drawing/tc_two_cell_anchor.rb +38 -0
  66. data/test/drawing/tc_val_axis.rb +25 -0
  67. data/test/drawing/tc_val_axis_data.rb +18 -0
  68. data/test/drawing/tc_view_3D.rb +55 -0
  69. data/test/rels/tc_relationship.rb +16 -0
  70. data/test/rels/tc_relationships.rb +27 -0
  71. data/test/stylesheet/tc_border.rb +38 -0
  72. data/test/stylesheet/tc_border_pr.rb +33 -0
  73. data/test/stylesheet/tc_cell_alignment.rb +77 -0
  74. data/test/stylesheet/tc_cell_protection.rb +30 -0
  75. data/test/stylesheet/tc_cell_style.rb +58 -0
  76. data/test/stylesheet/tc_color.rb +38 -0
  77. data/test/stylesheet/tc_fill.rb +19 -0
  78. data/test/stylesheet/tc_font.rb +114 -0
  79. data/test/stylesheet/tc_gradient_fill.rb +65 -0
  80. data/test/stylesheet/tc_gradient_stop.rb +32 -0
  81. data/test/stylesheet/tc_num_fmt.rb +31 -0
  82. data/test/stylesheet/tc_pattern_fill.rb +38 -0
  83. data/test/stylesheet/tc_styles.rb +52 -0
  84. data/test/stylesheet/tc_table_style.rb +37 -0
  85. data/test/stylesheet/tc_table_style_element.rb +37 -0
  86. data/test/stylesheet/tc_table_styles.rb +30 -0
  87. data/test/stylesheet/tc_xf.rb +121 -0
  88. data/test/tc_package.rb +78 -0
  89. data/test/util/tc_simple_typed_list.rb +66 -0
  90. data/test/util/tc_validators.rb +76 -0
  91. data/test/workbook/tc_workbook.rb +60 -0
  92. data/test/workbook/worksheet/tc_cell.rb +194 -0
  93. data/test/workbook/worksheet/tc_row.rb +36 -0
  94. data/test/workbook/worksheet/tc_worksheet.rb +159 -0
  95. metadata +191 -31
  96. data/lib/axlsx/workbook/#workbook.rb# +0 -165
@@ -0,0 +1,80 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestDrawing < Test::Unit::TestCase
5
+ def setup
6
+ p = Axlsx::Package.new
7
+ @ws = p.workbook.add_worksheet
8
+
9
+ end
10
+
11
+ def test_initialization
12
+ assert(@ws.workbook.drawings.empty?)
13
+ assert_equal(@ws.drawing, @ws.workbook.drawings.last, "drawing is added to workbook")
14
+ assert(@ws.drawing.anchors.is_a?(Axlsx::SimpleTypedList) && @ws.drawing.anchors.empty?, "anchor list is created and empty")
15
+ end
16
+
17
+ def test_add_chart
18
+ chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"bob", :start_at=>[0,0], :end_at=>[1,1])
19
+ assert(chart.is_a?(Axlsx::Pie3DChart), "must create a chart")
20
+ assert_equal(@ws.workbook.charts.last, chart, "must be added to workbook charts collection")
21
+ assert_equal(@ws.drawing.anchors.last.object.chart, chart, "an anchor has been created and holds a reference to this chart")
22
+ anchor = @ws.drawing.anchors.last
23
+ assert_equal([anchor.from.row, anchor.from.col], [0,0], "options for start at are applied")
24
+ assert_equal([anchor.to.row, anchor.to.col], [1,1], "options for start at are applied")
25
+ assert_equal(chart.title.text, "bob", "option for title is applied")
26
+ end
27
+
28
+ def test_add_image
29
+ src = File.dirname(__FILE__) + "/../../examples/image1.jpeg"
30
+ image = @ws.add_image(:image_src => src, :start_at=>[0,0], :width=>600, :height=>400)
31
+ assert(@ws.drawing.anchors.last.is_a?(Axlsx::OneCellAnchor))
32
+ assert(image.is_a?(Axlsx::Pic))
33
+ assert_equal(600, image.width)
34
+ assert_equal(400, image.height)
35
+ end
36
+
37
+ def test_charts
38
+ assert(@ws.drawing.charts.empty?)
39
+ chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"bob", :start_at=>[0,0], :end_at=>[1,1])
40
+ assert_equal(@ws.drawing.charts.last, chart, "add chart is returned")
41
+ chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"nancy", :start_at=>[1,5], :end_at=>[5,10])
42
+ assert_equal(@ws.drawing.charts.last, chart, "add chart is returned")
43
+ end
44
+
45
+ def test_pn
46
+ assert_equal(@ws.drawing.pn, "drawings/drawing1.xml")
47
+ end
48
+
49
+ def test_rels_pn
50
+ assert_equal(@ws.drawing.rels_pn, "drawings/_rels/drawing1.xml.rels")
51
+ end
52
+
53
+ def test_rId
54
+ assert_equal(@ws.drawing.rId, "rId1")
55
+ end
56
+
57
+ def test_index
58
+ assert_equal(@ws.drawing.index, @ws.workbook.drawings.index(@ws.drawing))
59
+ end
60
+
61
+ def test_relationships
62
+ assert(@ws.drawing.relationships.empty?)
63
+ chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"bob", :start_at=>[0,0], :end_at=>[1,1])
64
+ assert_equal(@ws.drawing.relationships.size, 1, "adding a chart adds a relationship")
65
+ chart = @ws.add_chart(Axlsx::Pie3DChart, :title=>"nancy", :start_at=>[1,5], :end_at=>[5,10])
66
+ assert_equal(@ws.drawing.relationships.size, 2, "adding a chart adds a relationship")
67
+ end
68
+
69
+ def test_to_xml
70
+ schema = Nokogiri::XML::Schema(File.open(Axlsx::DRAWING_XSD))
71
+ doc = Nokogiri::XML(@ws.drawing.to_xml)
72
+ errors = []
73
+ schema.validate(doc).each do |error|
74
+ errors.push error
75
+ puts error.message
76
+ end
77
+ assert(errors.empty?, "error free validation")
78
+ end
79
+
80
+ end
@@ -0,0 +1,26 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestGraphicFrame < Test::Unit::TestCase
5
+ def setup
6
+ p = Axlsx::Package.new
7
+ @ws = p.workbook.add_worksheet
8
+ @chart = @ws.add_chart Axlsx::Chart
9
+ @frame = @chart.graphic_frame
10
+ end
11
+
12
+ def teardown
13
+ end
14
+
15
+ def test_initialization
16
+ assert(@frame.anchor.is_a?(Axlsx::TwoCellAnchor))
17
+ assert_equal(@frame.chart, @chart)
18
+ end
19
+
20
+ def test_rId
21
+ assert_equal(@frame.rId, "rId1")
22
+ chart = @ws.add_chart Axlsx::Chart
23
+ assert_equal(chart.graphic_frame.rId, "rId2")
24
+ end
25
+
26
+ end
@@ -0,0 +1,48 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestLine3DChart < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @p = Axlsx::Package.new
8
+ ws = @p.workbook.add_worksheet
9
+ @row = ws.add_row ["one", 1, Time.now]
10
+ @chart = ws.add_chart Axlsx::Line3DChart, :title => "fishery"
11
+ end
12
+
13
+ def teardown
14
+ end
15
+
16
+ def test_initialization
17
+ assert_equal(@chart.grouping, :standard, "grouping defualt incorrect")
18
+ assert_equal(@chart.series_type, Axlsx::LineSeries, "series type incorrect")
19
+ assert(@chart.catAxis.is_a?(Axlsx::CatAxis), "category axis not created")
20
+ assert(@chart.valAxis.is_a?(Axlsx::ValAxis), "value access not created")
21
+ assert(@chart.serAxis.is_a?(Axlsx::SerAxis), "value access not created")
22
+ end
23
+
24
+ def test_grouping
25
+ assert_raise(ArgumentError, "require valid grouping") { @chart.grouping = :inverted }
26
+ assert_nothing_raised("allow valid grouping") { @chart.grouping = :stacked }
27
+ assert(@chart.grouping == :stacked)
28
+ end
29
+
30
+ def test_gapDepth
31
+ assert_raise(ArgumentError, "require valid gapDepth") { @chart.gapDepth = 200 }
32
+ assert_nothing_raised("allow valid gapDepth") { @chart.gapDepth = "200%" }
33
+ assert(@chart.gapDepth == "200%")
34
+ end
35
+
36
+
37
+ def test_to_xml
38
+ schema = Nokogiri::XML::Schema(File.open(Axlsx::DRAWING_XSD))
39
+ doc = Nokogiri::XML(@chart.to_xml)
40
+ errors = []
41
+ schema.validate(doc).each do |error|
42
+ errors.push error
43
+ puts error.message
44
+ end
45
+ assert(errors.empty?, "error free validation")
46
+ end
47
+
48
+ end
@@ -0,0 +1,27 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestLineSeries < Test::Unit::TestCase
5
+
6
+ def setup
7
+ p = Axlsx::Package.new
8
+ @ws = p.workbook.add_worksheet :name=>"hmmm"
9
+ chart = @ws.drawing.add_chart Axlsx::Line3DChart, :title => "fishery"
10
+ @series = chart.add_series :data=>[0,1,2], :labels=>["zero", "one", "two"], :title=>"bob"
11
+ end
12
+
13
+ def test_initialize
14
+ assert_equal(@series.title.text, "bob", "series title has been applied")
15
+ assert_equal(@series.data, [0,1,2], "data option applied")
16
+ assert_equal(@series.labels, ["zero", "one","two"], "labels option applied")
17
+ end
18
+
19
+ def test_data
20
+ assert_equal(@series.data, [0,1,2])
21
+ end
22
+
23
+ def test_labels
24
+ assert_equal(@series.labels, ["zero", "one", "two"])
25
+ end
26
+
27
+ end
@@ -0,0 +1,34 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestLineSeries < Test::Unit::TestCase
5
+
6
+ def setup
7
+ p = Axlsx::Package.new
8
+ @ws = p.workbook.add_worksheet :name=>"hmmm"
9
+ chart = @ws.drawing.add_chart Axlsx::Bar3DChart, :title => "fishery"
10
+ @series = chart.add_series :data=>[0,1,2], :labels=>["zero", "one", "two"], :title=>"bob"
11
+ end
12
+
13
+ def test_initialize
14
+ assert_equal(@series.title, "bob", "series title has been applied")
15
+ assert_equal(@series.data, [0,1,2], "data option applied")
16
+ assert_equal(@series.labels, ["zero", "one","two"], "labels option applied")
17
+ assert_equal(@series.shape, :box, "series shape has been applied")
18
+ end
19
+
20
+ def test_data
21
+ assert_equal(@series.data, [0,1,2])
22
+ end
23
+
24
+ def test_labels
25
+ assert_equal(@series.labels, ["zero", "one", "two"])
26
+ end
27
+
28
+ def test_shape
29
+ assert_raise(ArgumentError, "require valid shape") { @series.shape = :teardropt }
30
+ assert_nothing_raised("allow valid shape") { @series.shape = :cone }
31
+ assert(@series.shape == :cone)
32
+ end
33
+
34
+ end
@@ -0,0 +1,45 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestMarker < Test::Unit::TestCase
5
+ def setup
6
+ @marker = Axlsx::Marker.new
7
+ end
8
+
9
+ def teardown
10
+ end
11
+
12
+ def test_initialization
13
+ assert(@marker.col == 0)
14
+ assert(@marker.colOff == 0)
15
+ assert(@marker.row == 0)
16
+ assert(@marker.rowOff == 0)
17
+ end
18
+
19
+ def test_col
20
+ assert_raise(ArgumentError) { @marker.col = -1}
21
+ assert_nothing_raised {@marker.col = 10}
22
+ end
23
+
24
+ def test_colOff
25
+ assert_raise(ArgumentError) { @marker.colOff = "1"}
26
+ assert_nothing_raised {@marker.colOff = -10}
27
+ end
28
+
29
+ def test_row
30
+ assert_raise(ArgumentError) { @marker.row = -1}
31
+ assert_nothing_raised {@marker.row = 10}
32
+ end
33
+
34
+ def test_rowOff
35
+ assert_raise(ArgumentError) { @marker.rowOff = "1"}
36
+ assert_nothing_raised {@marker.rowOff = -10}
37
+ end
38
+
39
+ def test_coord
40
+ @marker.coord 5, 10
41
+ assert_equal(@marker.col, 5)
42
+ assert_equal(@marker.row, 10)
43
+ end
44
+
45
+ end
@@ -0,0 +1,67 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestOneCellAnchor < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @p = Axlsx::Package.new
8
+ @ws = @p.workbook.add_worksheet
9
+ @test_img = File.dirname(__FILE__) + "/../../examples/image1.jpeg"
10
+ @image = @ws.add_image :image_src => @test_img
11
+ @anchor = @image.anchor
12
+ end
13
+
14
+ def teardown
15
+ end
16
+
17
+ def test_initialization
18
+ assert(@anchor.from.col == 0)
19
+ assert(@anchor.from.row == 0)
20
+ assert(@anchor.width == 0)
21
+ assert(@anchor.height == 0)
22
+ end
23
+
24
+ def test_from
25
+ assert(@anchor.from.is_a?(Axlsx::Marker))
26
+ end
27
+
28
+ def test_object
29
+ assert(@anchor.object.is_a?(Axlsx::Pic))
30
+ end
31
+
32
+ def test_index
33
+ assert_equal(@anchor.index, @anchor.drawing.anchors.index(@anchor))
34
+ end
35
+
36
+ def test_width
37
+ assert_raise(ArgumentError) { @anchor.width = "a" }
38
+ assert_nothing_raised { @anchor.width = 600 }
39
+ assert_equal(@anchor.width, 600)
40
+ end
41
+
42
+ def test_height
43
+ assert_raise(ArgumentError) { @anchor.height = "a" }
44
+ assert_nothing_raised { @anchor.height = 400 }
45
+ assert_equal(400, @anchor.height)
46
+ end
47
+
48
+ def test_ext
49
+ ext = @anchor.send(:ext)
50
+ assert_equal(ext[:cx], (@anchor.width * 914400 / 96))
51
+ assert_equal(ext[:cy], (@anchor.height * 914400 / 96))
52
+ end
53
+
54
+ def test_options
55
+ assert_raise(ArgumentError, 'invalid start_at') { @ws.add_image :image_src=>@test_img, :start_at=>[1] }
56
+ i = @ws.add_image :image_src=>@test_img, :start_at => [1,2], :width=>100, :height=>200, :name=>"someimage", :descr=>"a neat image"
57
+
58
+ assert_equal("a neat image", i.descr)
59
+ assert_equal("someimage", i.name)
60
+ assert_equal(200, i.height)
61
+ assert_equal(100, i.width)
62
+ assert_equal(1, i.anchor.from.col)
63
+ assert_equal(2, i.anchor.from.row)
64
+ assert_equal(@test_img, i.image_src)
65
+ end
66
+
67
+ end
@@ -0,0 +1,71 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestPic < Test::Unit::TestCase
5
+
6
+ def setup
7
+ @p = Axlsx::Package.new
8
+ ws = @p.workbook.add_worksheet
9
+ @test_img = File.dirname(__FILE__) + "/../../examples/image1.jpeg"
10
+ @image = ws.add_image :image_src => @test_img
11
+ end
12
+
13
+ def teardown
14
+ end
15
+
16
+ def test_initialization
17
+ assert_equal(@p.workbook.images.first, @image)
18
+ assert_equal(@image.image_src, @test_img)
19
+ end
20
+
21
+ def test_name
22
+ assert_raise(ArgumentError) { @image.name = 49 }
23
+ assert_nothing_raised { @image.name = "unknown" }
24
+ assert_equal(@image.name, "unknown")
25
+ end
26
+
27
+ def test_start_at
28
+ assert_raise(ArgumentError) { @image.start_at "a", 1 }
29
+ assert_nothing_raised { @image.start_at 6, 7 }
30
+ assert_equal(@image.anchor.from.col, 6)
31
+ assert_equal(@image.anchor.from.row, 7)
32
+ end
33
+
34
+ def test_width
35
+ assert_raise(ArgumentError) { @image.width = "a" }
36
+ assert_nothing_raised { @image.width = 600 }
37
+ assert_equal(@image.width, 600)
38
+ end
39
+
40
+ def test_height
41
+ assert_raise(ArgumentError) { @image.height = "a" }
42
+ assert_nothing_raised { @image.height = 600 }
43
+ assert_equal(600, @image.height)
44
+ end
45
+
46
+ def test_image_src
47
+ assert_raise(ArgumentError) { @image.image_src = 49 }
48
+ assert_raise(ArgumentError) { @image.image_src = 'Unknown' }
49
+ assert_raise(ArgumentError) { @image.image_src = __FILE__ }
50
+ assert_nothing_raised { @image.image_src = @test_img }
51
+ assert_equal(@image.image_src, @test_img)
52
+ end
53
+
54
+ def test_descr
55
+ assert_raise(ArgumentError) { @image.descr = 49 }
56
+ assert_nothing_raised { @image.descr = "test" }
57
+ assert_equal(@image.descr, "test")
58
+ end
59
+
60
+ def test_to_xml
61
+ schema = Nokogiri::XML::Schema(File.open(Axlsx::DRAWING_XSD))
62
+ doc = Nokogiri::XML(@image.anchor.drawing.to_xml)
63
+ errors = []
64
+ schema.validate(doc).each do |error|
65
+ errors.push error
66
+ puts error.message
67
+ end
68
+ assert(errors.empty?, "error free validation")
69
+ end
70
+
71
+ end
@@ -0,0 +1,73 @@
1
+ require 'test/unit'
2
+ require 'axlsx.rb'
3
+
4
+ class TestPictureLocking < Test::Unit::TestCase
5
+ def setup
6
+ @item = Axlsx::PictureLocking.new
7
+ end
8
+ def teardown
9
+ end
10
+
11
+ def test_initialiation
12
+ assert_equal(@item.instance_values.size, 1)
13
+ assert_equal(@item.noChangeAspect, true)
14
+ end
15
+
16
+ def test_noGrp
17
+ assert_raise(ArgumentError) { @item.noGrp = -1 }
18
+ assert_nothing_raised { @item.noGrp = false }
19
+ assert_equal(@item.noGrp, false )
20
+ end
21
+
22
+ def test_noRot
23
+ assert_raise(ArgumentError) { @item.noRot = -1 }
24
+ assert_nothing_raised { @item.noRot = false }
25
+ assert_equal(@item.noRot, false )
26
+ end
27
+
28
+ def test_noChangeAspect
29
+ assert_raise(ArgumentError) { @item.noChangeAspect = -1 }
30
+ assert_nothing_raised { @item.noChangeAspect = false }
31
+ assert_equal(@item.noChangeAspect, false )
32
+ end
33
+
34
+ def test_noMove
35
+ assert_raise(ArgumentError) { @item.noMove = -1 }
36
+ assert_nothing_raised { @item.noMove = false }
37
+ assert_equal(@item.noMove, false )
38
+ end
39
+
40
+ def test_noResize
41
+ assert_raise(ArgumentError) { @item.noResize = -1 }
42
+ assert_nothing_raised { @item.noResize = false }
43
+ assert_equal(@item.noResize, false )
44
+ end
45
+
46
+ def test_noEditPoints
47
+ assert_raise(ArgumentError) { @item.noEditPoints = -1 }
48
+ assert_nothing_raised { @item.noEditPoints = false }
49
+ assert_equal(@item.noEditPoints, false )
50
+ end
51
+
52
+ def test_noAdjustHandles
53
+ assert_raise(ArgumentError) { @item.noAdjustHandles = -1 }
54
+ assert_nothing_raised { @item.noAdjustHandles = false }
55
+ assert_equal(@item.noAdjustHandles, false )
56
+ end
57
+
58
+ def test_noChangeArrowheads
59
+ assert_raise(ArgumentError) { @item.noChangeArrowheads = -1 }
60
+ assert_nothing_raised { @item.noChangeArrowheads = false }
61
+ assert_equal(@item.noChangeArrowheads, false )
62
+ end
63
+
64
+ def test_noChangeShapeType
65
+ assert_raise(ArgumentError) { @item.noChangeShapeType = -1 }
66
+ assert_nothing_raised { @item.noChangeShapeType = false }
67
+ assert_equal(@item.noChangeShapeType, false )
68
+ end
69
+
70
+
71
+
72
+
73
+ end