Skip to content

Throw an Exception if TestClass attribute is specified along the STATestClass #4

Description

@huserben

Hi

I just encountered a problem by making the mistake of adding the STATestClass attribute along side of the "regular" TestClass.

So following situation:

 [STATestClass]
  [TestClass]
  public class UnitTest1
  {
     [TestMethod]
     public void TestMethod1()
     {
        var staTest = new MainWindow();
     }
  }

In the above case it's working fine. If we exchange the order and we have:

   [TestClass]
   [STATestClass]

It won't work anymore.
It would be good if the situation could be detected as in fact we only need one of the attributes. So ideally we would throw an exception with a meaningful error message so this problem is easily detected. So other people don't wonder why it's not working for them like for me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions