Unit testing ArcObjects
To unit test arcobjects, you will need to start the licesing, as you would, if you were creating a standalone application. Without doing that, your test will not run.
This should do the trick, using NUnit attributes (TestFixture, SetUp, etc)
[TestFixture]
public class UnitTestClass
{
[SetUp]
public void Init()
{
var aoInit = new AoInitializeClass();
aoInit.Initialize(esriLicenseProductCode.esriLicenseProductCodeArcInfo);
}
}
Written by George Silva
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#.net
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#