TEST(ClipboardTests, has_withNoFormats_returnsFalse) { Clipboard clipboard; clipboard.open(0); bool actual = clipboard.has(IClipboard::kText); EXPECT_FALSE(actual); }
TEST(ClipboardTests, has_withFormatAdded_returnsTrue) { Clipboard clipboard; clipboard.open(0); clipboard.add(IClipboard::kText, "synergy rocks!"); bool actual = clipboard.has(IClipboard::kText); EXPECT_EQ(true, actual); }
TEST(ClipboardTests, empty_singleFormat_hasReturnsFalse) { Clipboard clipboard; clipboard.open(0); clipboard.add(Clipboard::kText, "synergy rocks!"); clipboard.empty(); bool actual = clipboard.has(Clipboard::kText); EXPECT_FALSE(actual); }
TEST(ClipboardTests, unmarshall_emptyData_hasTextIsFalse) { Clipboard clipboard; String data; data += (char)0; data += (char)0; data += (char)0; data += (char)0; // 0 formats added clipboard.unmarshall(data, 0); clipboard.open(0); bool actual = clipboard.has(IClipboard::kText); EXPECT_FALSE(actual); }