Answer the question
In order to leave comments, you need to log in
How to test protected void java function with JUnit?
Dear friends, we need help. There is a simple GUI toy, it remains only to test some functions. One such processWindowEvent. Actually code:
protected void processWindowEvent(WindowEvent e) {
super.processWindowEvent(e);
if(e.getID() == WindowEvent.WINDOW_CLOSING){
System.exit(0);
}
}
@Test
public void testProcessWindowEvent() {
System.out.println("processWindowEvent");
WindowEvent e = null;
Frame instance = new Frame();
instance.processWindowEvent(e);
// TODO review the generated test code and remove the default call to fail.
}
Answer the question
In order to leave comments, you need to log in
Not sure what exactly you are asking?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question