co5dfa
Last Updated: February 25, 2016
·
875
· george-silva
D2fb9816cd30b20916b3e98a73346de1

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);
}
}

Say Thanks
Respond