Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JUnit and Ant with AspectJ

 
chris coleman
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is question.. what would you do to integrate these three pieces, so that the unit test and build processes are aware of and correctly handle the aspects introduced by AspectJ.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The last section of RamNivas Book talks about Ant integration.
http://www.manning.com/getpage.html?project=laddad&filename=contents.html
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Regarding unit tests, I'd like to throw a couple of questions out in the open...
1) Should unit tests know about aspects?
2) Should aspects be allowed to change the user-visible behaviour of a class?
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will JUnit understand Aspects?
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:
Will JUnit understand Aspects?

No, but it doesn't need to. JUnit is a framework--a set of classes that aid you in developing and running your own unit tests for your Java classes. Another question would be whether someone is developing a JUnit extension called "AJUnit" etc... (or whether a unit testing framework for aspect code is needed at all)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic