# encoding: utf-8 require 'helper' class TestPrint < Test::Unit::TestCase def test_print_of_a_xml_string report = Beardley::Report.new(' ') assert_equal Pathname, report.source_file.class assert_equal Pathname, report.object_file.class report.to_pdf report.to_odt report.to_docx end def test_print_of_empty_report empty = Pathname.new(__FILE__).dirname.join("fixtures", "empty.jrxml") assert empty.exist? report = Beardley::Report.new(empty) assert_equal Pathname, report.source_file.class assert_equal Pathname, report.object_file.class report.to_pdf report.to_odt report.to_docx end def test_print_of_empty_report_with_datasource empty = Pathname.new(__FILE__).dirname.join("fixtures", "empty.jrxml") assert empty.exist? report = Beardley::Report.new(empty) assert_equal Pathname, report.source_file.class assert_equal Pathname, report.object_file.class datasource = ' 12' report.to_pdf(datasource) report.to_odt(datasource) report.to_docx(datasource) end def test_print_of_barcode_report barcode = Pathname.new(__FILE__).dirname.join("fixtures", "barcode.jrxml") assert barcode.exist? report = Beardley::Report.new(barcode) assert_equal Pathname, report.source_file.class assert_equal Pathname, report.object_file.class report.to_pdf report.to_odt report.to_docx end # TODO Test parameters end