public JsonToken peek() { try { return reader.peek(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public Attribute getAttribute(String attribute) { if (entity == null) { throw new CukesRuntimeException("Entity was not loaded"); } return entity.get(attribute); }
public Attribute getAttribute(String attribute) { if (entity == null) { throw new CukesRuntimeException("Entity was not loaded"); } return entity.get(attribute); }
public String nextString() { try { return reader.nextString(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void nextName() { try { reader.nextName(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void beginObject() { try { reader.beginObject(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void nextName() { try { reader.nextName(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void beginObject() { try { reader.beginObject(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void endObject() { try { reader.endObject(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public String nextString() { try { return reader.nextString(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void endObject() { try { reader.endObject(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
private int mapPatternCharacter(int ch) { Supplier<Integer> characterSupplier = randomGenerators.get((char) ch); if (characterSupplier == null) throw new CukesRuntimeException("Invalid password pattern character: " + ch + ". Pattern should contain combination of A,a,0"); return characterSupplier.get(); } }
public MockServerClient getMockServerClient(String serviceName) { return services.computeIfAbsent(serviceName, key -> { String availableMockServices = services.keySet().stream().collect(Collectors.joining(", ")); throw new CukesRuntimeException("Unable to find http mock service by name:" + key + ". " + "Available mock services are: {" + availableMockServices + "}"); }); }
public Attribute getNotNullAttribute(String attribute) { if (entity == null) { throw new CukesRuntimeException("Entity was not loaded"); } Attribute attr = entity.get(attribute); assertThat("Expected that attribute '" + attribute + "' will be present", attr, notNullValue()); return attr; }
public boolean nextBoolean() { try { return reader.nextBoolean(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public Attribute getNotNullAttribute(String attribute) { if (entity == null) { throw new CukesRuntimeException("Entity was not loaded"); } Attribute attr = entity.get(attribute); assertThat("Expected that attribute '" + attribute + "' will be present", attr, notNullValue()); return attr; }
public void nextNull() { try { reader.nextNull(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public boolean nextBoolean() { try { return reader.nextBoolean(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void endArray() { try { reader.endArray(); } catch (IOException e) { throw new CukesRuntimeException(e); } }
public void close() { if (context != null) { try { context.close(); } catch (NamingException e) { throw new CukesRuntimeException(e); } } context = null; }