dialogFixture.button("ButtonShowExcel").click();
JOptionPaneFinder.findOptionPane().withTimeout(40000).using(
dialogFixture.robot);
ExcelUtil excelUtil = new ExcelUtil();
excelUtil.openExcelFileForRead("excel/Salgsrapport20085050.xls");
boolean lineNotFound = true;
int row = 0;
do {
String cellValue = excelUtil.readCell(row, 0, null);
if (cellValue != null && cellValue.equalsIgnoreCase("Grunnlag")) {
lineNotFound = false;
}
row++;
} while (lineNotFound);
String cellValue = excelUtil.readCell(row, 0, null);
assertEquals("Type", cellValue);
cellValue = excelUtil.readCell(row, 1, null);
assertEquals("Fylke", cellValue);
cellValue = excelUtil.readCell(row, 2, null);
assertEquals("Selger", cellValue);
cellValue = excelUtil.readCell(row, 3, null);
assertEquals("Salgsdato", cellValue);
cellValue = excelUtil.readCell(row, 4, null);
assertEquals("Salgsuke", cellValue);
cellValue = excelUtil.readCell(row, 5, null);
assertEquals("Kundenr", cellValue);
cellValue = excelUtil.readCell(row, 6, null);
assertEquals("Navn", cellValue);
cellValue = excelUtil.readCell(row, 7, null);
assertEquals("Ordrenr", cellValue);
cellValue = excelUtil.readCell(row, 8, null);
assertEquals("Egenproduksjon", cellValue);
cellValue = excelUtil.readCell(row, 9, null);
assertEquals("Frakt", cellValue);
cellValue = excelUtil.readCell(row, 10, null);
assertEquals("Montering", cellValue);
cellValue = excelUtil.readCell(row, 11, null);
assertEquals("Jalinjer", cellValue);
cellValue = excelUtil.readCell(row, 12, null);
assertEquals("DB", cellValue);
cellValue = excelUtil.readCell(row, 13, null);
assertEquals("DG", cellValue);
}