Skip to content

Commit

Permalink
Fixing copy/paste typo and adding unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
nemanja-6 committed Sep 25, 2024
1 parent e2e5243 commit 28fc70e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ public File exportLogDataToJSON() throws LogDataExportToFileException {
/**
* Exports the current LogData to a standard JSON file.
*
* @param in_jsonFileName a filename to store the CSV export
* @param in_jsonFileName a filename to store the JSON export
* @return a JSON file containing the LogData
*/
public File exportLogDataToJSON(String in_jsonFileName) throws LogDataExportToFileException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1573,4 +1573,12 @@ public void exportDataToJSON_negativeEmptyData() throws LogDataExportToFileExcep
File l_shouldBeEmpty = l_emptyLogData.exportLogDataToJSON();
assertThat("The returned file should not exist", l_shouldBeEmpty, Matchers.nullValue());
}

@Test
public void exportDataToJSON_negativeEmptyDataWithFileName() throws LogDataExportToFileException {
String givenFileName = "JSONreport";
LogData<GenericEntry> l_emptyLogData = new LogData<>();
File l_shouldBeEmpty = l_emptyLogData.exportLogDataToJSON(givenFileName);
assertThat("The returned file should not exist", l_shouldBeEmpty, Matchers.nullValue());
}
}

0 comments on commit 28fc70e

Please sign in to comment.