Commit 5fd95449 authored by George Adrian Stoica's avatar George Adrian Stoica
Browse files

updates slides for lecture 7

parent 5a528a4a
Pipeline #138875 passed with stages
in 2 minutes and 11 seconds
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment