From 8e55b3062056af05c4fa2a46c26fe68182f293dd Mon Sep 17 00:00:00 2001 From: JotaJota96 <jjap96@gmail.com> Date: Tue, 27 Aug 2019 16:00:47 -0300 Subject: [PATCH] Se borraron testeos de otras clases que no venian al caso en esta rama --- .../test/Logica/Clases/AdministradorTest.java | 67 -- .../test/Logica/Clases/CategoriaTest.java | 71 -- .../test/Logica/Clases/ComentarioTest.java | 244 ---- .../Clases/ListaDeReproduccionTest.java | 420 ------- .../test/Logica/Clases/PersonaTest.java | 114 -- .../test/Logica/Clases/UsuarioTest.java | 1036 ----------------- .../test/Logica/Clases/ValoracionTest.java | 221 ---- .../test/Logica/DataType/DtCanalTest.java | 109 -- .../test/Logica/DataType/DtCategoriaTest.java | 69 -- .../Logica/DataType/DtComentarioTest.java | 125 -- .../DataType/DtListaDeReproduccionTest.java | 127 -- .../test/Logica/DataType/DtPersonaTest.java | 107 -- .../test/Logica/DataType/DtUsuarioTest.java | 174 --- .../Logica/DataType/DtValoracionTest.java | 83 -- .../test/Logica/DataType/DtVideoTest.java | 139 --- .../Logica/Enumerados/PrivacidadTest.java | 67 -- .../TipoListaDeReproduccionTest.java | 67 -- .../Logica/Enumerados/TipoValoracionTest.java | 67 -- 18 files changed, 3307 deletions(-) delete mode 100644 UyTube_aplicacion/test/Logica/Clases/AdministradorTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Clases/CategoriaTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Clases/ComentarioTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Clases/ListaDeReproduccionTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Clases/PersonaTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Clases/UsuarioTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Clases/ValoracionTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtCanalTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtCategoriaTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtComentarioTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtListaDeReproduccionTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtPersonaTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtUsuarioTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtValoracionTest.java delete mode 100644 UyTube_aplicacion/test/Logica/DataType/DtVideoTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Enumerados/PrivacidadTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Enumerados/TipoListaDeReproduccionTest.java delete mode 100644 UyTube_aplicacion/test/Logica/Enumerados/TipoValoracionTest.java diff --git a/UyTube_aplicacion/test/Logica/Clases/AdministradorTest.java b/UyTube_aplicacion/test/Logica/Clases/AdministradorTest.java deleted file mode 100644 index c497d6d..0000000 --- a/UyTube_aplicacion/test/Logica/Clases/AdministradorTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Clases; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class AdministradorTest { - - public AdministradorTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getNuevoID method, of class Administrador. - */ - @Test - public void testGetNuevoID() { - System.out.println("getNuevoID"); - int expResult = 1; - int result = Administrador.getNuevoID(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getIdAdmin method, of class Administrador. - */ - @Test - public void testGetIdAdmin() { - System.out.println("getIdAdmin"); - Administrador instance = new Administrador(0, "contrasenia", "nombre", "apellido"); - int expResult = 0; - int result = instance.getIdAdmin(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Clases/CategoriaTest.java b/UyTube_aplicacion/test/Logica/Clases/CategoriaTest.java deleted file mode 100644 index b415e37..0000000 --- a/UyTube_aplicacion/test/Logica/Clases/CategoriaTest.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Clases; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class CategoriaTest { - - public CategoriaTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of constructor method, of class Categoria. - */ - @Test - public void testCategoria_vacia() { - System.out.println("testCategoria_vacia"); - Categoria result = null; - try { - result = new Categoria(""); - } catch (Exception e) { - assertNull(result); - } - - - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - /** - * Test of getNombre method, of class Categoria. - */ - @Test - public void testGetNombre() { - System.out.println("getNombre"); - Categoria instance = new Categoria("Cat test"); - String expResult = "Cat test"; - String result = instance.getNombre(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Clases/ComentarioTest.java b/UyTube_aplicacion/test/Logica/Clases/ComentarioTest.java deleted file mode 100644 index ef96568..0000000 --- a/UyTube_aplicacion/test/Logica/Clases/ComentarioTest.java +++ /dev/null @@ -1,244 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Clases; - -import Logica.DataType.DtCanal; -import Logica.DataType.DtComentario; -import Logica.Enumerados.Privacidad; -import java.sql.Date; -import java.util.ArrayList; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Carlos BM - */ -public class ComentarioTest { - - Usuario user; - Comentario com; - Date fecha; - public ComentarioTest() { - fecha = new Date(190,7,4); - user = new Usuario("MCbolso", "mcbolso@gmail.com",fecha, "imagen.jpg", "dsfsdf", "mariano", "Castro", new DtCanal(0, "mi_canal", "un_canal_mas", Privacidad.PRIVADO)); - com = new Comentario(0, fecha, "una cagada", 0, user); - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getNuevoID method, of class Comentario. - */ - @Test - public void testGetNuevoID() { - System.out.println("getNuevoID"); - Comentario instance = com; - int expResult = 1; - int result = instance.getNuevoID(); - assertEquals(expResult, result); - } - - /** - * Test of getId method, of class Comentario. - */ - @Test - public void testGetId() { - System.out.println("getId"); - Comentario instance = com; - int expResult = 0; - int result = instance.getId(); - assertEquals(expResult, result); - } - - /** - * Test of getFecha method, of class Comentario. - */ - @Test - public void testGetFecha() { - System.out.println("getFecha"); - Comentario instance = com; - Date expResult = fecha; - Date result = instance.getFecha(); - assertEquals(expResult, result); - } - - /** - * Test of getTexto method, of class Comentario. - */ - @Test - public void testGetTexto() { - System.out.println("getTexto"); - Comentario instance = com; - String expResult = "una cagada"; - String result = instance.getTexto(); - assertEquals(expResult, result); - } - - /** - * Test of getNivelSubComentario method, of class Comentario. - */ - @Test - public void testGetNivelSubComentario() { - System.out.println("getNivelSubComentario"); - Comentario instance = com; - int expResult = 0; - int result = instance.getNivelSubComentario(); - assertEquals(expResult, result); - } - - /** - * Test of getUsr method, of class Comentario. - */ - @Test - public void testGetUsr() { - System.out.println("getUsr"); - Comentario instance = com; - Usuario expResult = user; - Usuario result = instance.getUsr(); - assertEquals(expResult, result); - } - - /** - * Test of toString method, of class Comentario. - */ - @Test - public void testToString() { - System.out.println("toString"); - Comentario instance = com; - String expResult = "Comentario{id=0, fecha=2090-08-04, texto=una cagada, nivelSubComentario=0}"; - String result = instance.toString(); - assertEquals(expResult, result); - } - - @Test - public void testComentario_basuraFecha() { - System.out.println("comentario"); - try { - Comentario comy = new Comentario(0, null, "una cagada", 0, user); - } catch (Exception e) { - assertEquals(true, true); - } - } - - @Test - public void testComentario_basura_usuario() { - System.out.println("comentario"); - try { - Comentario comy = new Comentario(5, fecha, "una cagada", 0, null); - } catch (Exception e) { - assertEquals(true, true); - } - } - - /** - * Test of agregarSubComentario method, of class Comentario. - */ - @Test - public void testAgregarSubComentario() { - System.out.println("agregarSubComentario"); - int idComPadre = 0; - DtComentario dtC = new DtComentario(1, "otroNickname", fecha, "otra cagada", 1); - Usuario usr = user; - Comentario instance = com; - boolean expResult = true; - boolean result = instance.agregarSubComentario(idComPadre, dtC, usr); - assertEquals(expResult, result); - } - - @Test - public void testAgregarSubComentarioNoagrega() { - System.out.println("agregarSubComentario"); - com.agregarSubComentario(1, new DtComentario(1, "otroNickname", fecha, "otra cagada", 1), user); - int idComPadre = 1; - DtComentario dtC = new DtComentario(2, "otroNickname", fecha, "otra cagada", 1); - Usuario usr = user; - Comentario instance = com; - boolean expResult = false; - boolean result = instance.agregarSubComentario(idComPadre, dtC, usr); - assertEquals(expResult, result); - } - - @Test - public void testAgregarSubComentarioNoagrega_basura_1() { - System.out.println("agregarSubComentario"); - int idComPadre = 1; - Usuario usr = user; - Comentario instance = com; - boolean expResult = false; - boolean result =false; - try{ - result = instance.agregarSubComentario(idComPadre, null, usr); - }catch(Exception e){ - assertEquals(true, true); - } - } - - @Test - public void testAgregarSubComentarioNoagrega_basura_2() { - System.out.println("agregarSubComentario"); - int idComPadre = 1; - DtComentario dtC = new DtComentario(2, "otroNickname", fecha, "otra cagada", 1); - Comentario instance = com; - boolean expResult = false; - boolean result = false; - try{ - result = instance.agregarSubComentario(idComPadre, dtC, null); - }catch(Exception e){ - assertEquals(true, true); - } - } - - /** - * Test of getDT method, of class Comentario. - */ - @Test - public void testGetDT() { - System.out.println("getDT"); - Comentario instance = com; - DtComentario expResult = new DtComentario(0, "MCbolso", fecha, "una cagada", 0); - DtComentario result = instance.getDT(); - assertEquals(expResult.toString(), result.toString()); - } - - /** - * Test of listarSubComentarios method, of class Comentario. - */ - @Test - public void testListarSubComentarios() { - System.out.println("listarSubComentarios"); - Comentario instance = com; - com.agregarSubComentario(0, new DtComentario(1, "otroNickname", fecha, "otra cagada", 1), user); - com.agregarSubComentario(0, new DtComentario(1, "otroNickname2", fecha, "otra cagada", 1), user); - com.agregarSubComentario(0, new DtComentario(1, "otroNickname3", fecha, "otra cagada", 1), user); - com.agregarSubComentario(2, new DtComentario(1, "otroNickname4", fecha, "otra cagada", 1), user); - com.agregarSubComentario(4, new DtComentario(1, "otroNickname5", fecha, "otra cagada", 1), user); - com.agregarSubComentario(3, new DtComentario(1, "otroNickname6", fecha, "otra cagada", 1), user); - - ArrayList<DtComentario> expResult = new ArrayList(); - ArrayList<DtComentario> result = instance.listarSubComentarios(); - assertEquals(6, result.size()); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Clases/ListaDeReproduccionTest.java b/UyTube_aplicacion/test/Logica/Clases/ListaDeReproduccionTest.java deleted file mode 100644 index 2869506..0000000 --- a/UyTube_aplicacion/test/Logica/Clases/ListaDeReproduccionTest.java +++ /dev/null @@ -1,420 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Clases; - -import Logica.DataType.DtListaDeReproduccion; -import Logica.DataType.DtVideo; -import Logica.Enumerados.Privacidad; -import Logica.Enumerados.TipoListaDeReproduccion; -import java.sql.Date; -import java.sql.Time; -import java.util.ArrayList; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class ListaDeReproduccionTest { - private ListaDeReproduccion ldrParticular = null; - private ListaDeReproduccion ldrPorDefecto = null; - Video v = null; - - public ListaDeReproduccionTest() { - ldrParticular = new ListaDeReproduccion(0, "mi lista", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - ldrPorDefecto = new ListaDeReproduccion(0, "mi lista", Privacidad.PRIVADO, TipoListaDeReproduccion.POR_DEFECTO, "UNDEFINED"); - - v = new Video(0, "_nombre", "_descripcion", new Time(0, 10, 15), new Date(2019-1900, 5, 15), "_urlVideoOriginal", "UNDEFINED"); - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getNuevoId method, of class ListaDeReproduccion. - */ - @Test - public void testGetNuevoId() { - System.out.println("getNuevoId"); - int expResult = 1; - int result = ListaDeReproduccion.getNuevoId(); - assertEquals(expResult, result); - - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testGetNuevoId2() { - System.out.println("getNuevoId2"); - int expResult = 2; - int result = ListaDeReproduccion.getNuevoId(); - assertEquals(expResult, result); - - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of listarNombresDeListasPorDefecto method, of class ListaDeReproduccion. - */ - @Test - public void testListarNombresDeListasPorDefecto() { - System.out.println("listarNombresDeListasPorDefecto"); - ArrayList<String> expResult = new ArrayList(); - expResult.add("Ver mas tarde"); - ArrayList<String> result = ListaDeReproduccion.listarNombresDeListasPorDefecto(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - /** - * Test of agregarListaPorDefecto method, of class ListaDeReproduccion. - */ - @Test - public void testAgregarListaPorDefecto() { - System.out.println("agregarListaPorDefecto"); - ArrayList<String> expResult = new ArrayList(); - expResult.add("Ver mas tarde"); - expResult.add("Favoritos"); - ListaDeReproduccion.agregarListaPorDefecto("Favoritos"); - ArrayList<String> result = ListaDeReproduccion.listarNombresDeListasPorDefecto(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testAgregarListaPorDefecto2() { - System.out.println("agregarListaPorDefecto2"); - ArrayList<String> expResult = new ArrayList(); - ArrayList<String> result = null; - expResult.add("Ver mas tarde"); - - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - try { - ListaDeReproduccion.agregarListaPorDefecto(""); - assertEquals(expResult, result); - } catch (Exception e) { - result = ListaDeReproduccion.listarNombresDeListasPorDefecto(); - assertEquals(expResult, result); - } - } - - /** - * Test of getId method, of class ListaDeReproduccion. - */ - @Test - public void testGetId() { - System.out.println("testGetId"); - ListaDeReproduccion instance = ldrParticular; - int expResult = 0; - int result = instance.getId(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - /** - * Test of getNombre method, of class ListaDeReproduccion. - */ - @Test - public void testGetNombre() { - System.out.println("getNombre"); - ListaDeReproduccion instance = ldrParticular; - String expResult = "mi lista"; - String result = instance.getNombre(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getPrivacidad method, of class ListaDeReproduccion. - */ - @Test - public void testGetPrivacidad() { - System.out.println("getPrivacidad"); - ListaDeReproduccion instance = ldrParticular; - Privacidad expResult = Privacidad.PRIVADO; - Privacidad result = instance.getPrivacidad(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of setPrivacidad method, of class ListaDeReproduccion. - */ - @Test - public void testSetPrivacidad() { - System.out.println("setPrivacidad"); - ListaDeReproduccion instance = ldrParticular; - instance.setPrivacidad(Privacidad.PUBLICO); - assertEquals(Privacidad.PUBLICO, ldrParticular.getPrivacidad()); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - instance.setPrivacidad(Privacidad.PRIVADO); - } - - /** - * Test of getTipo method, of class ListaDeReproduccion. - */ - @Test - public void testGetTipo() { - System.out.println("getTipo"); - ListaDeReproduccion instance = ldrParticular; - TipoListaDeReproduccion expResult = TipoListaDeReproduccion.PARTICULAR; - TipoListaDeReproduccion result = instance.getTipo(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of toString method, of class ListaDeReproduccion. - */ - @Test - public void testToString() { - System.out.println("toString"); - ListaDeReproduccion instance = ldrParticular; - String expResult = "ListaDeReproduccion{id=0, nombre=mi lista, privacidad=PRIVADO, tipo=PARTICULAR, categoria=UNDEFINED, misVideos.size=0}"; - String result = instance.toString(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - - /** - * Test of getCategoria method, of class ListaDeReproduccion. - */ - @Test - public void testGetCategoria() { - System.out.println("getCategoria"); - ListaDeReproduccion instance = ldrParticular; - String expResult = "UNDEFINED"; - String result = instance.getCategoria(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getDt method, of class ListaDeReproduccion. - */ - @Test - public void testGetDt() { - System.out.println("getDt"); - ListaDeReproduccion instance = null; - DtListaDeReproduccion expResult = new DtListaDeReproduccion(0, "mi lista", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - DtListaDeReproduccion result = ldrParticular.getDt(); - assertEquals(expResult.toString(), result.toString()); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - - /////////////////////////////////////////////////////////////////////////////////////////////////// - - - /** - * Test of agregarVideoA method, of class ListaDeReproduccion. - */ - @Test - public void testAgregarVideoA_null() { - System.out.println("agregarVideoA"); - ListaDeReproduccion instance = ldrParticular; - int expResult = instance.listarVideos().size(); - - try { - instance.agregarVideoA(null); - } catch (Exception e) { - assertEquals(expResult, instance.listarVideos().size()); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - - /** - * Test of agregarVideoA method, of class ListaDeReproduccion. - */ - @Test - public void testAgregarVideoA() { - System.out.println("agregarVideoA"); - int expResult = ldrParticular.listarVideos().size() +1; - ListaDeReproduccion instance = ldrParticular; - instance.agregarVideoA(v); - assertEquals(expResult, ldrParticular.listarVideos().size()); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - /** - * Test of constructor method, of class ListaDeReproduccion. - */ - @Test - public void testListaDeReproduccion_1() { - System.out.println("agregarVideoA"); - - try { - ListaDeReproduccion instance = new ListaDeReproduccion(0, "", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - } catch (Exception e) { - assertEquals(true, true); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testListaDeReproduccion_2() { - System.out.println("agregarVideoA"); - - try { - ListaDeReproduccion instance = new ListaDeReproduccion(0, "mi lista", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, ""); - } catch (Exception e) { - assertEquals(true, true); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testListaDeReproduccion_3() { - System.out.println("agregarVideoA"); - - try { - ListaDeReproduccion instance = new ListaDeReproduccion(0, "mi lista", Privacidad.PUBLICO, TipoListaDeReproduccion.POR_DEFECTO, "UNDEFINED"); - } catch (Exception e) { - assertEquals(true, true); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testListaDeReproduccion_4() { - System.out.println("agregarVideoA"); - - try { - ListaDeReproduccion instance = new ListaDeReproduccion(0, "mi lista", Privacidad.PRIVADO, TipoListaDeReproduccion.POR_DEFECTO, "MUSICA"); - } catch (Exception e) { - assertEquals(true, true); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - - /** - * Test of listarVideos method, of class ListaDeReproduccion. - */ - - @Test - public void testListarVideos() { - System.out.println("listarVideos"); - ListaDeReproduccion instance = new ListaDeReproduccion(0, "mi lista", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED");; - instance.agregarVideoA(v); - - ArrayList<DtVideo> expResult = new ArrayList(); - expResult.add(v.getDt()); - - ArrayList<DtVideo> result = instance.listarVideos(); - assertEquals(expResult.size(), result.size()); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - - } - - /** - * Test of modificar method, of class ListaDeReproduccion. - */ - @Test - public void testModificar() { - System.out.println("modificar"); - DtListaDeReproduccion ldr = new DtListaDeReproduccion(0, "mi musica", Privacidad.PUBLICO, TipoListaDeReproduccion.PARTICULAR, "MUSICA"); - ListaDeReproduccion instance = ldrParticular; - instance.modificar(ldr); - assertEquals(ldr.toString(), instance.getDt().toString()); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testModificar_exp_1() { - System.out.println("testModificar_exp_1"); - ListaDeReproduccion instance = ldrPorDefecto; - DtListaDeReproduccion esperado = instance.getDt(); - try { - DtListaDeReproduccion ldr = new DtListaDeReproduccion(0, "mi musica", Privacidad.PUBLICO, TipoListaDeReproduccion.PARTICULAR, "MUSICA"); - instance.modificar(ldr); - } catch (Exception e) { - assertEquals(esperado.toString(), instance.getDt().toString()); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testModificar_exp_2() { - System.out.println("testModificar_exp_1"); - ListaDeReproduccion instance = ldrParticular; - DtListaDeReproduccion esperado = instance.getDt(); - try { - instance.modificar(null); - } catch (Exception e) { - assertEquals(esperado.toString(), instance.getDt().toString()); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - @Test - public void testModificar_exp_3() { - System.out.println("testModificar_exp_1"); - ListaDeReproduccion instance = ldrParticular; - DtListaDeReproduccion esperado = instance.getDt(); - try { - DtListaDeReproduccion ldr = new DtListaDeReproduccion(0, "", Privacidad.PUBLICO, TipoListaDeReproduccion.PARTICULAR, "MUSICA"); - instance.modificar(ldr); - } catch (Exception e) { - assertEquals(esperado.toString(), instance.getDt().toString()); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - - /** - * Test of quitarVideo method, of class ListaDeReproduccion. - */ - - @Test - public void testQuitarVideo() { - System.out.println("quitarVideo"); - ListaDeReproduccion instance = new ListaDeReproduccion(0, "mi lista", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED");; - instance.agregarVideoA(v); - - ArrayList<DtVideo> expResult = new ArrayList(); - - instance.quitarVideo(v.getId()); - assertEquals(expResult.size(), instance.listarVideos().size()); - - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Clases/PersonaTest.java b/UyTube_aplicacion/test/Logica/Clases/PersonaTest.java deleted file mode 100644 index 4a086f7..0000000 --- a/UyTube_aplicacion/test/Logica/Clases/PersonaTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Clases; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class PersonaTest { - - public PersonaTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of constructor method, of class Persona. - */ - @Test - public void testPersona() { - System.out.println("getNombre"); - Administrador instance = null; - try { - instance = new Administrador(0, "", "nombre", "apellido"); - } catch (Exception e) { - assertNull(instance); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getNombre method, of class Persona. - */ - @Test - public void testGetNombre() { - System.out.println("getNombre"); - Administrador instance = new Administrador(0, "contrasenia", "nombre", "apellido"); - String expResult = "nombre"; - String result = instance.getNombre(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getApellido method, of class Persona. - */ - @Test - public void testGetApellido() { - System.out.println("getApellido"); - Administrador instance = new Administrador(0, "contrasenia", "nombre", "apellido"); - String expResult = "apellido"; - String result = instance.getApellido(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of validarContrasenia method, of class Persona. - */ - @Test - public void testValidarContrasenia_correcta() { - System.out.println("testValidarContrasenia_correcta"); - String pass = "contrasenia"; - Administrador instance = new Administrador(0, "contrasenia", "nombre", "apellido"); - boolean expResult = true; - boolean result = instance.validarContrasenia(pass); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of validarContrasenia method, of class Persona. - */ - @Test - public void testValidarContrasenia_incorrecta() { - System.out.println("testValidarContrasenia_correcta"); - String pass = "contrasenia mala"; - Administrador instance = new Administrador(0, "contrasenia", "nombre", "apellido"); - boolean expResult = false; - boolean result = instance.validarContrasenia(pass); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Clases/UsuarioTest.java b/UyTube_aplicacion/test/Logica/Clases/UsuarioTest.java deleted file mode 100644 index df743a0..0000000 --- a/UyTube_aplicacion/test/Logica/Clases/UsuarioTest.java +++ /dev/null @@ -1,1036 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Clases; - -import Logica.DataType.DtCanal; -import Logica.DataType.DtComentario; -import Logica.DataType.DtListaDeReproduccion; -import Logica.DataType.DtUsuario; -import Logica.DataType.DtValoracion; -import Logica.DataType.DtVideo; -import Logica.Enumerados.Privacidad; -import Logica.Enumerados.TipoListaDeReproduccion; -import Logica.Enumerados.TipoValoracion; -import java.sql.Date; -import java.sql.Time; -import java.util.ArrayList; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author pc01 - */ -public class UsuarioTest { - Usuario instance = null; - Video v = null; - ListaDeReproduccion ldr= null; - - public UsuarioTest() { - instance = new Usuario("nickname", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - v = new Video(0, "nombre", "descripcion", new Time(1, 2, 3), new Date(2019 - 1900, 1, 2), "urlVideo", "UNDEFINED"); - ldr = new ListaDeReproduccion(0, "nombre", Privacidad.PUBLICO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - instance.agregarVideoACanal(v.getDt()); - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of constructor method, of class Usuario. - */ - @Test - public void testUsuario_exp1() { - System.out.println("testUsuario_exp1"); - Usuario instancia = null; - try { - instancia = new Usuario("", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - } catch (Exception e) { - assertNull(instancia); - } - } - @Test - public void testUsuario_exp2() { - System.out.println("testUsuario_exp2"); - Usuario instancia = null; - try { - instancia = new Usuario("nickname", "", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - } catch (Exception e) { - assertNull(instancia); - } - } - @Test - public void testUsuario_exp3() { - System.out.println("testUsuario_exp3"); - Usuario instancia = null; - try { - instancia = new Usuario("nickname", "correo", null, - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - } catch (Exception e) { - assertNull(instancia); - } - } - @Test - public void testUsuario_exp4() { - System.out.println("testUsuario_exp4"); - Usuario instancia = null; - try { - instancia = new Usuario("nickname", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - null); - } catch (Exception e) { - assertNull(instancia); - } - } - //---------------------------------------------------------------------------------------------- - /** - * Test of getNickname method, of class Usuario. - */ - @Test - public void testGetNickname() { - System.out.println("getNickname"); - String expResult = "nickname"; - String result = instance.getNickname(); - assertEquals(expResult, result); - } - - /** - * Test of getCorreo method, of class Usuario. - */ - @Test - public void testGetCorreo() { - System.out.println("getCorreo"); - String expResult = "correo"; - String result = instance.getCorreo(); - assertEquals(expResult, result); - } - - /** - * Test of getFechaNacimiento method, of class Usuario. - */ - @Test - public void testGetFechaNacimiento() { - System.out.println("getFechaNacimiento"); - Date expResult = new Date(2019 - 1900, 1, 1); - Date result = instance.getFechaNacimiento(); - assertEquals(expResult.toString(), result.toString()); - } - - /** - * Test of getImagen method, of class Usuario. - */ - @Test - public void testGetImagen() { - System.out.println("getImagen"); - String expResult = "imagen"; - String result = instance.getImagen(); - assertEquals(expResult, result); - } - - /** - * Test of getSeguidores method, of class Usuario. - */ - @Test - public void testGetSeguidores() { - System.out.println("getSeguidores"); - int expResult = 0; - int result = instance.getSeguidores(); - assertEquals(expResult, result); - } - - /** - * Test of getDT method, of class Usuario. - */ - @Test - public void testGetDT() { - System.out.println("getDT"); - DtUsuario expResult = new DtUsuario("nickname", "contrasenia", "nombre", "apellido", "correo", new Date(2019 - 1900, 1, 1), "imagen", 0); - DtUsuario result = instance.getDT(); - assertEquals(expResult.toString(), result.toString()); - } - - ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - /** - * Test of actualizarListasPorDefecto method, of class Usuario. - */ - @Test - public void testActualizarListasPorDefecto() { - System.out.println("actualizarListasPorDefecto"); - instance.actualizarListasPorDefecto(); - assertNull(null); - } - - /** - * Test of agregarComentarioAVideo method, of class Usuario. - */ - @Test - public void testAgregarComentarioAVideo_3args_1() { - System.out.println("agregarComentarioAVideo"); - int idVideo = 0; - DtComentario DtComentario = null; - Usuario Usu = instance; - try { - instance.agregarComentarioAVideo(idVideo, DtComentario, Usu); - assertNull(instance); // por poner algo que no sea null... - } catch (Exception e) { - assertNull(null); - } - } - @Test - public void testAgregarComentarioAVideo_3args_2() { - System.out.println("agregarComentarioAVideo"); - int idVideo = 0; - DtComentario DtComentario = new DtComentario(2, "nick", new Date(2019-1900, 1, 1), "texto", 0); - Usuario Usu = null; - try { - instance.agregarComentarioAVideo(idVideo, DtComentario, Usu); - assertEquals(false, true); - } catch (Exception e) { - assertEquals(true, true); - } - } - @Test - public void testAgregarComentarioAVideo_3args_3() { - System.out.println("testAgregarComentarioAVideo_3args_3"); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - DtComentario DtComentario = new DtComentario(2, "nick", new Date(2019-1900, 1, 1), "texto", 0); - Usuario Usu = instance; - try { - instance.agregarComentarioAVideo(idVideo, DtComentario, Usu); - assertEquals(true, true); - } catch (Exception e) { - assertEquals(false, true); - } - } - - /** - * Test of agregarComentarioAVideo method, of class Usuario. - */ - @Test - public void testAgregarComentarioAVideo_4args_1() { - System.out.println("testAgregarComentarioAVideo_4args_1"); - Usuario Usu = instance; - DtComentario DtComentario = new DtComentario(0, "nick", new Date(2019-1900, 1, 1), "texto", 0); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - instance.agregarComentarioAVideo(idVideo, DtComentario, Usu); - int idCom = instance.listarComentariosDeVideo(idVideo).get(0).getId(); - try { - instance.agregarComentarioAVideo(idVideo, idCom, DtComentario, Usu); - assertNull(null); - } catch (Exception e) { - assertNull(instance); // por poner algo que no sea null... - } - } - @Test - public void testAgregarComentarioAVideo_4args_2() { - System.out.println("testAgregarComentarioAVideo_4args_2"); - Usuario Usu = instance; - DtComentario DtComentario = new DtComentario(0, "nick", new Date(2019-1900, 1, 1), "texto", 0); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - instance.agregarComentarioAVideo(idVideo, DtComentario, Usu); - int idCom = instance.listarComentariosDeVideo(idVideo).get(0).getId(); - try { - instance.agregarComentarioAVideo(idVideo, idCom, DtComentario, null); - assertNull(instance); // por poner algo que no sea null... - } catch (Exception e) { - assertNull(null); - } - } - @Test - public void testAgregarComentarioAVideo_4args_3() { - System.out.println("testAgregarComentarioAVideo_4args_3"); - Usuario Usu = instance; - DtComentario DtComentario = new DtComentario(0, "nick", new Date(2019-1900, 1, 1), "texto", 0); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - instance.agregarComentarioAVideo(idVideo, DtComentario, Usu); - int idCom = instance.listarComentariosDeVideo(idVideo).get(0).getId(); - try { - instance.agregarComentarioAVideo(idVideo, idCom, null, Usu); - assertNull(instance); // por poner algo que no sea null... - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of agregarListaParticular method, of class Usuario. - */ - @Test - public void testAgregarListaParticular_1() { - System.out.println("testAgregarListaParticular_1"); - DtListaDeReproduccion dt = ldr.getDt(); - //System.out.println(ldr.toString()); - //System.out.println(dt.toString()); - try { - instance.agregarListaParticular(dt); - assertNull(null); - } catch (Exception e) { - assertNull(dt); - } - } - @Test - public void testAgregarListaParticular_2() { - System.out.println("agregarListaParticular_2"); - DtListaDeReproduccion dt = null; - try { - instance.agregarListaParticular(dt); - assertNull(dt); - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of agregarModificarValoracionDeVideo method, of class Usuario. - */ - @Test - public void testAgregarModificarValoracionDeVideo_1() { - System.out.println("testAgregarModificarValoracionDeVideo_1"); - DtValoracion DtValoracion = new DtValoracion(TipoValoracion.LIKE, "instance"); - Usuario Usu = instance; - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - - try { - instance.agregarModificarValoracionDeVideo(idVideo, DtValoracion, Usu); - assertNull(null); - } catch (Exception e) { - assertNotNull(null); - } - } - @Test - public void testAgregarModificarValoracionDeVideo_2() { - System.out.println("testAgregarModificarValoracionDeVideo_2"); - DtValoracion DtValoracion = new DtValoracion(TipoValoracion.LIKE, "instance"); - Usuario Usu = null; - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - - try { - instance.agregarModificarValoracionDeVideo(idVideo, DtValoracion, Usu); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - @Test - public void testAgregarModificarValoracionDeVideo_3() { - System.out.println("testAgregarModificarValoracionDeVideo_3"); - DtValoracion DtValoracion = null; - Usuario Usu = instance; - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - - try { - instance.agregarModificarValoracionDeVideo(idVideo, DtValoracion, Usu); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of agregarOQuitarSeguido method, of class Usuario. - */ - @Test - public void testAgregarOQuitarSeguido_1() { - System.out.println("testAgregarOQuitarSeguido_1"); - Usuario Usu = new Usuario("nickname", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - int antes = Usu.getSeguidores() +1; - instance.agregarOQuitarSeguido(Usu); - int despues = Usu.getSeguidores(); - - boolean parte1 = antes == despues; - - antes = Usu.getSeguidores() -1; - instance.agregarOQuitarSeguido(Usu); - despues = Usu.getSeguidores(); - - boolean parte2 = antes == despues; - - if (parte1 && parte2){ - assertNull(null); - }else{ - assertNotNull(null); - } - } - @Test - public void testAgregarOQuitarSeguido_2() { - System.out.println("testAgregarOQuitarSeguido_2"); - Usuario Usu = new Usuario("nickname", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - - int antes = Usu.getSeguidores(); - try { - instance.agregarOQuitarSeguido(null); - } catch (Exception e) { - int despues = Usu.getSeguidores(); - assertEquals(antes, despues); - } - } - @Test - public void testAgregarOQuitarSeguido_3() { - System.out.println("testAgregarOQuitarSeguido_3"); - Usuario Usu = new Usuario("nickname", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - - int antes = Usu.getSeguidores(); - try { - instance.agregarOQuitarSeguido(instance); - } catch (Exception e) { - int despues = Usu.getSeguidores(); - assertEquals(antes, despues); - } - } - - /** - * Test of agregarVideoACanal method, of class Usuario. - */ - @Test - public void testAgregarVideoACanal_1() { - System.out.println("agregarVideoACanal_1"); - int antes, despues; - antes = instance.listarVideosDeCanal().size(); - Video v2 = new Video(0, "nombre de otro video", "descripcion", new Time(1, 2, 3), new Date(2019 - 1900, 1, 2), "urlVideo", "UNDEFINED"); - - try { - instance.agregarVideoACanal(v2.getDt()); - despues = instance.listarVideosDeCanal().size(); - assertNotEquals(despues, antes); - } catch (Exception e) { - despues = instance.listarVideosDeCanal().size(); - assertNotEquals(despues, antes); - } - } - @Test - public void testAgregarVideoACanal_2() { - System.out.println("agregarVideoACanal_2"); - int antes, despues; - antes = instance.listarVideosDeCanal().size(); - try { - instance.agregarVideoACanal(null); - } catch (Exception e) { - despues = instance.listarVideosDeCanal().size(); - assertEquals(despues, antes); - } - } - - /** - * Test of agregarVideoALista method, of class Usuario. - */ - @Test - public void testAgregarVideoALista_1() { - System.out.println("agregarVideoALista_1"); - int idLista = instance.listarListasDeReproduccionDeCanal(false).get(0).getId(); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - Usuario Usu = instance; - int antes, despues; - antes = instance.listarVideosDeListaDeReproduccion(idLista).size(); - instance.agregarVideoALista(idLista, idVideo, Usu); - despues = instance.listarVideosDeListaDeReproduccion(idLista).size(); - assertNotEquals(despues, antes); - } - @Test - public void testAgregarVideoALista_2() { - System.out.println("agregarVideoALista_2"); - int idLista = instance.listarListasDeReproduccionDeCanal(false).get(0).getId(); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - Usuario Usu = instance; - int antes, despues; - antes = instance.listarVideosDeListaDeReproduccion(idLista).size(); - - try { - instance.agregarVideoALista(idLista, -5, Usu); - } catch (Exception e) { - despues = instance.listarVideosDeListaDeReproduccion(idLista).size(); - assertEquals(despues, antes); - } - } - @Test - public void testAgregarVideoALista_3() { - System.out.println("agregarVideoALista_3"); - int idLista = instance.listarListasDeReproduccionDeCanal(false).get(0).getId(); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - Usuario Usu = instance; - int antes, despues; - antes = instance.listarVideosDeListaDeReproduccion(idLista).size(); - - try { - instance.agregarVideoALista(idLista, idVideo, null); - } catch (Exception e) { - despues = instance.listarVideosDeListaDeReproduccion(idLista).size(); - assertEquals(despues, antes); - } - } - - /** - * Test of listarUsuariosSeguidos method, of class Usuario. - */ - @Test - public void testListarUsuariosSeguidos() { - System.out.println("listarUsuariosSeguidos"); - Usuario Usu = new Usuario("nickname", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - instance.agregarOQuitarSeguido(Usu); - - ArrayList<DtUsuario> expResult = new ArrayList(); - - ArrayList<DtUsuario> result = instance.listarUsuariosSeguidos(); - instance.agregarOQuitarSeguido(Usu); - assertNotEquals(expResult.size(), result.size()); - } - - /** - * Test of listarUsuariosSeguidores method, of class Usuario. - */ - @Test - public void testListarUsuariosSeguidores() { - System.out.println("listarUsuariosSeguidores"); - Usuario Usu = new Usuario("nickname", "correo", new Date(2019 - 1900, 1, 1), - "imagen", "contrasenia", "nombre", "apellido", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - instance.agregarOQuitarSeguido(Usu); - - ArrayList<DtUsuario> expResult = new ArrayList(); - - ArrayList<DtUsuario> result = Usu.listarUsuariosSeguidores(); - instance.agregarOQuitarSeguido(Usu); - assertNotEquals(expResult.size(), result.size()); - } - - /** - * Test of listarValoracionesDeVideo method, of class Usuario. - */ - @Test - public void testListarValoracionesDeVideo() { - System.out.println("listarValoracionesDeVideo"); - int id = instance.listarVideosDeCanal().get(0).getId(); - ArrayList<DtValoracion> expResult = new ArrayList(); - ArrayList<DtValoracion> result = null; - try { - result = instance.listarValoracionesDeVideo(id); - assertNull(null); - } catch (Exception e) { - assertNotNull(null); - } - } - - /** - * Test of listarVideosDeCanal method, of class Usuario. - */ - @Test - public void testListarVideosDeCanal() { - System.out.println("listarVideosDeCanal"); - int id = instance.listarVideosDeCanal().get(0).getId(); - ArrayList<DtVideo> expResult = new ArrayList(); - ArrayList<DtVideo> result = null; - try { - result = instance.listarVideosDeCanal(); - assertNull(null); - } catch (Exception e) { - assertNotNull(null); - } - } - - /** - * Test of listarVideosDeListaDeReproduccion method, of class Usuario. - */ - @Test - public void testListarVideosDeListaDeReproduccion() { - System.out.println("listarVideosDeListaDeReproduccion"); - int id = instance.listarListasDeReproduccionDeCanal(false).get(0).getId(); - ArrayList<DtVideo> expResult = new ArrayList(); - ArrayList<DtVideo> result = null; - try { - result = instance.listarVideosDeListaDeReproduccion(id); - assertNull(null); - } catch (Exception e) { - assertNotNull(null); - } - } - - /** - * Test of modificar method, of class Usuario. - */ - @Test - public void testModificar() { - System.out.println("modificar"); - Usuario Usu = new Usuario("nickn", "cor", new Date(2000 - 1900, 1, 1), - "img", "contra", "nom", "ape", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - DtUsuario DtUsu = Usu.getDT(); - DtCanal dtc = instance.obtenerCanal(); - instance.modificar(DtUsu, dtc); - assertNotEquals(DtUsu.toString(), instance.getDT().toString()); - } - @Test - public void testModificar_1() { - System.out.println("testModificar_1"); - Usuario Usu = new Usuario("nickn", "cor", new Date(2000 - 1900, 1, 1), - "img", "contra", "nom", "ape", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - DtUsuario DtUsu = Usu.getDT(); - DtCanal dtc = instance.obtenerCanal(); - - String antes = instance.getDT().toString(); - try { - instance.modificar(null, dtc); - } catch (Exception e) { - String despues = instance.getDT().toString(); - assertEquals(antes, despues); - } - } - @Test - public void testModificar_2() { - System.out.println("testModificar_2"); - Usuario Usu = new Usuario("nickn", "cor", new Date(2000 - 1900, 1, 1), - "img", "contra", "nom", "ape", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - DtUsuario DtUsu = Usu.getDT(); - DtCanal dtc = instance.obtenerCanal(); - - String antes = instance.getDT().toString(); - try { - instance.modificar(DtUsu, null); - } catch (Exception e) { - String despues = instance.getDT().toString(); - assertEquals(antes, despues); - } - } - @Test - public void testModificar_3() { - System.out.println("testModificar_3"); - Usuario Usu = new Usuario("nickn", "cor", new Date(2000 - 1900, 1, 1), - "img", "contra", "nom", "ape", - new DtCanal(0, "canal", "descripcion", Privacidad.PUBLICO)); - - DtUsuario DtUsu = new DtUsuario("nickname", "contrasenia", "nombre", "apellido", "correo", null, "imagen", 0); - DtCanal dtc = instance.obtenerCanal(); - - String antes = instance.getDT().toString(); - try { - instance.modificar(DtUsu, dtc); - } catch (Exception e) { - String despues = instance.getDT().toString(); - assertEquals(antes, despues); - } - } - - /** - * Test of modificarListaDeReproduccionDeCanal method, of class Usuario. - */ - @Test - public void testModificarListaDeReproduccionDeCanal_1() { - System.out.println("testModificarListaDeReproduccionDeCanal_1"); - DtListaDeReproduccion DtListaDeReproduccion = ldr.getDt(); - int id = ListaDeReproduccion.getNuevoId() +1; - instance.agregarListaParticular(ldr.getDt()); - DtListaDeReproduccion dt = new DtListaDeReproduccion(id, "nombre", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "MUSICA"); - try { - instance.modificarListaDeReproduccionDeCanal(dt); - assertNull(null); - } catch (Exception e) { - assertNotNull(null); - } - } - @Test - public void testModificarListaDeReproduccionDeCanal_2() { - System.out.println("testModificarListaDeReproduccionDeCanal_2"); - DtListaDeReproduccion DtListaDeReproduccion = null; - - try { - instance.modificarListaDeReproduccionDeCanal(DtListaDeReproduccion); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of modificarVideoDeCanal method, of class Usuario. - */ - @Test - public void testModificarVideoDeCanal_1() { - System.out.println("testModificarVideoDeCanal_1"); - - int id = Video.getNuevoId() + 1; - DtVideo dt1 = new DtVideo(id, "videito", "descripcioncita", new Time(1, 2, 3), new Date(2010-1900, 5, 25), "urlcita", Privacidad.PRIVADO, "MUSICA", 0, 0); - instance.agregarVideoACanal(dt1); - DtVideo dt2 = new DtVideo(id, "vid", "desc", new Time(1, 2, 3), new Date(2010-1900, 5, 25), "url_vid", Privacidad.PRIVADO, "MUSICA", 0, 0); - - try { - instance.modificarVideoDeCanal(dt2); - assertNull(null); - } catch (Exception e) { - assertNotNull(null); - } - } - @Test - public void testModificarVideoDeCanal_2() { - System.out.println("testModificarVideoDeCanal_2"); - - try { - instance.modificarVideoDeCanal(null); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of obtenerCanal method, of class Usuario. - */ - @Test - public void testObtenerCanal() { - System.out.println("obtenerCanal"); - DtCanal result = instance.obtenerCanal(); - assertNotNull(result); - } - - /** - * Test of obtenerListaDeReproduccion method, of class Usuario. - */ - @Test - public void testObtenerListaDeReproduccion_1() { - System.out.println("obtenerListaDeReproduccion_1"); - int id = instance.listarListasDeReproduccionDeCanal(false).get(0).getId(); - DtListaDeReproduccion result = null; - try { - result = instance.obtenerListaDeReproduccion(id); - assertNotNull(result); - } catch (Exception e) { - assertNull(result); - } - } - @Test - public void testObtenerListaDeReproduccion_2() { - System.out.println("obtenerListaDeReproduccion_2"); - int id = 5000; - DtListaDeReproduccion result = null; - try { - result = instance.obtenerListaDeReproduccion(id); - assertNotNull(result); - } catch (Exception e) { - assertNull(result); - } - } - - /** - * Test of obtenerListasEnCategoria method, of class Usuario. - */ - @Test - public void testObtenerListasEnCategoria_1() { - System.out.println("obtenerListasEnCategoria_1"); - String cat = "DEPORTE"; - DtListaDeReproduccion dt = new DtListaDeReproduccion(0, "prueba", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "DEPORTE"); - instance.agregarListaParticular(dt); - - ArrayList<DtListaDeReproduccion> expResult = new ArrayList(); - ArrayList<DtListaDeReproduccion> result = new ArrayList(); - - try { - result = instance.obtenerListasEnCategoria(cat); - assertNotEquals(expResult.size(), result.size()); - } catch (Exception e) { - assertEquals(expResult.size(), result.size()); - } - } - @Test - public void testObtenerListasEnCategoria_2() { - System.out.println("testObtenerListasEnCategoria_2"); - String cat = ""; - - try { - ArrayList<DtListaDeReproduccion> result = instance.obtenerListasEnCategoria(cat); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of obtenerValoracion method, of class Usuario. - */ - @Test - public void testObtenerValoracion_1() { - System.out.println("obtenerValoracion_1"); - int id = instance.listarVideosDeCanal().get(0).getId(); - String nickname = instance.getNickname(); - instance.agregarModificarValoracionDeVideo(id, new DtValoracion(TipoValoracion.LIKE, instance.getNickname()), instance); - DtValoracion result = null; - try { - result = instance.obtenerValoracion(id, nickname); - assertNotNull(result); - } catch (Exception e) { - assertNotNull(result); - } - } - @Test - public void testObtenerValoracion_2() { - System.out.println("testObtenerValoracion_2"); - String nickname = ""; - DtValoracion result = null; - try { - result = instance.obtenerValoracion(0, nickname); - assertNull(result); - } catch (Exception e) { - assertNull(result); - } - } - - /** - * Test of obtenerVideo method, of class Usuario. - */ - @Test - public void testObtenerVideo_1() { - System.out.println("testObtenerVideo_1"); - int id = instance.listarVideosDeCanal().get(0).getId(); - Video result = null; - try { - result = instance.obtenerVideo(id); - assertNotNull(result); - } catch (Exception e) { - assertNotNull(result); - } - } - @Test - public void testObtenerVideo_2() { - System.out.println("testObtenerVideo_2"); - int id = 548; - Video result = null; - try { - result = instance.obtenerVideo(id); - assertNull(result); - } catch (Exception e) { - assertNull(result); - } - } - - /** - * Test of obtenerVideoDeCanal method, of class Usuario. - */ - @Test - public void testObtenerVideoDeCanal_1() { - System.out.println("testObtenerVideoDeCanal_1"); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - String expResult = instance.listarVideosDeCanal().get(0).getNombre(); - String result = ""; - try { - result = instance.obtenerVideoDeCanal(idVideo).getNombre(); - assertEquals(expResult, result); - } catch (Exception e) { - assertNotEquals(expResult, result); - } - } - @Test - public void testObtenerVideoDeCanal_2() { - System.out.println("testObtenerVideoDeCanal_2"); - int idVideo = 65487; - String expResult = ""; - String result = ""; - try { - result = instance.obtenerVideoDeCanal(idVideo).getNombre(); - assertEquals(expResult, result); - } catch (Exception e) { - assertEquals(expResult, result); - } - } - - /** - * Test of obtenerVideosEnCategoria method, of class Usuario. - */ - @Test - public void testObtenerVideosEnCategoria_1() { - System.out.println("testObtenerVideosEnCategoria_1"); - String cat = v.getCategoria(); - ArrayList<DtVideo> expResult = new ArrayList(); - ArrayList<DtVideo> result = null; - try { - result = instance.obtenerVideosEnCategoria(cat); - assertNotEquals(expResult.size(), result.size()); - } catch (Exception e) { - assertNotNull(null); - } - } - @Test - public void testObtenerVideosEnCategoria_2() { - System.out.println("testObtenerVideosEnCategoria_2"); - String cat = "CATEGORIA INEXISTENTE"; - ArrayList<DtVideo> expResult = new ArrayList(); - ArrayList<DtVideo> result = null; - try { - result = instance.obtenerVideosEnCategoria(cat); - assertEquals(expResult.size(), result.size()); - } catch (Exception e) { - assertNotNull(null); - } - } - @Test - public void testObtenerVideosEnCategoria_3() { - System.out.println("testObtenerVideosEnCategoria_3"); - String cat = ""; - ArrayList<DtVideo> expResult = new ArrayList(); - ArrayList<DtVideo> result = null; - try { - result = instance.obtenerVideosEnCategoria(cat); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of quitarValoracion method, of class Usuario. - */ - @Test - public void testQuitarValoracion_1() { - System.out.println("testQuitarValoracion_1"); - DtValoracion DtValoracion = new DtValoracion(TipoValoracion.LIKE, "instance"); - Usuario Usu = instance; - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - instance.agregarModificarValoracionDeVideo(idVideo, DtValoracion, Usu); - String nickname = Usu.getNickname(); - - int antes, despues; - antes = instance.listarValoracionesDeVideo(idVideo).size(); - - try { - instance.quitarValoracion(idVideo, nickname); - despues = instance.listarValoracionesDeVideo(idVideo).size(); - assertNotEquals(antes, despues); - } catch (Exception e) { - assertNotNull(null); - } - } - @Test - public void testQuitarValoracion_2() { - System.out.println("testQuitarValoracion_2"); - DtValoracion DtValoracion = new DtValoracion(TipoValoracion.LIKE, "instance"); - Usuario Usu = instance; - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - instance.agregarModificarValoracionDeVideo(idVideo, DtValoracion, Usu); - String nickname = ""; - - int antes, despues; - antes = instance.listarValoracionesDeVideo(idVideo).size(); - - try { - instance.quitarValoracion(idVideo, nickname); - despues = instance.listarValoracionesDeVideo(idVideo).size(); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - - /** - * Test of quitarVideoDeListaDeReproduccion method, of class Usuario. - */ - @Test - public void testQuitarVideoDeListaDeReproduccion_1() { - System.out.println("testQuitarVideoDeListaDeReproduccion_1"); - int idLista = instance.listarListasDeReproduccionDeCanal(false).get(0).getId(); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - Usuario Usu = instance; - Usu.agregarVideoALista(idLista, idVideo, instance); - int antes, despues; - antes = instance.listarVideosDeListaDeReproduccion(idLista).size(); - instance.quitarVideoDeListaDeReproduccion(idLista, idVideo); - despues = instance.listarVideosDeListaDeReproduccion(idLista).size(); - assertNotEquals(despues, antes); - } - @Test - public void testQuitarVideoDeListaDeReproduccion_2() { - System.out.println("testQuitarVideoDeListaDeReproduccion_2"); - int idLista = instance.listarListasDeReproduccionDeCanal(false).get(0).getId(); - int idVideo = instance.listarVideosDeCanal().get(0).getId(); - Usuario Usu = instance; - Usu.agregarVideoALista(idLista, idVideo, instance); - idVideo = 548876; - int antes, despues; - antes = instance.listarVideosDeListaDeReproduccion(idLista).size(); - instance.quitarVideoDeListaDeReproduccion(idLista, idVideo); - despues = instance.listarVideosDeListaDeReproduccion(idLista).size(); - assertEquals(despues, antes); - } - - /** - * Test of validarListaParticular method, of class Usuario. - */ - @Test - public void testValidarListaParticular_1() { - System.out.println("testValidarListaParticular_1"); - - DtListaDeReproduccion dt = new DtListaDeReproduccion(0, "nombre particular 1", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "MUSICA"); - instance.agregarListaParticular(dt); - String nombre = "nombre particular 1"; - boolean expResult = true; - boolean result = false; - try { - result = instance.validarListaParticular(nombre); - assertEquals(expResult, result); - } catch (Exception e) { - assertEquals(expResult, result); - } - } - @Test - public void testValidarListaParticular_2() { - System.out.println("testValidarListaParticular_2"); - - DtListaDeReproduccion dt = new DtListaDeReproduccion(0, "nombre particular 2", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "MUSICA"); - - String nombre = "lista inexistente"; - boolean expResult = false; - boolean result = true; - try { - result = instance.validarListaParticular(nombre); - assertEquals(expResult, result); - } catch (Exception e) { - assertEquals(expResult, result); - } - } - @Test - public void testValidarListaParticular_3() { - System.out.println("testValidarListaParticular_3"); - - String nombre = ""; - boolean expResult = false; - boolean result = true; - try { - result = instance.validarListaParticular(nombre); - assertNotNull(null); - } catch (Exception e) { - assertNull(null); - } - } - -} diff --git a/UyTube_aplicacion/test/Logica/Clases/ValoracionTest.java b/UyTube_aplicacion/test/Logica/Clases/ValoracionTest.java deleted file mode 100644 index 4081c75..0000000 --- a/UyTube_aplicacion/test/Logica/Clases/ValoracionTest.java +++ /dev/null @@ -1,221 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Clases; - -import Logica.DataType.DtValoracion; -import Logica.Enumerados.TipoValoracion; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -import Logica.Clases.Usuario; -import Logica.DataType.DtCanal; -import Logica.Enumerados.Privacidad; -import java.sql.Date; - -/** - * - * @author Carlos BM - */ -public class ValoracionTest { - - Usuario user; - Valoracion valo; - - public ValoracionTest() { - user = new Usuario("MCbolso", "mcbolso@gmail.com", new Date(190,7,4), "imagen.jpg", "dsfsdf", "mariano", "Castro", new DtCanal(0, "mi_canal", "un_canal_mas", Privacidad.PRIVADO)); - valo = new Valoracion(TipoValoracion.LIKE, user); - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getVal method, of class Valoracion. - */ - @Test - public void testValoracion() { - System.out.println("getVal"); - Valoracion instance; - try{ - instance = new Valoracion(TipoValoracion.LIKE, null); - }catch(Exception e){ - assertEquals(true, true); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - @Test - public void testGetVal() { - System.out.println("getVal"); - Valoracion instance = valo; - TipoValoracion expResult = TipoValoracion.LIKE; - TipoValoracion result = instance.getVal(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of setVal method, of class Valoracion. - */ - @Test - public void testSetVal() { - System.out.println("setVal"); - TipoValoracion val = null; - Valoracion instance = valo; - instance.setVal(val); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getNicknameDeUsuario method, of class Valoracion. - */ - @Test - public void testGetNicknameDeUsuario() { - System.out.println("getNicknameDeUsuario"); - Valoracion instance = valo; - String expResult = "MCbolso"; - String result = instance.getNicknameDeUsuario(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getDT method, of class Valoracion. - */ - @Test - public void testGetDT_0args() { - System.out.println("getDT"); - Valoracion instance = valo; - DtValoracion expResult = new DtValoracion(TipoValoracion.LIKE, "MCbolso"); - DtValoracion result = instance.getDT(); - assertEquals(expResult.toString(), result.toString()); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getDT method, of class Valoracion. - */ - @Test - public void testGetDT_String() { - - System.out.println("getDT"); - String nickname = "MCbolso"; - Valoracion instance = valo; - DtValoracion expResult = new DtValoracion(TipoValoracion.LIKE, "MCbolso"); - DtValoracion result = instance.getDT(nickname); - assertEquals(expResult.toString(), result.toString()); - } - - @Test - public void testGetDT_String_mal() { - - System.out.println("getDT"); - Valoracion instance = valo; - //DtValoracion result = instance.getDT("Lucas"); - assertNull(instance.getDT("Lucas")); - } - - @Test - public void testGetDT_String_null_basura() { - System.out.println("getDT"); - String nickname = null; - Valoracion instance = valo; - try { - instance.getDT(nickname); - } catch (Exception e) { - assertEquals(true, true); - } - - } - - /** - * Test of modificar method, of class Valoracion. - */ - @Test - public void testModificar() { - System.out.println("modificar"); - DtValoracion dtV = new DtValoracion(TipoValoracion.DISLIKE, "MCbolso"); - String nickname = "MCbolso"; - Valoracion instance = valo; - boolean expResult = true; - boolean result = instance.modificar(dtV, nickname); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - @Test - public void testModificar_false() { - System.out.println("modificar"); - DtValoracion dtV = new DtValoracion(TipoValoracion.DISLIKE, "MCbolso"); - String nickname = "Lucas"; - Valoracion instance = valo; - boolean expResult = false; - boolean result = instance.modificar(dtV, nickname); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - @Test - public void testModificar_null_1() { - System.out.println("modificar"); - DtValoracion dtV = new DtValoracion(TipoValoracion.DISLIKE, "MCbolso"); - String nickname = null; - Valoracion instance = valo; - boolean expResult = false; - boolean result = false; - - try{ - result = instance.modificar(dtV, nickname); - }catch(Exception e){ - assertEquals(expResult, result); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - @Test - public void testModificar_null_2() { - System.out.println("modificar"); - DtValoracion dtV = null; - String nickname = "MCbolso"; - Valoracion instance = valo; - boolean expResult = false; - boolean result = false; - - try{ - result = instance.modificar(dtV, nickname); - }catch(Exception e){ - assertEquals(expResult, result); - } - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtCanalTest.java b/UyTube_aplicacion/test/Logica/DataType/DtCanalTest.java deleted file mode 100644 index 411298d..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtCanalTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.DataType; - -import Logica.Enumerados.Privacidad; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class DtCanalTest { - - DtCanal instance = null; - - public DtCanalTest() { - instance = new DtCanal(0, "nombre", "descripcion", Privacidad.PRIVADO); - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getId method, of class DtCanal. - */ - @Test - public void testGetId() { - System.out.println("getId"); - int expResult = 0; - int result = instance.getId(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getNombre method, of class DtCanal. - */ - @Test - public void testGetNombre() { - System.out.println("getNombre"); - String expResult = "nombre"; - String result = instance.getNombre(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getDescripcion method, of class DtCanal. - */ - @Test - public void testGetDescripcion() { - System.out.println("getDescripcion"); - String expResult = "descripcion"; - String result = instance.getDescripcion(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getPrivacidad method, of class DtCanal. - */ - @Test - public void testGetPrivacidad() { - System.out.println("getPrivacidad"); - Privacidad expResult = Privacidad.PRIVADO; - Privacidad result = instance.getPrivacidad(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of toString method, of class DtCanal. - */ - @Test - public void testToString() { - System.out.println("toString"); - String expResult = "DtCanal{id=0, nombre=nombre, descripcion=descripcion, privacidad=PRIVADO}"; - String result = instance.toString(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtCategoriaTest.java b/UyTube_aplicacion/test/Logica/DataType/DtCategoriaTest.java deleted file mode 100644 index 5205137..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtCategoriaTest.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.DataType; - -import Logica.Clases.Categoria; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class DtCategoriaTest { - - public DtCategoriaTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getNombre method, of class DtCategoria. - */ - @Test - public void testGetNombre() { - System.out.println("getNombre"); - DtCategoria instance = new DtCategoria("MUSICA"); - String expResult = "MUSICA"; - String result = instance.getNombre(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of toString method, of class DtCategoria. - */ - @Test - public void testToString() { - System.out.println("toString"); - DtCategoria instance = new DtCategoria("MUSICA"); - String expResult = "DtCategoria{nombre=MUSICA}"; - String result = instance.toString(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtComentarioTest.java b/UyTube_aplicacion/test/Logica/DataType/DtComentarioTest.java deleted file mode 100644 index fb798fe..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtComentarioTest.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.DataType; - -import java.sql.Date; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class DtComentarioTest { - - public DtComentarioTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getId method, of class DtComentario. - */ - @Test - public void testGetId() { - System.out.println("getId"); - DtComentario instance = new DtComentario(0, "nickname", new Date(2019-1900, 1, 1), "texto", 1); - int expResult = 0; - int result = instance.getId(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getNickname method, of class DtComentario. - */ - @Test - public void testGetNickname() { - System.out.println("getNickname"); - DtComentario instance = new DtComentario(0, "nickname", new Date(2019-1900, 1, 1), "texto", 1); - String expResult = "nickname"; - String result = instance.getNickname(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getFecha method, of class DtComentario. - */ - @Test - public void testGetFecha() { - System.out.println("getFecha"); - DtComentario instance = new DtComentario(0, "nickname", new Date(2019-1900, 1, 1), "texto", 1); - Date expResult = new Date(2019-1900, 1, 1); - Date result = instance.getFecha(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getTexto method, of class DtComentario. - */ - @Test - public void testGetTexto() { - System.out.println("getTexto"); - DtComentario instance = new DtComentario(0, "nickname", new Date(2019-1900, 1, 1), "texto", 1); - String expResult = "texto"; - String result = instance.getTexto(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getNivelSubComentario method, of class DtComentario. - */ - @Test - public void testGetNivelSubComentario() { - System.out.println("getNivelSubComentario"); - DtComentario instance = new DtComentario(0, "nickname", new Date(2019-1900, 1, 1), "texto", 1); - int expResult = 1; - int result = instance.getNivelSubComentario(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of toString method, of class DtComentario. - */ - @Test - public void testToString() { - System.out.println("toString"); - DtComentario instance = new DtComentario(0, "nickname", new Date(2019-1900, 1, 1), "texto", 1); - String expResult = "DtComentario{id=0, nickname=nickname, fecha=2019-02-01, texto=texto, nivelSubComentario=1}"; - String result = instance.toString(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtListaDeReproduccionTest.java b/UyTube_aplicacion/test/Logica/DataType/DtListaDeReproduccionTest.java deleted file mode 100644 index bae99bc..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtListaDeReproduccionTest.java +++ /dev/null @@ -1,127 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.DataType; - -import Logica.Clases.ListaDeReproduccion; -import Logica.Enumerados.Privacidad; -import Logica.Enumerados.TipoListaDeReproduccion; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class DtListaDeReproduccionTest { - - public DtListaDeReproduccionTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getId method, of class DtListaDeReproduccion. - */ - @Test - public void testGetId() { - System.out.println("getId"); - DtListaDeReproduccion instance = new DtListaDeReproduccion(0, "nombre", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - int expResult = 0; - int result = instance.getId(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getNombre method, of class DtListaDeReproduccion. - */ - @Test - public void testGetNombre() { - System.out.println("getNombre"); - DtListaDeReproduccion instance = new DtListaDeReproduccion(0, "nombre", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - String expResult = "nombre"; - String result = instance.getNombre(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getPrivacidad method, of class DtListaDeReproduccion. - */ - @Test - public void testGetPrivacidad() { - System.out.println("getPrivacidad"); - DtListaDeReproduccion instance = new DtListaDeReproduccion(0, "nombre", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - Privacidad expResult = Privacidad.PRIVADO; - Privacidad result = instance.getPrivacidad(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getTipo method, of class DtListaDeReproduccion. - */ - @Test - public void testGetTipo() { - System.out.println("getTipo"); - DtListaDeReproduccion instance = new DtListaDeReproduccion(0, "nombre", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - TipoListaDeReproduccion expResult = TipoListaDeReproduccion.PARTICULAR; - TipoListaDeReproduccion result = instance.getTipo(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getCategoria method, of class DtListaDeReproduccion. - */ - @Test - public void testGetCategoria() { - System.out.println("getCategoria"); - DtListaDeReproduccion instance = new DtListaDeReproduccion(0, "nombre", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - String expResult = "UNDEFINED"; - String result = instance.getCategoria(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of toString method, of class DtListaDeReproduccion. - */ - @Test - public void testToString() { - System.out.println("toString"); - DtListaDeReproduccion instance = new DtListaDeReproduccion(0, "nombre", Privacidad.PRIVADO, TipoListaDeReproduccion.PARTICULAR, "UNDEFINED"); - String expResult = "DtListaDeReproduccion{id=0, nombre=nombre, privacidad=PRIVADO, tipo=PARTICULAR, categoria=UNDEFINED}"; - String result = instance.toString(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtPersonaTest.java b/UyTube_aplicacion/test/Logica/DataType/DtPersonaTest.java deleted file mode 100644 index 47ce2e8..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtPersonaTest.java +++ /dev/null @@ -1,107 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.DataType; - -import java.sql.Date; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class DtPersonaTest { - - public DtPersonaTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getNombre method, of class DtPersona. - */ - @Test - public void testGetNombre() { - System.out.println("getNickname"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - String expResult = "nombre"; - String result = instance.getNombre(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getApellido method, of class DtPersona. - */ - @Test - public void testGetApellido() { - System.out.println("getNickname"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - String expResult = "apellido"; - String result = instance.getApellido(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getContrasenia method, of class DtPersona. - */ - @Test - public void testGetContrasenia() { - System.out.println("getNickname"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - String expResult = "contrasenia"; - String result = instance.getContrasenia(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtUsuarioTest.java b/UyTube_aplicacion/test/Logica/DataType/DtUsuarioTest.java deleted file mode 100644 index e98ca2a..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtUsuarioTest.java +++ /dev/null @@ -1,174 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.DataType; - -import java.sql.Date; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class DtUsuarioTest { - - public DtUsuarioTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getNickname method, of class DtUsuario. - */ - @Test - public void testGetNickname() { - System.out.println("getNickname"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - String expResult = "nickname"; - String result = instance.getNickname(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - - /** - * Test of getCorreo method, of class DtUsuario. - */ - @Test - public void testGetCorreo() { - System.out.println("getCorreo"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - String expResult = "correo"; - String result = instance.getCorreo(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getFechaNacimiento method, of class DtUsuario. - */ - @Test - public void testGetFechaNacimiento() { - System.out.println("getFechaNacimiento"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - Date expResult = new Date(2019-1900, 1, 1); - Date result = instance.getFechaNacimiento(); - assertEquals(expResult.toString(), result.toString()); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getImagen method, of class DtUsuario. - */ - @Test - public void testGetImagen() { - System.out.println("getImagen"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - String expResult = "imagen"; - String result = instance.getImagen(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getCantSeguidores method, of class DtUsuario. - */ - @Test - public void testGetCantSeguidores() { - System.out.println("getCantSeguidores"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - int expResult = 0; - int result = instance.getCantSeguidores(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of toString method, of class DtUsuario. - */ - @Test - public void testToString() { - System.out.println("toString"); - DtUsuario instance = new DtUsuario( - "nickname", - "contrasenia", - "nombre", - "apellido", - "correo", - new Date(2019-1900, 1, 1), - "imagen", - 0); - String expResult = "DtUsuario{DtPersona{nombre=nombre, apellido=apellido, contrasenia=contrasenia}, nickname=nickname, correo=correo, fechaNacimiento=2019-02-01, imagen=imagen, cantSeguidores=0}"; - String result = instance.toString(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtValoracionTest.java b/UyTube_aplicacion/test/Logica/DataType/DtValoracionTest.java deleted file mode 100644 index 3372fce..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtValoracionTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.DataType; - -import Logica.Enumerados.TipoValoracion; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class DtValoracionTest { - - public DtValoracionTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of getNickname method, of class DtValoracion. - */ - @Test - public void testGetNickname() { - System.out.println("getNickname"); - DtValoracion instance = new DtValoracion(TipoValoracion.LIKE, "nickname"); - String expResult = "nickname"; - String result = instance.getNickname(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of getVal method, of class DtValoracion. - */ - @Test - public void testGetVal() { - System.out.println("getVal"); - DtValoracion instance = new DtValoracion(TipoValoracion.LIKE, "nickname"); - TipoValoracion expResult = TipoValoracion.LIKE; - TipoValoracion result = instance.getVal(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of toString method, of class DtValoracion. - */ - @Test - public void testToString() { - System.out.println("toString"); - DtValoracion instance = new DtValoracion(TipoValoracion.LIKE, "nickname"); - String expResult = "DtValoracion{val=LIKE, nickname=nickname}"; - String result = instance.toString(); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/DataType/DtVideoTest.java b/UyTube_aplicacion/test/Logica/DataType/DtVideoTest.java deleted file mode 100644 index 6b6c855..0000000 --- a/UyTube_aplicacion/test/Logica/DataType/DtVideoTest.java +++ /dev/null @@ -1,139 +0,0 @@ -package Logica.DataType; - -import Logica.Enumerados.Privacidad; -import java.sql.Date; -import java.sql.Time; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Carlos BM - */ -public class DtVideoTest { - - DtVideo dtv; - public DtVideoTest() { - dtv = new DtVideo(2, "video1", "un_video", new Time(1,1,1), new Date(190,1,2), "https://sdsd.com", Privacidad.PRIVADO, "futbol", 0, 0); - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - @Test - public void testGetId() { - System.out.println("getId"); - DtVideo instance = dtv; - int expResult = 2; - int result = instance.getId(); - assertEquals(expResult, result); - } - - @Test - public void testGetNombre() { - System.out.println("getNombre"); - DtVideo instance = dtv; - String expResult = "video1"; - String result = instance.getNombre(); - assertEquals(expResult, result); - } - - @Test - public void testGetDescripcion() { - System.out.println("getDescripcion"); - DtVideo instance = dtv; - String expResult = "un_video"; - String result = instance.getDescripcion(); - assertEquals(expResult, result); - } - - @Test - public void testGetDuracion() { - System.out.println("getDuracion"); - DtVideo instance = dtv; - Time expResult = new Time(1,1,1); - Time result = instance.getDuracion(); - assertEquals(expResult, result); - } - - @Test - public void testGetFechaPublicacion() { - System.out.println("getFechaPublicacion"); - DtVideo instance = dtv; - Date expResult = new Date(190,1,2); - Date result = instance.getFechaPublicacion(); - assertEquals(expResult, result); - } - - @Test - public void testGetUrlVideoOriginal() { - System.out.println("getUrlVideoOriginal"); - DtVideo instance = dtv; - String expResult = "https://sdsd.com"; - String result = instance.getUrlVideoOriginal(); - assertEquals(expResult, result); - } - - @Test - public void testGetPrivacidad() { - System.out.println("getPrivacidad"); - DtVideo instance = dtv; - Privacidad expResult = Privacidad.PRIVADO; - Privacidad result = instance.getPrivacidad(); - assertEquals(expResult, result); - } - - @Test - public void testGetCategoria() { - System.out.println("getCategoria"); - DtVideo instance = dtv; - String expResult = "futbol"; - String result = instance.getCategoria(); - assertEquals(expResult, result); - } - - @Test - public void testGetCantLikes() { - System.out.println("getCantLikes"); - DtVideo instance = dtv; - int expResult = 0; - int result = instance.getCantLikes(); - assertEquals(expResult, result); - } - - @Test - public void testGetCantDisLikes() { - System.out.println("getCantDisLikes"); - DtVideo instance = dtv; - int expResult = 0; - int result = instance.getCantDisLikes(); - assertEquals(expResult, result); - } - - @Test - public void testToString() { - System.out.println("toString"); - DtVideo instance = dtv; - String expResult = "DtVideo{id=2, nombre=video1, descripcion=un_video, duracion=01:01:01, fechaPublicacion=2090-02-02, urlVideoOriginal=https://sdsd.com, privacidad=PRIVADO, categoria=futbol, cantLikes=0, cantDisLikes=0}"; - String result = instance.toString(); - assertEquals(expResult, result); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Enumerados/PrivacidadTest.java b/UyTube_aplicacion/test/Logica/Enumerados/PrivacidadTest.java deleted file mode 100644 index 4fe10a6..0000000 --- a/UyTube_aplicacion/test/Logica/Enumerados/PrivacidadTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Enumerados; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class PrivacidadTest { - - public PrivacidadTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of values method, of class Privacidad. - */ - @Test - public void testValues() { - System.out.println("values"); - Privacidad[] expResult = {Privacidad.PUBLICO, Privacidad.PRIVADO}; - Privacidad[] result = Privacidad.values(); - assertArrayEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of valueOf method, of class Privacidad. - */ - @Test - public void testValueOf() { - System.out.println("valueOf"); - String name = "PRIVADO"; - Privacidad expResult = Privacidad.PRIVADO; - Privacidad result = Privacidad.valueOf(name); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Enumerados/TipoListaDeReproduccionTest.java b/UyTube_aplicacion/test/Logica/Enumerados/TipoListaDeReproduccionTest.java deleted file mode 100644 index dfa2763..0000000 --- a/UyTube_aplicacion/test/Logica/Enumerados/TipoListaDeReproduccionTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Enumerados; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class TipoListaDeReproduccionTest { - - public TipoListaDeReproduccionTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of values method, of class TipoListaDeReproduccion. - */ - @Test - public void testValues() { - System.out.println("values"); - TipoListaDeReproduccion[] expResult = {TipoListaDeReproduccion.POR_DEFECTO, TipoListaDeReproduccion.PARTICULAR}; - TipoListaDeReproduccion[] result = TipoListaDeReproduccion.values(); - assertArrayEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of valueOf method, of class TipoListaDeReproduccion. - */ - @Test - public void testValueOf() { - System.out.println("valueOf"); - String name = "POR_DEFECTO"; - TipoListaDeReproduccion expResult = TipoListaDeReproduccion.POR_DEFECTO; - TipoListaDeReproduccion result = TipoListaDeReproduccion.valueOf(name); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} diff --git a/UyTube_aplicacion/test/Logica/Enumerados/TipoValoracionTest.java b/UyTube_aplicacion/test/Logica/Enumerados/TipoValoracionTest.java deleted file mode 100644 index ca066e9..0000000 --- a/UyTube_aplicacion/test/Logica/Enumerados/TipoValoracionTest.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * To change this license header, choose License Headers in Project Properties. - * To change this template file, choose Tools | Templates - * and open the template in the editor. - */ -package Logica.Enumerados; - -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import static org.junit.Assert.*; - -/** - * - * @author Juan - */ -public class TipoValoracionTest { - - public TipoValoracionTest() { - } - - @BeforeClass - public static void setUpClass() { - } - - @AfterClass - public static void tearDownClass() { - } - - @Before - public void setUp() { - } - - @After - public void tearDown() { - } - - /** - * Test of values method, of class TipoValoracion. - */ - @Test - public void testValues() { - System.out.println("values"); - TipoValoracion[] expResult = {TipoValoracion.LIKE, TipoValoracion.DISLIKE}; - TipoValoracion[] result = TipoValoracion.values(); - assertArrayEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - - /** - * Test of valueOf method, of class TipoValoracion. - */ - @Test - public void testValueOf() { - System.out.println("valueOf"); - String name = "LIKE"; - TipoValoracion expResult = TipoValoracion.LIKE; - TipoValoracion result = TipoValoracion.valueOf(name); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - //fail("The test case is a prototype."); - } - -} -- GitLab