private void compare() { if (typeAdapter.equals(expected, result)) { right(cell); } else { wrong(cell, typeAdapter.toString(result)); } }
private void compare() { if (typeAdapter.equals(expected, result)) { right(cell); } else { wrong(cell, typeAdapter.toString(result)); } }
private void handleErrorInCell(TypeAdapter a, Parse cell) { try { Object result = a.invoke(); wrong(cell, a.toString(result)); } catch (IllegalAccessException e) { exception(cell, e); } catch (Exception e) { right(cell); } }
private void handleErrorInCell(TypeAdapter a, Parse cell) { try { Object result = a.invoke(); wrong(cell, a.toString(result)); } catch (IllegalAccessException e) { exception(cell, e); } catch (Exception e) { right(cell); } }
@Test public void shouldCallFixtureRightOnCellRight() { reportingSystem.addCell(createCellResult("*cell-demo-1*", SUCCESS)); verify(fixture).right(captor.capture()); assertThat(captor.getValue().body, hasToString("*cell-demo-1*")); }
private void tryRelationalMatch() { Class<?> adapterType = typeAdapter.type; FitFailureException cantParseException = new CouldNotParseFitFailureException(cell.text(), adapterType .getName()); if (result != null) { FitMatcher matcher = new FitMatcher(cell.text(), result); try { if (matcher.matches()) right(cell); else wrong(cell); cell.body = matcher.message(); } catch (FitMatcherException fme) { exception(cell, cantParseException); } catch (Exception e) { exception(cell, e); } } else { // TODO-RcM Is this always accurate? exception(cell, cantParseException); } } }
private void tryRelationalMatch() { Class<?> adapterType = typeAdapter.type; FitFailureException cantParseException = new CouldNotParseFitFailureException(cell.text(), adapterType .getName()); if (result != null) { FitMatcher matcher = new FitMatcher(cell.text(), result); try { if (matcher.matches()) right(cell); else wrong(cell); cell.body = matcher.message(); } catch (FitMatcherException fme) { exception(cell, cantParseException); } catch (Exception e) { exception(cell, e); } } else { // TODO-RcM Is this always accurate? exception(cell, cantParseException); } } }