コード例 #1
0
 @Test
 public void a_failing_screenshot_records_the_error_message() {
   Screenshot screenshot =
       new Screenshot("step_1.png", "Step 1", 800, new AssertionError("Element not found"));
   assertThat(screenshot.getErrorMessage(), is("Element not found"));
 }
コード例 #2
0
 @Test
 public void a_screenshot_without_an_error_message__returns_an_empty_string() {
   Screenshot screenshot = new Screenshot("step_1.png", "Step 1", 800);
   assertThat(screenshot.getErrorMessage(), is(""));
 }