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_scaling.rb | |
| download | caxlsx-e53f04284618713b0a90b7a691425c380e829476.tar.gz caxlsx-e53f04284618713b0a90b7a691425c380e829476.zip | |
first commit
Diffstat (limited to 'test/drawing/tc_scaling.rb')
| -rw-r--r-- | test/drawing/tc_scaling.rb | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/drawing/tc_scaling.rb b/test/drawing/tc_scaling.rb new file mode 100644 index 00000000..3bf39c53 --- /dev/null +++ b/test/drawing/tc_scaling.rb @@ -0,0 +1,37 @@ +require 'test/unit' +require 'axlsx.rb' + +class TestScaling < Test::Unit::TestCase + def setup + @scaling = Axlsx::Scaling.new + end + + def teardown + end + + def test_initialization + assert(@scaling.orientation == :minMax) + end + + def test_logBase + assert_raise(ArgumentError) { @scaling.logBase = 1} + assert_nothing_raised {@scaling.logBase = 10} + end + + def test_orientation + assert_raise(ArgumentError) { @scaling.orientation = "1"} + assert_nothing_raised {@scaling.orientation = :maxMin} + end + + + def test_max + assert_raise(ArgumentError) { @scaling.max = 1} + assert_nothing_raised {@scaling.max = 10.5} + end + + def test_min + assert_raise(ArgumentError) { @scaling.min = 1} + assert_nothing_raised {@scaling.min = 10.5} + end + +end |
