コード例 #1
0
  @Before
  public void setUp() {

    cut = new Reasons();
    cut.messageLoader = new MessageLoader();
    cut.init();
  }
コード例 #2
0
  @Test
  public void testReceivedContextDoesContainMultipleInvalidParams() throws Exception {

    CoreException coreException =
        cut.receivedContextDoesContainMultipleInvalidParams(
            new HashMap<String, Object>() {
              {
                put("key1", "value");
                put("key2", 3);
              }
            });

    assertThat(
        coreException.getMessage(),
        is("given context contains invalid params {key1=value, key2=3}"));
  }
コード例 #3
0
  @Test
  public void testReceivedContextDoesContainInvalidParam() throws Exception {

    CoreException coreException = cut.receivedContextDoesContainInvalidParam("k", "v");
    assertThat(coreException.getMessage(), is("given context contains invalid params k:v"));
  }