--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To post to this group, send email to nunit-...@googlegroups.com.
To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.
To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
http://nlight.codeplex.com/SourceControl/changeset/view/45808#698639
Check the MultiThreadNestedContextTest method and related code, it
might be interesting to you.
Sébastien
> To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
I'm trying to unit test a user control I've created, but I'm getting the
error listed below:
Test
'Luminous.Forms.v4._0.UnitTests.LuminousLayoutComboBoxTests.TopPanelHeight_New_ReturnsExpectedTopPanelHeight'
failed:
System.Exception : LayoutComboBox.New
----> System.Threading.ThreadStateException : Current thread must be set
to single thread apartment (STA) mode before OLE calls can be made. Ensure
that your Main function has STAThreadAttribute marked on it.
Controls\LuminousLayoutComboBox.vb(25,0): at
Luminous.Forms.LuminousLayoutComboBox..ctor()
Luminous.Forms.v4.0.UnitTests\LuminousLayoutComboBoxTests.vb(29,0): at
Luminous.Forms.v4._0.UnitTests.LuminousLayoutComboBoxTests.Setup()
--ThreadStateException
at System.Windows.Forms.ComboBox.set_AutoCompleteMode(AutoCompleteMode
value)
Controls\LuminousLayoutComboBox.Designer.vb(76,0): at
Luminous.Forms.LuminousLayoutComboBox.InitializeComponent()
Controls\LuminousLayoutComboBox.vb(18,0): at
Luminous.Forms.LuminousLayoutComboBox..ctor()
Not sure where I should actually put the STAThread attribute?
Thanks,
Yann
--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To post to this group, send email to nunit-...@googlegroups.com.
To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.
<NUnit>
<TestRunner>
<add key="ApartmentState"
value="STA" />
</TestRunner>
</NUnit>