Move the simple test cases from ClipboardTests class to ClipboardCoreTests
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 20h 23m
- Merged PRs (30d)
- 103
Description
Clipboard is an OS-wide resource. It might be modified by other processes on the machine and it does not handle congestion well. We can move some of the simple tests to our [mocked-up infrastructure](https://github.com/dotnet/winforms/blob/9bf049611c4160f35afff025d5de25d039516d02/src/System.Private.Windows.Core/tests/System.Private.Windows.Core.Tests/System/Private/Windows/Ole/ClipboardCoreTests.cs#L9) now.
Let's start by moving test that set or query the same value twice, for example -
[WinFormsTheory]
[MemberData(nameof(ContainsMethodsTheoryData))]
public void Contains_InvokeMultipleTimes_Success(Func contains)
{
Clipboard.Clear();
bool result = contains.Invoke();
contains.Invoke().Should().Be(result);
result.Should().BeFalse();
}
We would want to keep the scenario and round-trip tests running against the "real" clipboard.
Contributor guide
Assessment
This issue has not been assessed yet.