rm -f "$ZIPFILE"
mvn compile
+mvn test
+if [ "$?" != 0 ]; then
+ echo "Test failed, aborting"
+ exit 1;
+fi
mvn assembly:single
cp target/tv_grab_nl_java-$VERSION-dep.jar "$DESTDIR/tv_grab_nl_java.jar"
cp tv_grab_nl_java install.sh README LICENSE Changelog "$DESTDIR"
import static org.junit.Assert.*;
+import java.util.List;
+
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@Test
public void testGetProgrammesListOfChannelInt() {
- fail("Not yet implemented");
+ List<Channel> channels = rtl.getChannels();
+
+ // there should be an "RTL 4" channel
+ boolean foundRTL4 = false;
+ for(Channel c: channels) {
+ if(c.defaultName().equals("RTL 4")) {
+ foundRTL4 = true;
+ assertFalse("RTL 4 channel should have at least one icon", c.icons.isEmpty());
+ }
+ assertEquals("All channels should have RTL.nl source id", RTL_SOURCE_ID, c.source);
+ }
+ if(!foundRTL4) {
+ fail("Channel RTL4 not found, should be there");
+ }
}
}