diff options
| author | BMatajsz <90217645+BMatajsz@users.noreply.github.com> | 2024-12-03 03:30:34 -0500 |
|---|---|---|
| committer | BMatajsz <90217645+BMatajsz@users.noreply.github.com> | 2024-12-03 03:30:34 -0500 |
| commit | d6067d28ce2a22c64cb595af6bca48c81b1664da (patch) | |
| tree | 76761ebbccca0e5c1fdcfee48a0bc7a235a8150f /src/main/java/derms/util | |
| parent | d6bef622a2bb1c7f16941ef067fd878bbc05caa5 (diff) | |
| download | soen423-d6067d28ce2a22c64cb595af6bca48c81b1664da.zip | |
Test progress
Diffstat (limited to 'src/main/java/derms/util')
| -rw-r--r-- | src/main/java/derms/util/LogComparator.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/derms/util/LogComparator.java b/src/main/java/derms/util/LogComparator.java new file mode 100644 index 0000000..6b629a6 --- /dev/null +++ b/src/main/java/derms/util/LogComparator.java @@ -0,0 +1,13 @@ +package derms.util; + +import java.io.*; +import java.nio.file.*; + +public class LogComparator { + public static boolean compareLineCounts(String actualFilePath, String expectedFilePath) throws IOException { + long actualLineCount = Files.lines(Paths.get(actualFilePath)).count(); + long expectedLineCount = Files.lines(Paths.get(expectedFilePath)).count(); + + return actualLineCount == expectedLineCount; + } +}
\ No newline at end of file |