Hi AspectJ Community Members,

I'm using Aspects with JUnit tests in Eclipse. AspectJ is used to mock
external dependency on actual production run time environment.
(In production code, I'm using lib that has native methods. In JUnit Tests,
I'm "mocking" the native methods in this lib using AspectJ).
However, Aspects are not executed as expected, instead original native
method is called, and throwing "UnsatisfiedLinkError".
Note: In Eclipse "Run Conguration" I specified
 -javaagent:D:\Tools\aspectj1.7\lib\aspectjweaver.jar for my Junit Test.

I googled and refered few websites on "LoadTimeWeaving configuration".
http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html
http://andrewclement.blogspot.in/2009/02/load-time-weaving-basics.html

How to debug this issue and proceed?

AJDT Version: 2.2.0.e37x-RELEASE-20120704-0900
AspectJ version: 1.7.0.20120703164200
Eclipse version Indigo-SR1 (3.7)

Note : Concept of "Virtual Mocks" using AspectJ influenced me (
http://xprogramming.com/articles/virtualmockobjects/
http://www.onjava.com/lpt/a/4526 ).
Today we use EasyMock/Powermock a lot, but we want to try AspectJ to make
it simple.
If anybody used AspectJ for this purpose, please share your thoughts and
experience.


Regards
Sojan Mathew
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to