summaryrefslogtreecommitdiffstats
path: root/src/main/java/derms/util/LogComparator.java
blob: 6b629a6432b0a8ac1ec4e18809ed3686135298ea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
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;
    }
}