Wednesday, November 28, 2007
Posted on Wednesday, November 28, 2007 6:01:20 AM (Mountain Standard Time, UTC-07:00)  Comments [0] | 
Categories: .NET | ArcDeveloper | Unit Testing

Tonight added a few more projects to the ArcDeveloper Subversion repository up at Assembla (http://svn2.assembla.com/svn/arcdeveloper).

Since the goal of the ArcDeveloper.net open-source projects is to streamline unit testing for the ArcGIS developer, the logical place to start is with a methodology for passing geometries into tests.

The code that's up there handles geometry serialization / deserialization. In addition to a set of classes which handle the "work", it also includes 3 ArcMap tools:

  1. Serializing selected geometries to a file,
  2. Serializing a sketch to a file, and
  3. Drawing serialized geometries on screen so you can be sure you captured the right thing.

It also has a simple example showing how to write tests using this methodology.

I'm not going to go into a full-blown "how to" at this point, but the general flow goes like this:

  1. Use the tools in ArcMap to create serialized geometry files
  2. Add these files into your Test assembly as Embedded Resources
  3. Pull the geometries out of the test assembly when the tests are run.

This allows you to store all sorts of complex geometry scenarios without being reliant on particular spatial data sets residing at fixed locations - the data is embedded into the test assembly.

I will be posting a much more detailed "how to", as well as adding content into the ArcDeveloper.net wiki.

Backlog Items

These will be added into TRAC when I get time, but here's the quick list

  • Enable serialization of entire features
  • Add tests for the actual utility classes themselves
  • Improve the messaging
  • Make the Extension be a "JIT" extension so it's easily enabled/disabled
  • Better exception handling (currently just MessageBoxes)

Project Status

If you are interested in following along with what's happening on the project, I'll be posting finer grained information on the "project flow" page, which like all good things has an RSS feed.

Comments are closed.