|
|
|
|
|
by Supermancho
1653 days ago
|
|
> Spring does (and perhaps even prefers where possible) constructor-based inheritance though OFC Spring does lots of things (too many things), but that varies project to project based on what series of Spring-related libraries are being used. More likely I'll see non Spring-core annotations like @RestController + @RequestMapping-attributes and have to figure a standard way to mock up some of what Spring does just to assert the outputs. Perhaps there will be a series of full functional tests which requires a setup/teardown. Maybe the project just ignores endpoint tests and focus on the less Spring annotated business logic claiming "it's simple enough". Spring has resulted in slow, complex, and incomplete (coverage) testing almost anywhere it's used because it's literally hiding functionality behind a runtime composition that you can't access casually by calling a routine. It's problematic because it's complex and the versions |
|
Other classes/components should in the general case be written as POJOs. The dependent components can be mocked/injected simply by using the constructor.