Skip to content
Snippets Groups Projects
Commit 5fd95449 authored by George Adrian Stoica's avatar George Adrian Stoica
Browse files

updates slides for lecture 7

parent 5a528a4a
No related branches found
No related tags found
No related merge requests found
Pipeline #138875 passed
......@@ -217,11 +217,29 @@ public class FoobarTest {
|===
== Expecting exceptions (1)
``` java
@Test
void testAssertingExpectedException() {
Assertions.assertThrows(<ExpectedException.class>, () -> {
<code expected to throw exception>;
});
}
```
== Expecting exceptions (2)
- if the code throws
** the exception class that is expected the the test will PASS
** a descendent class exception that is expected the the test will PASS
** a different exception type the test will FAIL
** throws no exception the test will FAIL
[background-color = "#124990"]
[color = "#fff6d5"]
== Testing in todo-list example
include::{includedir}footer.adoc[]
\ No newline at end of file
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