Anonymous | Login | Signup for a new account | 12-17-2024 10:56 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0003741 | [Resin] | minor | always | 11-04-09 10:21 | 01-11-10 10:01 | ||||
Reporter | ferg | View Status | public | ||||||
Assigned To | |||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 4.0.4 | Product Version | 4.0.2 | ||||
Product Build | |||||||||
Summary | 0003741: CanDI in unit tests | ||||||||
Description |
(rep by Paul Campbell) he problem with J2EE DI is that its very difficult to use any DI in unit tests because you have to run the container or something that emulates it (and as someone already mentioned, testing in the real environment is preferable to emulation). Spring still has the drop here because you can selectively load only parts of your DI config and because it follows the library model i.e. it doesn't take away control over execution of code. Even when your only using partial configs in this way you are still testing very much against the "real thing" so behavior is very unlikely to change when you come to run your code in a web server. So in a nutshell the practical annoyances with J2EE are more to do with the whole "container" idea than the semantics of the DI spec. Its all very well being able to inject POJOS but it isn't a great help if you cant do it in your junit tests IMO. |
||||||||
Steps To Reproduce | |||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Notes | |
(0004378) ferg 01-11-10 10:01 |
server/1e9- support/0410 The com.caucho.resin.ResinContext and @RunWith(ResinJUnitRunner.class) in Resin 4.0.4 will provide this capability. |
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed. 25 unique queries executed. |