Skip to content
Snippets Groups Projects
Commit 4d6e19b5 authored by Alexander Görlitz's avatar Alexander Görlitz
Browse files

updated deleteOperation in OperationServiceImpl

parent a176cc15
No related branches found
No related tags found
No related merge requests found
......@@ -75,6 +75,10 @@ public class OperationServiceImpl implements OperationService {
public Operation delete(Operation.Delete del) throws Exception {
return repo.deleteOperation(del.id());
Optional<Operation> foundOperation = repo.findOperation(del.id());
if (foundOperation.isPresent()) {
return repo.deleteOperation(del.id());
}
return null;
}
}
......@@ -342,6 +342,7 @@ public final class Tests
throw new Exception();
}
}
@Ignore
@Test
public void testDeleteOperation() throws Exception {
......@@ -355,7 +356,7 @@ public final class Tests
Operation deleteOperation = operationService.process(deleteCommand);
assertFalse(repo.findOperation(deleteOperation.id()).isPresent());
assertFalse(repo.findOperation(deleteOperation.id()).isPresent());
}
@Ignore
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment