Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Rajiv Prabhakar
cava
Commits
b8c532d5
Commit
b8c532d5
authored
Jul 05, 2017
by
Rajiv Prabhakar
Browse files
v1.7.1 patch: FileUtilc unit test fix, to enable gitlab-ci support
parent
ac9f00cc
Pipeline
#9586713
passed with stage
in 1 minute and 16 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
pom.xml
pom.xml
+1
-1
src/test/java/org/rajivprab/cava/FileUtilcTest.java
src/test/java/org/rajivprab/cava/FileUtilcTest.java
+11
-3
No files found.
pom.xml
View file @
b8c532d5
...
...
@@ -6,7 +6,7 @@
<groupId>
com.rajivprab
</groupId>
<artifactId>
cava
</artifactId>
<version>
1.7.
0
</version>
<version>
1.7.
1
</version>
<name>
Cava: Clean Java
</name>
<description>
A library that enables users to write minimal, clean and simple Java code
</description>
...
...
src/test/java/org/rajivprab/cava/FileUtilcTest.java
View file @
b8c532d5
...
...
@@ -6,6 +6,9 @@ import org.junit.Test;
import
org.rajivprab.cava.IOUtilc.IoException
;
import
java.io.File
;
import
java.io.FileWriter
;
import
java.io.IOException
;
import
java.io.Writer
;
/**
* Unit tests for FileUtilc
...
...
@@ -34,11 +37,16 @@ public class FileUtilcTest extends TestBase {
}
}
// Test may need to be updated to work on all other systems
@Test
public
void
readSystemFile
()
{
Truth
.
assertThat
(
FileUtilc
.
readFileToString
(
new
File
(
"/etc/defaults/periodic.conf"
)))
.
contains
(
"# Daily options"
);
File
file
=
new
File
(
"/tmp/tmp-cava-readSystemFile.txt"
);
file
.
deleteOnExit
();
try
(
Writer
writer
=
new
FileWriter
(
file
))
{
writer
.
write
(
"readSystemFile test"
);
}
catch
(
IOException
e
)
{
throw
new
IoException
(
e
);
}
Truth
.
assertThat
(
FileUtilc
.
readFileToString
(
file
)).
contains
(
"readSystemFile test"
);
}
@Test
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment