@Test public void verifyMockData() { Vector<?> shows = TedIO.getInstance().GetShows(); assertEquals("Number of shows does not match", 1, shows.size()); Show show = (Show) shows.get(0); assertEquals("Show title does not match", "My Show", show.getName()); }
public TestRemoveShowContract() { Show fakeShow = new Show(); fakeShow.setName("My Show"); mockShows.add(fakeShow); String fileName = TedSystemInfo.getUserDirectory() + "shows.ted"; System.out.println("Shows.ted location: " + fileName); File showFile = new File(fileName); if (showFile.exists()) { System.out.println("Deleting shows.ted to ensure fresh start..."); showFile.delete(); } TedIO.getInstance().SaveShows(this.mockShows); junit.extensions.jfcunit.WindowMonitor.start(); this.main = new TedMainDialogController(false, true); this.main.setViewVisible(true); try { setHelper(new RobotTestHelper()); } catch (AWTException e) { fail("AWTException occurred, we can't go on! Message: " + e.getMessage()); } }