2014-05-09 03:32:12 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <cxxtest/TestSuite.h>
|
|
|
|
|
2016-07-04 07:22:08 +08:00
|
|
|
#include <detail/theme_serializer.hpp>
|
|
|
|
#include <helpers/path_helper.hpp>
|
2016-07-21 07:04:44 +08:00
|
|
|
#include <helpers/xml_helper.hpp>
|
2015-10-30 11:16:31 +08:00
|
|
|
#include <xlnt/workbook/workbook.hpp>
|
2015-10-15 06:05:13 +08:00
|
|
|
|
2014-06-06 04:19:31 +08:00
|
|
|
class test_theme : public CxxTest::TestSuite
|
2014-05-09 03:32:12 +08:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
void test_write_theme()
|
|
|
|
{
|
2015-10-30 11:16:31 +08:00
|
|
|
xlnt::workbook wb;
|
2015-10-31 06:54:04 +08:00
|
|
|
xlnt::theme_serializer serializer;
|
2016-07-04 07:22:08 +08:00
|
|
|
pugi::xml_document xml;
|
|
|
|
serializer.write_theme(wb.get_loaded_theme(), xml);
|
2016-07-21 07:04:44 +08:00
|
|
|
TS_ASSERT(xml_helper::compare_xml(path_helper::get_data_directory() + "/writer/expected/theme1.xml", xml));
|
2014-05-09 03:32:12 +08:00
|
|
|
}
|
|
|
|
};
|