package com.alexrnl.subtitlecorrector.io.subrip;

import static org.junit.Assert.fail;

import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Paths;

import org.junit.Before;
import org.junit.Test;

import com.alexrnl.subtitlecorrector.common.SubtitleFile;

/**
 * Test suite for the {@link SubRipReader} class.
 * @author Alex
 */
public class SubRipReaderTest {
	/** The reader to use for the tests */
	private SubRipReader reader;
	
	/**
	 * Set up test attributes.
	 */
	@Before
	public void setUp () {
		reader = new SubRipReader();
	}
	
	/**
	 * Test method for {@link com.alexrnl.subtitlecorrector.io.subrip.SubRipReader#readSubtitle(com.alexrnl.subtitlecorrector.common.SubtitleFile, java.io.BufferedReader)}.
	 */
	@Test
	public void testReadSubtitle () {
		fail("Not yet implemented"); // TODO
	}
	
	/**
	 * Test method for
	 * {@link com.alexrnl.subtitlecorrector.io.SubtitleReader#readFile(java.nio.file.Path)}.
	 * @throws URISyntaxException
	 *         if the syntax of the files to test is not valid.
	 * @throws IOException
	 *         if the reading failed.
	 */
	@Test
	public void testReadFile () throws IOException, URISyntaxException {
		final SubtitleFile subtitles = reader.readFile(Paths.get(getClass().getResource("/Suits - 03x01 - The Arrangement.EVOLVE.English.C.updated.Addic7ed.com.srt").toURI()));
		
		System.out.println(subtitles);
	}
}

@@ -47,46 +47,8 @@
 p;%0A%0A
-import static org.junit.Assert.fail;%0A%0A
 impo
@@ -63,32 +63,32 @@
 io.IOException;%0A
+
 import java.net.
@@ -557,278 +557,8 @@
  for
- %7B@link com.alexrnl.subtitlecorrector.io.subrip.SubRipReader#readSubtitle(com.alexrnl.subtitlecorrector.common.SubtitleFile, java.io.BufferedReader)%7D.%0A%09 */%0A%09@Test%0A%09public void testReadSubtitle () %7B%0A%09%09fail(%22Not yet implemented%22); // TODO%0A%09%7D%0A%09%0A%09/**%0A%09 * Test method for%0A%09 *
  %7B@l
@@ -1047,16 +1047,16 @@
 )));%0A%09%09%0A
-
 %09%09System
@@ -1083,10 +1083,379 @@
 es);%0A%09%7D%0A
+%09%0A%09/**%0A%09 * Test method for %7B@link com.alexrnl.subtitlecorrector.io.SubtitleReader#readFile(java.nio.file.Path)%7D.%0A%09 * @throws IOException%0A%09 *         if there was an issue while reading the subtitle.%0A%09 */%0A%09@Test(expected = IllegalArgumentException.class)%0A%09public void testReadFileNotExists () throws IOException %7B%0A%09%09reader.readFile(Paths.get(%22I%22, %22don't%22, %22exist%22));%0A%09%7D%0A
 %7D%0A

Add test for non existing file