Sha256: b6989b75e73d5b196dd7a8f525e7f7a4a9dd11c9be28a55a67308e98a3a5f1a7

Contents?: true

Size: 827 Bytes

Versions: 29

Compression:

Stored size: 827 Bytes

Contents

require 'tc_helper.rb'

class TestPie3DChart < Test::Unit::TestCase

  def setup
    p = Axlsx::Package.new
    ws = p.workbook.add_worksheet
    @row = ws.add_row ["one", 1, Time.now]
    @chart = ws.add_chart Axlsx::Pie3DChart, :title => "fishery"
  end

  def teardown
  end

  def test_initialization
    assert_equal(@chart.view_3D.rot_x, 30, "view 3d default rot_x incorrect")
    assert_equal(@chart.view_3D.perspective, 30, "view_3d default perspective incorrect")
    assert_equal(@chart.series_type, Axlsx::PieSeries, "series type incorrect")
  end

  def test_to_xml
    schema = Nokogiri::XML::Schema(File.open(Axlsx::DRAWING_XSD))
    doc = Nokogiri::XML(@chart.to_xml_string)
    errors = schema.validate(doc).map {|error| puts error.message; error }
    assert(errors.empty?, "error free validation")
  end

end

Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
caxlsx-3.1.1 test/drawing/tc_pie_3D_chart.rb
caxlsx-3.1.0 test/drawing/tc_pie_3D_chart.rb
bonio-axlsx-2.2.3 test/drawing/tc_pie_3D_chart.rb
caxlsx-3.0.4 test/drawing/tc_pie_3D_chart.rb
caxlsx-3.0.3 test/drawing/tc_pie_3D_chart.rb
caxlsx-3.0.2 test/drawing/tc_pie_3D_chart.rb
caxlsx-2.0.2 test/drawing/tc_pie_3D_chart.rb
caxlsx-3.0.1 test/drawing/tc_pie_3D_chart.rb
caxlsx-3.0.0 test/drawing/tc_pie_3D_chart.rb
axlsx-alt-3.0.1 test/drawing/tc_pie_3D_chart.rb
axlsx-alt-3.0.0 test/drawing/tc_pie_3D_chart.rb
axlsx-3.0.0.pre test/drawing/tc_pie_3D_chart.rb
bonio-axlsx-2.2.2 test/drawing/tc_pie_3D_chart.rb
bonio-axlsx-2.2.1 test/drawing/tc_pie_3D_chart.rb
dg-axlsx-2.1.0 test/drawing/tc_pie_3D_chart.rb
axlsx-2.1.0.pre test/drawing/tc_pie_3D_chart.rb
l_axlsx-2.0.1 test/drawing/tc_pie_3D_chart.rb
axlsx-2.0.1 test/drawing/tc_pie_3D_chart.rb
axlsx-2.0.0 test/drawing/tc_pie_3D_chart.rb
axlsx-1.3.6 test/drawing/tc_pie_3D_chart.rb