All Questions
7 questions
-1
votes
3
answers
1k
views
Should methods with business logic be made private? [duplicate]
So I am writing a project using Spring Boot. All of my logic resides in @Service classes. I have separated each service class based on entity. For example - If I have two independent entities A and B, ...
0
votes
2
answers
114
views
What to test when testing an API? [closed]
When testing an API (with, for example, Java), what parts should I actually be testing when calling methods of my Controller class (e.g. a Spring RestController)?
For example, lets say I've got a ...
0
votes
2
answers
303
views
How to I best test this method? Do I need to split it up?
Okay, please consider the following method. Let me first tell you that my goals of the method is to determine if file system assets exist. That's to say this is an internal company site where you'd ...
2
votes
1
answer
339
views
Using Spring in Java Project
I've got a question about a correct usage of Spring.
I know that some people use the DI "aggressively" so that they always use spring and completely eliminate the usage of word "new" in the ...
2
votes
2
answers
4k
views
Testing using mocking, must I mock all dependencies too?
I have the following method to test:
public List<MarkId> getMarkIdList(ICar carDoc) {
ICourseCar courseCarDoc = courseCarRep.get(carDoc);
List<MarkWag> markWagList = ...
4
votes
2
answers
398
views
How to add rigor to my testing?
I work on a small/medium sized Java application. Over time, I've tried to ensure that the tests which I write are "good" tests, and that there's plenty of them. Hence I've been looking into various, ...
5
votes
2
answers
5k
views
Write Unit test for heavily-database application? [duplicate]
I'm currently developing a Spring-based web-application, in which almost every operation create/update/delete something in the database. The logic mostly about checking condition so as to we should ...