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
In NUnit 2.6.1+ you can use the /apartment=STA command line flag:
NUnit-Console version 2.6.3.13283
Copyright (C) 2002-2012 Charlie Poole.
Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov.
Copyright (C) 2000-2002 Philip Craig.
All Rights Reserved.
Runtime Environment -
OS Version: Microsoft Windows NT 6.1.7601 Service Pack 1
CLR Version: 4.0.30319.18052 ( Net 4.5 )
NUNIT-CONSOLE [inputfiles] [options]
Runs a set of NUnit tests from the console.
You may specify one or more assemblies or a single
project file of type .nunit.
Options:
...
/apartment=X Apartment for running tests: MTA (Default), STA
...