aboutsummaryrefslogtreecommitdiffstats
path: root/utils/src/test/java/org/onap/policy/common/utils/resources/TextFileUtilsTest.java
AgeCommit message (Collapse)AuthorFilesLines
2021-09-02Create methods for creating temp filesJim Hahn1-13/+60
Created utility methods to create temp files and set default permissions. These can be used in other repos to satisfy sonar. Also added code to close streams and clean up temp files created by some junit tests. Modified to use IOUtils to read a stream. Issue-ID: POLICY-3289 Change-Id: Ic83e4f4d7745be7b37ebb42bf1d81e303d8dadc9 Signed-off-by: Jim Hahn <jrh3@att.com>
2020-06-17Cleanup various sonar issues in policy-commonJim Hahn1-1/+1
Addressed the following issues: - unused imports - unused method parameters - use assertEquals, assertSame instead of assertTrue - provide the parametrized type for this generic Also fixed some checkstyle issues: - removed blank lines between "import" groups Issue-ID: POLICY-2650 Change-Id: I004bb650ac10c49ccd0fc405f6959896fec39f9b Signed-off-by: Jim Hahn <jrh3@att.com>
2020-01-22Create path to text file being createdliamfallon1-1/+21
If you try and write to a file where part of the pat does not exist, that path should be created. Issue-ID: POLICY-1581 Change-Id: Ifb7a4ff4e1804814b6679956f0c58d5ac026c4a4 Signed-off-by: liamfallon <liam.fallon@est.tech>
2019-03-14Add support for TOSCA JSON Parsingliamfallon1-0/+53
Added a getter to allow the Gson object to be retrieved from a GSON message body handler, useful for testing. Moved the TextFileUtils utility class from APEX utilites to policy common utils Issue-ID: POLICY-1195 Change-Id: I7c8074e8177a90b292c6dfd6e7f0d352063818e7 Signed-off-by: liamfallon <liam.fallon@est.tech>