@Test public void reportGenerator_PathIsNullandTraceisNull() { boolean testResult = jsonreport.reportGenerator(null, null); assertFalse(testResult); }
@Override public boolean reportGenerator(String resultFilePath, AROTraceData results) { if (resultFilePath == null || results == null) { return false; } ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); try { mapper.writeValue(filereader.createFile(resultFilePath), results); return true; } catch (JsonGenerationException e) { LOGGER.error(e.getMessage()); } catch (JsonMappingException e) { LOGGER.error(e.getMessage()); } catch (IOException e) { LOGGER.error(e.getMessage()); } return false; }
JSonReportImpl implements IReport { @Override public boolean reportGenerator(String resultFilePath, AROTraceData results) { if (resultFilePath == null || results == null) { return false; } ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); try { mapper.writeValue(filereader.createFile(resultFilePath), results); return true; } catch (JsonGenerationException e) { LOGGER.error(e.getMessage()); } catch (JsonMappingException e) { LOGGER.error(e.getMessage()); } catch (IOException e) { LOGGER.error(e.getMessage()); } return false; } }
JSonReportImpl implements IReport { @Override public boolean reportGenerator(String resultFilePath, AROTraceData results) { if (resultFilePath == null || results == null) { return false; } ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); try { mapper.writeValue(filereader.createFile(resultFilePath), results); return true; } catch (JsonGenerationException e) { LOGGER.error(e.getMessage()); } catch (JsonMappingException e) { LOGGER.error(e.getMessage()); } catch (IOException e) { LOGGER.error(e.getMessage()); } return false; }  }
JSonReportImpl implements IReport { @Override public boolean reportGenerator(String resultFilePath, AROTraceData results) { if (resultFilePath == null || results == null) { return false; } ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); try { mapper.writeValue(filereader.createFile(resultFilePath), results); return true; } catch (JsonGenerationException e) { LOGGER.error(e.getMessage()); } catch (JsonMappingException e) { LOGGER.error(e.getMessage()); } catch (IOException e) { LOGGER.error(e.getMessage()); } return false; }  @Override boolean reportGenerator(String resultFilePath, AROTraceData results); }
JSonReportImpl implements IReport { @Override public boolean reportGenerator(String resultFilePath, AROTraceData results) { if (resultFilePath == null || results == null) { return false; } ObjectMapper mapper = new ObjectMapper(); mapper.enableDefaultTyping(); try { mapper.writeValue(filereader.createFile(resultFilePath), results); return true; } catch (JsonGenerationException e) { LOGGER.error(e.getMessage()); } catch (JsonMappingException e) { LOGGER.error(e.getMessage()); } catch (IOException e) { LOGGER.error(e.getMessage()); } return false; }  @Override boolean reportGenerator(String resultFilePath, AROTraceData results);  }