Open sandboxFocusImprove this doc

Testing and Debugging

Aspects should be tested like any piece of code. However, testing techniques for aspects differ from testing techniques for normal class libraries for several reasons:

  • Aspect instantiation is not controlled by the user.

  • Aspects partially execute at build time.

  • Aspects can emit build errors. Logic that emits build errors should be tested too.

These characteristics are no obstacle to proper testing of aspects.

This chapter contains the following sections: