You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 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.
The text was updated successfully, but these errors were encountered:
Do you mean move these tests to src/System.Private.Windows.Core/tests/System.Private.Windows.Core.Tests/System/Private/Windows/Ole/ClipboardCoreTests.cs?
but looks like many methods are not included in ClipboardCore
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 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.
The text was updated successfully, but these errors were encountered: