@Before public void setUp() { MockitoAnnotations.initMocks(MongoResultPanelTest.class); mongoResultPanel = GuiActionRunner.execute(new GuiQuery<MongoResultPanel>() { protected MongoResultPanel executeInEDT() { return new MongoResultPanel(DummyProject.getInstance(), mongoDocumentOperations, notifierMock); } }); frameFixture = Containers.showInFrame(mongoResultPanel); }
@Before public void setUp() { mongoManager = Mockito.spy(new MongoManager()); configurationPanel = GuiActionRunner.execute(new GuiQuery<ServerConfigurationPanel>() { protected ServerConfigurationPanel executeInEDT() { return new ServerConfigurationPanel(DummyProject.getInstance(), mongoManager); } }); frameFixture = Containers.showInFrame(configurationPanel); }
.append("visible", false) .append("image", null)); frameFixture = Containers.showInFrame(mongoEditionPanel);
frameFixture = Containers.showInFrame(mongoEditionPanel);
@Test public void displayMongoDocumentInTheTreeTable() { mongoEditionPanel.updateEditionTree( new Document("_id", new ObjectId("50b8d63414f85401b9268b99")) .append("label", "toto") .append("visible", false) .append("image", null)); frameFixture = Containers.showInFrame(mongoEditionPanel); JTableFixture tableFixture = frameFixture.table("editionTreeTable"); tableFixture.replaceCellReader(new JsonTableCellReader()); tableFixture.requireColumnCount(2) .requireContents(new String[][]{ {"_id", "50b8d63414f85401b9268b99"}, {"label", "toto"}, {"visible", "false"}, {"image", "null"} }); }
@Test public void addKeyWithSomeValue() { mongoEditionPanel.updateEditionTree( new Document("_id", new ObjectId("50b8d63414f85401b9268b99")) .append("label", "toto") .append("visible", false) .append("image", null)); frameFixture = Containers.showInFrame(mongoEditionPanel); JTableFixture editionTreeTable = frameFixture.table("editionTreeTable"); editionTreeTable.replaceCellReader(new JsonTableCellReader()); editionTreeTable.selectCell(TableCell.row(1).column(1)); mongoEditionPanel.addKey("stringKey", "pouet"); editionTreeTable.selectCell(TableCell.row(1).column(1)); mongoEditionPanel.addKey("numberKey", "1.1"); editionTreeTable.requireContents(new String[][]{ {"_id", "50b8d63414f85401b9268b99"}, {"label", "toto"}, {"visible", "false"}, {"image", "null"}, {"stringKey", "pouet"}, {"numberKey", "1.1"}, }); }
@Before public void setUp() throws Exception { final IdeaTestFixtureFactory ideaFixtureFactory = IdeaTestFixtureFactory.getFixtureFactory(); testFixture = ideaFixtureFactory.createBareFixture(); testFixture.setUp(); application = ApplicationManager.getApplication(); underTest = GuiActionRunner.execute(SettingsPanel::new); window = Containers.showInFrame(underTest.getComponent()); }
Containers.showInFrame(robot(), aba);
Containers.showInFrame(robot(), aba);