All Questions
7 questions
3
votes
3
answers
365
views
Why are test frameworks like JUnit or TestNG not more "object-oriented"?
By "more object-oriented", I mean, it appears to me testing frameworks like TestNG and JUnit could encourage testers to write implementations of Test and TestSuite interfaces. The current approach ...
-1
votes
1
answer
402
views
Given an implementation of a Service Layer and Repository layer, should you make tests of both?
Currently I have an entity called Product with the respective ProductRepository and ProductService.
For ProductService, I have tests for:
Read (Covering Create too)
Update
Delete
Besides achieving ...
15
votes
5
answers
71k
views
Unit testing a void method
In order to fix a bug in an application, I modified a method named postLogin by adding a call to an existing method named getShoppingCart.
Code
protected void postLogin() {
getShoppingCart();
}
...
4
votes
2
answers
3k
views
Testing strategy for wrapper class
In my Android project I decided to create wrapper around SharedPreferences(which is basically key-value storage) with following interface
interface Preferences{
public void saveInt(int value, ...
20
votes
7
answers
29k
views
Should each method have a separate JUnit test class?
I am writing JUnit unit tests for my classes.
Is it better to have a separate class for each method, or have just one test class for every actual class?
0
votes
2
answers
3k
views
Where Are Multiple JUnit Test Methods Typically Placed in Code?
I've just read the Vogella JUnit tutorial and found it very helpful in understanding how to use JUnit. However, I'm a bit confused about what the convention is for placing multiple test methods in ...
7
votes
3
answers
28k
views
How to test Java web applications
So far I haven't been testing or learning how to test my java web applications.
If you do, what are the tools you need, and is it really necessary to test a web application if doesn't need scaling or ...