@Before public void setUp() { cut = new Reasons(); cut.messageLoader = new MessageLoader(); cut.init(); }
@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}")); }
@Test public void testReceivedContextDoesContainInvalidParam() throws Exception { CoreException coreException = cut.receivedContextDoesContainInvalidParam("k", "v"); assertThat(coreException.getMessage(), is("given context contains invalid params k:v")); }