xlnt/tests/ThemeTestSuite.h
2014-05-21 17:48:51 -04:00

30 lines
622 B
C++

#pragma once
#include <iostream>
#include <cxxtest/TestSuite.h>
#include <xlnt/xlnt.h>
#include "PathHelper.h"
class ThemeTestSuite : public CxxTest::TestSuite
{
public:
ThemeTestSuite()
{
}
void test_write_theme()
{
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();
std::string expected = buffer.str();
TS_ASSERT_EQUALS(buffer.str(), content);
}
};