ProductionUnit productionUnit = new ProductionUnit();
productionUnit.setProductionUnitName("productionUnitName");
productionUnitList.add(productionUnit);
when(productionUnitManager.findAll()).thenReturn(productionUnitList);
final ProductionUnitViewHandler productionUnitViewHandler = new ProductionUnitViewHandler(
login, productionUnitManager);
final OverviewView<ProductionUnit, ProductionUnitModel> view = new OverviewView<ProductionUnit, ProductionUnitModel>(
productionUnitViewHandler);
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(productionUnitViewHandler.getWindowSize());
return dialog;
}
});
dialogFixture = new DialogFixture(dialog);
dialogFixture.show();