Fix failing test due to an invalid path

This commit is contained in:
Mauricio Colli 2018-04-06 02:45:52 -03:00
parent a6b6235644
commit 3fe9922d49
No known key found for this signature in database
GPG Key ID: F200BFD6F29DDD85

View File

@ -33,7 +33,9 @@ public class YoutubeSubscriptionExtractorTest {
@Test @Test
public void testFromInputStream() throws Exception { public void testFromInputStream() throws Exception {
File testFile = new File("src/test/resources/youtube_export_test.xml"); File testFile = new File("extractor/src/test/resources/youtube_export_test.xml");
if (!testFile.exists()) testFile = new File("src/test/resources/youtube_export_test.xml");
List<SubscriptionItem> subscriptionItems = subscriptionExtractor.fromInputStream(new FileInputStream(testFile)); List<SubscriptionItem> subscriptionItems = subscriptionExtractor.fromInputStream(new FileInputStream(testFile));
assertTrue("List doesn't have exactly 8 items (had " + subscriptionItems.size() + ")", subscriptionItems.size() == 8); assertTrue("List doesn't have exactly 8 items (had " + subscriptionItems.size() + ")", subscriptionItems.size() == 8);