Skip to content

Moving Clipboard related tests to a new class under collection Sequential  #11948

Closed

Description

@LeafShi1

Moving the tests that use Clipboard to OriginalFileName.ClipboardTests.cs and [Collection("Sequential")] for it, like PR #11606

Under Microsoft.VisualBasic.Devices.Tests:

  • ComputerTests.cs
  • ClipboardProxyTests.cs

Under System.Windows.Forms.Tests:

Activity

  1. LeafShi1 commented on Aug 23, 2024

    @LeafShi1
    MemberAuthor

    @paul1956 The test under ComputerTests needs to verify the state of Clipboard Properties. Since the instance computer is only used within this test, it should not be affected by other test cases. Therefore, this file should not need to add [Collection("Sequential")], what do you think?

  2. paul1956 commented on Aug 23, 2024

    @paul1956
    Contributor

    @LeafShi1 I am pretty sure that there is only one Clipboard, while Computer may be in instance class and it creates a New instance of ClipboardProxy, eventually you get to the Static System.Windows.Forms.Clipboard and it will not work in parallel.

      <EditorBrowsable(EditorBrowsableState.Never)>
        Public Class ClipboardProxy
           ''' <summary>
            '''  Removes everything from the clipboard.
            ''' </summary>
            Public Sub Clear()
                Clipboard.Clear()
            End Sub
     End Class
    
    /// <summary>
    ///  Provides methods to place data on and retrieve data from the system clipboard. This class cannot be inherited.
    /// </summary>
    public static class Clipboard
    
  3. locked and limited conversation to collaborators on Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions