@Koan public void insufficientArgumentsToStringFormatCausesAnError() { try { String.format("%s %s %s", "a", "b"); fail("No Exception was thrown!"); } catch (Exception e) { assertEquals(e.getClass(), java.util.MissingFormatArgumentException.class); assertEquals(e.getMessage(), "Format specifier 's'"); } }
@Koan public void insufficientArgumentsToStringFormatCausesAnError() { try { String.format("%s %s %s", "a", "b"); fail("No Exception was thrown!"); } catch (Exception e) { assertEquals(e.getClass(), __); assertEquals(e.getMessage(), __); } }