SHARE
TWEET

Untitled

a guest Apr 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top