Return to search

Using Class Interfaces and Mock Objects to Unit Test Aspects

In object oriented programming (OOP) class objects are individual units of code that encapsulate the desired functionality of each object. AOP is an attempt to handle the cross-cutting concerns that represent functionality needed by a class, but is not specific to that class. The cross-cutting functionality is implemented in AOP by using a class-like structure, the aspect. Aspects do not have their own context and as such are dependent upon other objects for their context. By not having their own context it is difficult to test the functionality of aspects. This study investigated the effectiveness of using class interfaces and mock objects to unit test aspects. This was accomplished by having the mock object inherit from the same interface as the base code, so that the mock object could be swapped in for the aspect.

Identiferoai:union.ndltd.org:nova.edu/oai:nsuworks.nova.edu:gscis_etd-1013
Date07 October 2014
CreatorsSnider, Michael Bryan
PublisherNSUWorks
Source SetsNova Southeastern University
Detected LanguageEnglish
Typetext
Formatapplication/pdf
SourceCEC Theses and Dissertations

Page generated in 0.0019 seconds