Пример #1
0
  protected void assertMultipleOutputValues(DmnDecisionRuleResult decisionRuleResult) {
    assertThat(decisionRuleResult.size()).isEqualTo(2);

    String value = (String) decisionRuleResult.get("firstOutput");
    assertThat(value).isEqualTo("multipleValues1");

    value = (String) decisionRuleResult.get("secondOutput");
    assertThat(value).isEqualTo("multipleValues2");

    value = decisionRuleResult.getFirstEntry();
    assertThat(value).isEqualTo("multipleValues1");

    try {
      decisionRuleResult.getSingleEntry();
      Fail.failBecauseExceptionWasNotThrown(DmnDecisionResultException.class);
    } catch (DmnDecisionResultException e) {
      assertThat(e)
          .hasMessageStartingWith("DMN-01007")
          .hasMessageContaining("multipleValues1")
          .hasMessageContaining("multipleValues2");
    }
  }
 @Test
 public void should_include_message_built_with_given_throwable_name() {
   thrown.expectAssertionError("Expected OutOfMemoryError to be thrown");
   Fail.failBecauseExceptionWasNotThrown(OutOfMemoryError.class);
 }
 @Test
 public void should_include_message_built_with_given_exception_name() {
   thrown.expectAssertionError("Expected NullPointerException to be thrown");
   Fail.failBecauseExceptionWasNotThrown(NullPointerException.class);
 }