Skip to content
Snippets Groups Projects
Commit b55cfca9 authored by JotaJota96's avatar JotaJota96
Browse files

Agregado test de Video a 99% de cobertura

parent ba28f787
Branches
Tags
No related merge requests found
......@@ -30,12 +30,25 @@ public class Video {
}
/********************** Constructor *********************/
public Video(int _id, String _nombre, String _descripcion,Time _duracion, Date _fechaPublicacion,String _urlVideoOriginal,String _categoria ){
if( _id < 0){ throw new RuntimeException("Error, el id del video es un negativo o cero."); }
if( _nombre == ""){ throw new RuntimeException("Error, el nombre del video está vacío");}
if( _duracion == null){ throw new RuntimeException("Error, la duración del video es null.");}
if( _fechaPublicacion == null){ throw new RuntimeException("Error, la fecha de publicación del video es null.");}
if( _urlVideoOriginal == ""){ throw new RuntimeException("Error, la url del video está vacía.");}
if( _categoria == "" ){ throw new RuntimeException("Error, la descripción del video está vacía.");}
if (_id < 0) {
throw new RuntimeException("Error, el id del video es un negativo o cero.");
}
if (_nombre == "") {
throw new RuntimeException("Error, el nombre del video está vacío");
}
if (_duracion == null) {
throw new RuntimeException("Error, la duración del video es null.");
}
if (_fechaPublicacion == null) {
throw new RuntimeException("Error, la fecha de publicación del video es null.");
}
if (_urlVideoOriginal == "") {
throw new RuntimeException("Error, la url del video está vacía.");
}
if (_categoria == "") {
throw new RuntimeException("Error, la descripción del video está vacía.");
}
this.id = _id;
this.nombre = _nombre;
this.descripcion = _descripcion;
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment