Esempio n. 1
0
TEST(ClipboardTests, has_withNoFormats_returnsFalse)
{
    Clipboard clipboard;
    clipboard.open(0);

    bool actual = clipboard.has(IClipboard::kText);

    EXPECT_FALSE(actual);
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
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);
}
Esempio n. 4
0
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);
}