Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. private ContentFileRetriever contentFileRetriever = new ContentFileRetrieverService();
  2.  
  3. @Rule
  4. public TemporaryFolder tempFolder = new TemporaryFolder();
  5.  
  6. @Before
  7. public void setup() {
  8. //here need to write content?
  9. }
  10.  
  11. @Test
  12. public void getContentFile() throws IOException {
  13. File textFile = tempFolder.newFile("testText.txt");
  14. String pathFile = textFile.getPath();
  15. String[] testedContent = contentFileRetriever.getContentFile(pathFile);
  16. String[] expected = {"Line1 a", "Line2 b c", "Line 3"};
  17. assertArrayEquals(expected, testedContent);
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement