2014-05-09 03:32:12 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <cxxtest/TestSuite.h>
|
|
|
|
|
2014-05-22 05:48:51 +08:00
|
|
|
#include <xlnt/xlnt.h>
|
2014-05-19 09:29:19 +08:00
|
|
|
#include "PathHelper.h"
|
2014-05-09 03:32:12 +08:00
|
|
|
|
|
|
|
class ThemeTestSuite : public CxxTest::TestSuite
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
ThemeTestSuite()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void test_write_theme()
|
|
|
|
{
|
2014-05-19 09:29:19 +08:00
|
|
|
auto content = xlnt::writer::write_theme();
|
|
|
|
|
|
|
|
std::string comparison_file = PathHelper::GetDataDirectory() + "/writer/expected/theme1.xml";
|
|
|
|
std::ifstream t(comparison_file);
|
|
|
|
std::stringstream buffer;
|
|
|
|
buffer << t.rdbuf();
|
2014-05-20 08:47:15 +08:00
|
|
|
std::string expected = buffer.str();
|
2014-05-19 09:29:19 +08:00
|
|
|
|
|
|
|
TS_ASSERT_EQUALS(buffer.str(), content);
|
2014-05-09 03:32:12 +08:00
|
|
|
}
|
|
|
|
};
|