diff options
| author | randym <[email protected]> | 2018-02-08 00:14:12 +0900 |
|---|---|---|
| committer | randym <[email protected]> | 2018-02-08 00:14:12 +0900 |
| commit | 747ff93269c518db21c9869b61b1d1470395b502 (patch) | |
| tree | 16c8d9c416a02fc7ca8bd91e058ea61c72dfc7ce /test/drawing/tc_scatter_series.rb | |
| parent | 3f34514ecf53fb4a3401b5336833bbeb439efe2a (diff) | |
| download | caxlsx-747ff93269c518db21c9869b61b1d1470395b502.tar.gz caxlsx-747ff93269c518db21c9869b61b1d1470395b502.zip | |
chore(coverage) increase coverage and cleanup
Diffstat (limited to 'test/drawing/tc_scatter_series.rb')
| -rw-r--r-- | test/drawing/tc_scatter_series.rb | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/test/drawing/tc_scatter_series.rb b/test/drawing/tc_scatter_series.rb index 62a338b1..ea3611ab 100644 --- a/test/drawing/tc_scatter_series.rb +++ b/test/drawing/tc_scatter_series.rb @@ -18,28 +18,39 @@ class TestScatterSeries < Test::Unit::TestCase @series = @chart.add_series :xData=>[1,2,4], :yData=>[1,3,9], :title=>"smoothed exponents" assert(@series.smooth, "series is smooth by default on smooth charts") end - + def test_unsmoothed_chart_default_smoothing @chart = @ws.add_chart Axlsx::ScatterChart, :title => "Unsmooth Chart", :scatter_style => :line @series = @chart.add_series :xData=>[1,2,4], :yData=>[1,3,9], :title=>"unsmoothed exponents" assert([email protected], "series is not smooth by default on non-smooth charts") end - + def test_explicit_smoothing @chart = @ws.add_chart Axlsx::ScatterChart, :title => "Unsmooth Chart, Smooth Series", :scatter_style => :line @series = @chart.add_series :xData=>[1,2,4], :yData=>[1,3,9], :title=>"smoothed exponents", :smooth => true assert(@series.smooth, "series is smooth when overriding chart default") - end - + end + def test_explicit_unsmoothing @chart = @ws.add_chart Axlsx::ScatterChart, :title => "Smooth Chart, Unsmooth Series", :scatter_style => :smoothMarker @series = @chart.add_series :xData=>[1,2,4], :yData=>[1,3,9], :title=>"unsmoothed exponents", :smooth => false assert([email protected], "series is not smooth when overriding chart default") - end + end + + def test_ln_width + @chart = @ws.add_chart Axlsx::ScatterChart, :title => "ln width", :scatter_style => :line + @series = @chart.add_series :xData=>[1,2,4], :yData=>[1,3,9], :title=>"ln_width" + @series.ln_width = 12700 + assert_equal(@series.ln_width, 12700, 'line width assigment is allowed') + end def test_to_xml_string + @chart.scatter_style = :line + @series.ln_width = 12700 doc = Nokogiri::XML(@chart.to_xml_string) + assert_equal(12700, @series.ln_width) assert_equal(doc.xpath("//a:srgbClr[@val='#{@series.color}']").size,4) + assert_equal(doc.xpath("//a:ln[@w='#{@series.ln_width}']").length, 1) end end |
