Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @RunWith(UnitilsJUnit4TestClassRunner.class)
- @SpringApplicationContext( { "spring/spring.xml",
- "spring/spring-test.xml",
- "spring/spring-datasource-test.xml" })
- public class AbstractSpreadSheetStrategyTest {
- InputStream inputStream;
- @Test
- public void testValidateNotNegative() throws IOException {
- String FILE = "xls/new-test-files/TESTING_NEGATIVE_VALUES.xlsx";
- // Given
- XSSFWorkbook workbook = null;
- if (inputStream != null) {
- inputStream.close();
- }
- inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(FILE);;
- workbook = new XSSFWorkbook(inputStream);
- AbstractSpreadSheetStrategy strategy = new AbstractSpreadSheetStrategy();
- strategy.mandatoryAttributesErrorList = new ArrayList<DataUploadCheckList>();
- //The number -1
- Row row = workbook.getSheet("Datasets-SMA").getRow(1);
- //0-30-Count
- Long _0_30_Count = strategy.validateLongNotNegative(row, 2, AbstractSpreadSheetStrategy.NUMBER_FORMAT, false);
Add Comment
Please, Sign In to add comment