Issue
I have a class:
public final class Core {
private final Deque<Double> stack = new ArrayDeque<>();
private final HashMap<String, Double> values = new HashMap<>();
public Deque<Double> getStack() {
return stack;
}
public HashMap<String, Double> getValues() {
return values;
}
}
I need a Junit test for this getters, but I don't know how to write it correctly
Solution
You get each property and add something to their collection
Then get each property again and verify that what you added is still there
Answered By - Novaterata
Answer Checked By - Clifford M. (JavaFixing Volunteer)