I would like to test an app that uses the Clipboard (WindowsForms) and I need the Clipboard in my unit tests also. In order to use it, it should run in STA mode, but since the NUnit TestFixture
does not have a main method, I don't know where/how to annotate it.
Unit tests run one at a time. There is no parallelism.
Run tests in Test Explorer If Test Explorer is not visible, choose Test on the Visual Studio menu, choose Windows, and then choose Test Explorer (or press Ctrl + E, T). As you run, write, and rerun your tests, the Test Explorer displays the results in a default grouping of Project, Namespace, and Class.
If you are using nunit 2.5+, you can use the new The RequiresSTAAttribute
at class
[TestFixture, RequiresSTA]
or assembly level.
[assembly:RequiresSTA]
No need for config file. check: http://www.nunit.org/index.php?p=requiresSTA&r=2.5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With