diff options
| author | Randy Morgan <[email protected]> | 2011-11-20 23:22:04 +0900 |
|---|---|---|
| committer | Randy Morgan <[email protected]> | 2011-11-20 23:22:04 +0900 |
| commit | e53f04284618713b0a90b7a691425c380e829476 (patch) | |
| tree | 801fea138160f9af426d62bf94ad5bf97123ece9 /test/drawing/tc_two_cell_anchor.rb | |
| download | caxlsx-e53f04284618713b0a90b7a691425c380e829476.tar.gz caxlsx-e53f04284618713b0a90b7a691425c380e829476.zip | |
first commit
Diffstat (limited to 'test/drawing/tc_two_cell_anchor.rb')
| -rw-r--r-- | test/drawing/tc_two_cell_anchor.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/drawing/tc_two_cell_anchor.rb b/test/drawing/tc_two_cell_anchor.rb new file mode 100644 index 00000000..1c6e6882 --- /dev/null +++ b/test/drawing/tc_two_cell_anchor.rb @@ -0,0 +1,37 @@ +require 'test/unit' +require 'axlsx.rb' + +class TestTwoCellAnchor < Test::Unit::TestCase + def setup + @p = Axlsx::Package.new + ws = @p.workbook.add_worksheet + @row = ws.add_row ["one", 1, Time.now] + @title = Axlsx::Title.new + @chart = ws.add_chart Axlsx::Bar3DChart + @anchor = @chart.graphic_frame.anchor + end + + def teardown + end + + def test_initialization + assert(@anchor.from.col == 0) + assert(@anchor.from.row == 0) + assert(@anchor.to.col == 5) + assert(@anchor.to.row == 10) + end + + def test_start_at + @anchor.start_at 5, 10 + assert(@anchor.from.col == 5) + assert(@anchor.from.row == 10) + end + + def test_end_at + @anchor.end_at 10, 15 + assert(@anchor.to.col == 10) + assert(@anchor.to.row == 15) + end + + +end |
