Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
dnarvaez27 committed Sep 27, 2017
1 parent 96f8f76 commit f62791f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 6 additions & 6 deletions Proyecto/test/controllers/AlertaControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void testCreate()
alerta.setIdArea(20L);
alerta.setTipo(1);

Result result1 = controller.create(alerta.getId());
Result result = controller.create(alerta.getId());
assertEquals("La alerta no fue creada correctamente.", Http.Status.OK, result.status());
assertEquals("El resultado no es del tipo esperado", "application/json", result.contentType());
assertEquals(UTF_8, result.charset());
Expand All @@ -47,7 +47,7 @@ public void testCreate()

assertEquals("El id de la alerta no es la esperada", (long) alerta.getId(), json.get("id").asLong());
assertEquals("El area de la alerta no es la esperada", (long) alerta.getIdArea(), json.get("area").asLong());
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInteger(),0);
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInt(),0);

}

Expand All @@ -70,7 +70,7 @@ public void testRetrieve() {

assertEquals("El id de la alerta no es la esperada", (long) alerta.getId(), json.get("id").asLong());
assertEquals("El area de la alerta no es la esperada", (long) alerta.getIdArea(), json.get("area").asLong());
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInteger(),0);
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInt(),0);
}

@Test
Expand Down Expand Up @@ -102,7 +102,7 @@ public void testRetrieveAll() {

assertEquals("El id de la alerta no es la esperada", (long) alerta.getId(), json.get("id").asLong());
assertEquals("El area de la alerta no es la esperada", (long) alerta.getIdArea(), json.get("area").asLong());
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInteger(),0);
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInt(),0);
}
}

Expand All @@ -129,11 +129,11 @@ public void testUpdate() {

assertEquals("El id de la alerta no es la esperada", (long) alerta.getId(), json.get("id").asLong());
assertEquals("El area de la alerta no es la esperada", (long) alerta.getIdArea(), json.get("area").asLong());
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInteger(),0);
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInt(),0);

assertEquals("El id de la alerta no es la esperada", (long) alerta.getId(), json.get("id").asLong());
assertEquals("El area de la alerta no es la esperada", (long) alerta.getIdArea(), json.get("area").asLong());
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInteger(),0);
assertEquals("El tipo de la alerta no es la esperada", (int)alerta.getTipo(),json.get("tipo").asInt(),0);

}

Expand Down
2 changes: 0 additions & 2 deletions Proyecto/test/controllers/DatoControllerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import models.Dato;
import org.junit.Before;
import org.junit.Test;
import play.Application;
import play.core.j.JavaResultExtractor;
import play.libs.Json;
import play.mvc.Call;
Expand All @@ -16,7 +15,6 @@
import java.util.List;

import static org.junit.Assert.assertEquals;
import static play.test.Helpers.status;

public class DatoControllerTest {

Expand Down

0 comments on commit f62791f

Please sign in to comment.