Added File Reader
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
package com.plannaplan.configutils;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import com.plannaplan.models.FileData;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class FileReaderTest {
|
||||
@Test
|
||||
public void shoulReturnNull() {
|
||||
InputStream inputStream = getClass().getClassLoader().getResourceAsStream("Zajecia.xlsx");
|
||||
FileReader r = new FileReader(inputStream);
|
||||
FileData d = r.read();
|
||||
assertTrue(d.getRows().next().getCell(0).toString().equals("1.0"));
|
||||
assertTrue(d.getKeys().size() == 22);
|
||||
assertTrue(d != null);
|
||||
}
|
||||
}
|
BIN
buisnesslogic/src/test/resources/Zajecia.xlsx
Normal file
BIN
buisnesslogic/src/test/resources/Zajecia.xlsx
Normal file
Binary file not shown.
Reference in New Issue
Block a user