@Before protected void setUp() { page = new Page(pageTitle, pageDescription, uuid); goToPage = new Page(goToPageTitle, goToPageDescription, goToPageId); option = new Option(optionDescription, goToPage.getPageId()); optionsList = new ArrayList<Option>(); }
@Before protected void setUp() { goToPage = new Page(goToPageTitle, goToPageDescription, goToPageId); option = new Option(description, goToPage.getPageId()); }
/* * Test that the getOptions() method gives data matching the constructor. */ @Test public void testGetOptions() { assertEquals(optionsList, page.getOptions()); }
/* * Test that the getPageDescription() method gives data matching the constructor. */ @Test public void testGetPageDescription() { assertEquals(pageDescription, page.getPageDescription()); }
/* * Test that the getPageTitle() method gives data matching the constructor. */ @Test public void testGetPageTitle() { assertEquals(pageTitle, page.getTitle()); }
/* * Test that the addOption() method adds an option to the list of options */ @Test public void testAddOption() { optionsList.add(option); page.addOption(option); assertEquals(optionsList, page.getOptions()); }