@Before public void setUp() { SeleniumUtils.setUpDriverConnection(); DatabaseUtils databaseUtils = new DatabaseUtils(); databaseUtils.cleanUpDatabase(); kid = databaseUtils.setUpKid("CODE_1"); programs.add(databaseUtils.setUpProgram("A_SYMBOL_1", "NAME_1", "DESCRIPTION_1", kid)); programWithTable = databaseUtils.setUpProgram("B_SYMBOL_2", "NAME_2", "DESCRIPTION_2", kid); List<String> rowNames = new ArrayList<String>() { { add(new String("ROW_1")); add(new String("ROW_2")); } }; databaseUtils.setUpTableWithRows("TABLE_NAME", rowNames, "DESCRIPTION", 2, 2, programWithTable); programs.add(programWithTable); kidProgramsViewPage = PageFactory.initElements(new ChromeDriver(), KidProgramsViewPage.class); kidProgramsViewPage.open(SeleniumUtils.kidProgramsViewUrl, kid); }
@After public void tearDown() { kidProgramsViewPage.close(); DatabaseUtils databaseUtils = new DatabaseUtils(); databaseUtils.cleanUpDatabase(); }