void TestOptionRegistry::TestGetString_UTF8String_Success() { { CString testUTF8String = Workshare::OptionApi::GetString(ToUnicode("название-имя")); std::string expectedString("Мир языков"); assertMessage(ToUnicode(expectedString) == testUTF8String, _T("UTF8 in the registry not translated correctly")); } { CString testUTF8String = Workshare::OptionApi::GetString(ToUnicode("名字")); std::string expectedString("世界多语言"); assertMessage(ToUnicode(expectedString) == testUTF8String, _T("UTF8 in the registry not translated correctly")); } { CString testUTF8String = Workshare::OptionApi::GetString(ToUnicode("Русский")); std::string expectedString("<имет>"); assertTest(ToUnicode(expectedString) == testUTF8String); } }
TEST_F(TemplateConverterTest, Convert_Constructor) { std::string targetString("#{CLASS}::#{CLASS}(){"); std::string expectedString("Hoge::Hoge(){"); EXPECT_EQ(expectedString, sut->convert(targetString)); }
TEST_F(TemplateConverterTest, Convert_ConstructorDefinition_usingSpace) { std::string targetString(" #{CLASS}();"); std::string expectedString(" Hoge();"); EXPECT_EQ(expectedString, sut->convert(targetString)); }
TEST_F(TemplateConverterTest, Convert_ClassName) { std::string targetString("class #{CLASS} {"); std::string expectedString("class Hoge {"); EXPECT_EQ(expectedString, sut->convert(targetString)); }
TEST_F(TemplateConverterTest, DoNotNeedConvert_includeLine) { std::string targetString("#include <iostream>"); std::string expectedString(targetString); EXPECT_EQ(expectedString, sut->convert(targetString)); }
TEST_F(TemplateConverterTest, DoNotNeedConvert_DueToNoTags) { std::string targetString("No Tag line"); std::string expectedString(targetString); EXPECT_EQ(expectedString, sut->convert(targetString)); }