Skip to content
Snippets Groups Projects
Commit 65e8826a authored by Hugo Dutoit's avatar Hugo Dutoit
Browse files

delete not implemented

parent 2cd818e1
Branches
No related tags found
No related merge requests found
Pipeline #8336 passed
......@@ -28,5 +28,8 @@ public interface TacheDAO {
@SqlQuery("select * from taches where id=?")
@RegisterBeanMapper(Tache.class)
Tache getById(String id);
@SqlUpdate("delete from taches where id=?")
int deleteTacheById(String id);
}
......@@ -27,7 +27,7 @@ public class TodoService {
}
public int deleteTache(String id) {
return 0 ;
return taches.deleteTacheById(id);
}
public void updateTache(Tache tache) {
......
......@@ -135,19 +135,6 @@ public class TodoRessourceTest extends JerseyTest {
@Test
public void post_with_form_data_should_return_201_location_and_task() {
// CreationTacheDTO dto = new CreationTacheDTO();
// dto.setNom("test");
// dto.setDescription("description test");
// Response response = target("taches").request().post(Entity.json(dto));
// assertEquals(Response.Status.CREATED.getStatusCode(), response.getStatus());
// Tache tache = response.readEntity(Tache.class);
// assertEquals(target("taches").getUri().toString() + "/" + tache.getId().toString(),
// response.getHeaderString("Location"));
// assertEquals(dto.getNom(), tache.getNom());
// assertEquals(dto.getDescription(), tache.getDescription());
Tache tache = new Tache();
tache.setNom("plop");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment