blob: 01c0878427f1c7055a73b54ad48262a036c6a359 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# frozen_string_literal: true
# require 'tc_helper.rb'
# class TestNamedAxisData < Test::Unit::TestCase
# def setup
# p = Axlsx::Package.new
# @ws = p.workbook.add_worksheet
# @chart = @ws.drawing.add_chart Axlsx::Line3DChart
# @series = @chart.add_series :data=>[0,1,2]
# end
# def test_initialize
# assert(@series.data.is_a?Axlsx::SimpleTypedList)
# assert_equal(@series.data, [0,1,2])
# end
# def test_to_xml_string
# doc = Nokogiri::XML(@chart.to_xml_string)
# assert_equal(doc.xpath("//c:val/c:numRef/c:f").size,1)
# assert_equal(doc.xpath("//c:numCache/c:ptCount[@val='#{@series.data.size}']").size,1)
# @series.data.each_with_index do |datum, index|
# assert_equal(doc.xpath("//c:numCache/c:pt[@idx='#{index}']").size,1)
# assert_equal(doc.xpath("//c:numCache/c:pt/c:v[text()='#{datum}']").size,1)
# end
# end
# end
|