filebot/test/net/filebot/media/MediaDetectionTest.java

30 lines
791 B
Java
Raw Normal View History

2016-02-10 06:47:17 -05:00
package net.filebot.media;
2016-03-13 13:35:31 -04:00
import static java.util.Collections.*;
2016-02-10 06:47:17 -05:00
import static org.junit.Assert.*;
2016-03-13 13:35:31 -04:00
import java.io.File;
import java.util.Locale;
2016-02-10 06:47:17 -05:00
import org.junit.Test;
public class MediaDetectionTest {
@Test
public void parseMovieYear() {
assertEquals("[2009]", MediaDetection.parseMovieYear("Avatar 2009 2100").toString());
assertEquals("[1955]", MediaDetection.parseMovieYear("1898 Sissi 1955").toString());
}
2016-03-13 13:35:31 -04:00
@Test
public void stripFormatInfo() throws Exception {
assertEquals("3.Idiots.PAL.DVD..", MediaDetection.stripFormatInfo("3.Idiots.PAL.DVD.DD5.1.x264"));
}
@Test
public void detectSeriesName() throws Exception {
2016-04-05 14:06:23 -04:00
assertEquals("[]", MediaDetection.detectSeriesNames(singleton(new File("Movie/LOTR.2001.AVC-1080")), false, Locale.ENGLISH).toString());
2016-03-13 13:35:31 -04:00
}
2016-02-10 06:47:17 -05:00
}