Ejemplo n.º 1
0
 @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'");
   }
 }
Ejemplo n.º 2
0
 @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(), __);
   }
 }