I am using nunit-console.exe in NUnit 2.2.7. My code is:
[TestFixture]
public class TestTagEditor
{
...
[Test]
public void TestDefaultReturn()
{
// new tag
using (TagEditor dlg = new TagEditor(CreateFramework(), new
TagPosition(null, new BaseTag[0], null)))
{
Assert.IsNotNull(dlg);
Assert.AreEqual("<wr:out/>", dlg.TagPosReturn.Tag.toText());
}
// existing tag
using (TagEditor dlg = new TagEditor(CreateFramework(), new
TagPosition(BaseTag.factory("<wr:forEach var=\"dave\" select=\"/root\">", 0,
false), new BaseTag[0], null)))
{
Assert.IsNotNull(dlg);
Assert.AreEqual("<wr:forEach select=\"/root\" var=\"dave\">",
dlg.TagPosReturn.Tag.toText());
}
}
}

Signature
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
> Hi Dave,
>
[quoted text clipped - 81 lines]
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
Linda Liu[MSFT] - 03 Jan 2008 10:23 GMT
Hi Dave,
Thank you for your reply!
I do more research on the NUnit and find that you should use the
configuration file to ensure that NUnit uses STA appartment state to run
your tests.
For more information on how to do this, please refer to the following
article:
http://watin.sourceforge.net/apartmentstateinfo.html#nunit
Hope this helps.
Sincerely,
Linda Liu
Microsoft Online Community Support
David Thielen - 03 Jan 2008 23:05 GMT
How on earth do you guys know all these answers??????????????
Works great - thank you

Signature
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
> Hi Dave,
>
[quoted text clipped - 14 lines]
> Linda Liu
> Microsoft Online Community Support