1 Reply Latest reply on Jan 20, 2009 12:26 PM by Ben Catherall

    Seam Preprocessor

    Stephan B Newbie

      I'm currently in the process of unit testing my application. I try to test the most dangerous pitfalls thoroughly. Using Seam and its annotations, a few new potential error types arise.


      I'm therefore thinking about how to test for things like



      • a specific component having all necessary annotations (e.g. my service component always defines @Scope(ScopeType=Stateless))to

      • the name of an @In field matching against the name specified by the referenced Seam component (@Name) (of course this only works when not using interfaces I guess)



      I'm not sure if these examples are really relevant to everyone (some might be very individually but others could also apply in general); however, the overall idea would be to catch those things as early as possible. Now if I remember correctly, there is some sort of the mechanism active in the Seam startup, but I'm not sure what it exactly checks for.


      Can anybody think of more examples that can be 'statically' checked?
      Would it be a good idea to use the (existing) startup validation in a unit test?


      I'm waiting for your responses!
      Thanks for reading :-)


      Stephan