Kaydet (Commit) ecfca0c7 authored tarafından Miklos Vajna's avatar Miklos Vajna

Add lok::Office::getFilterTypes() testcase

Change-Id: I9fa710288729b904f2f1c5b3c575212ef21c8a79
(cherry picked from commit edb9ef41)
üst 3f70d2d2
......@@ -51,11 +51,13 @@ public:
void testGetStyles();
void testGetFonts();
void testCreateView();
void testGetFilterTypes();
CPPUNIT_TEST_SUITE(DesktopLOKTest);
CPPUNIT_TEST(testGetStyles);
CPPUNIT_TEST(testGetFonts);
CPPUNIT_TEST(testCreateView);
CPPUNIT_TEST(testGetFilterTypes);
CPPUNIT_TEST_SUITE_END();
uno::Reference<lang::XComponent> mxComponent;
......@@ -150,6 +152,20 @@ void DesktopLOKTest::testCreateView()
closeDoc();
}
void DesktopLOKTest::testGetFilterTypes()
{
LibLibreOffice_Impl aOffice;
char* pJSON = aOffice.m_pOfficeClass->getFilterTypes(&aOffice);
std::stringstream aStream(pJSON);
boost::property_tree::ptree aTree;
boost::property_tree::read_json(aStream, aTree);
CPPUNIT_ASSERT(aTree.size() > 0);
CPPUNIT_ASSERT_EQUAL(std::string("application/vnd.oasis.opendocument.text"), aTree.get_child("writer8").get_child("MediaType").get_value<std::string>());
free(pJSON);
}
CPPUNIT_TEST_SUITE_REGISTRATION(DesktopLOKTest);
CPPUNIT_PLUGIN_IMPLEMENT();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment