accidentList.add(accident);
when(accidentManager.findAll()).thenReturn(accidentList);
when(accidentManager.findByObject((Accident) anyObject())).thenReturn(
accidentList);
final AccidentViewHandler accidentViewHandler = new AccidentViewHandler(
login, managerRepository);
final OverviewView<Accident, AccidentModel> view = new OverviewView<Accident, AccidentModel>(
accidentViewHandler);
JDialog dialog = GuiActionRunner.execute(new GuiQuery<JDialog>() {
protected JDialog executeInEDT() {
JDialog dialog = new JDialog();
WindowInterface window = new JDialogAdapter(dialog);
dialog.add(view.buildPanel(window));
dialog.pack();
dialog.setSize(accidentViewHandler.getWindowSize());
return dialog;
}
});
dialogFixture = new DialogFixture(dialog);
dialogFixture.show();