我可以用ReSharper運行我的WatiN測試,沒有問題。每個測試都有RequiresSTA屬性並且運行正常。如果測試有SetUp和TearDown方法,需要[RequiresSTA]嗎?
當我嘗試運行的類(的TestFixture)我得到以下錯誤的所有測試:
One or more child tests had errors
Exception doesn't have a stacktrace
<testname> ignored: Invalid signature for SetUp or TearDown method: TestSetup
<testname> ignored: Invalid signature for SetUp or TearDown method: TestSetup
<testname> ignored: Invalid signature for SetUp or TearDown method: TestSetup
的錯誤並不表示什麼,我需要改變,使其工作。
如果我然後選擇在單元測試會話窗口中被忽略的所有測試,我可以毫無問題地運行它們。
爲了讓我能夠運行TestFixture中的所有測試,我必須做些什麼?
這似乎也是ReSharper 9中的一個問題,即同樣的解決方案似乎可以解決。 –
'protected'也可以。 –