Skip to content

Commit 8036cfc

Browse files
Adrià Maneromikededo
authored andcommitted
fix: fix tests after changes
1 parent e528ef5 commit 8036cfc

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/main/java/io/pakland/mdas/githubstats/domain/entity/CommitAggregation.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ public class CommitAggregation implements CSVExportable {
1313
public static CommitAggregation aggregate(List<Commit> commits) {
1414
CommitAggregation commitAggregation = new CommitAggregation();
1515
commitAggregation.numCommits = (int) commits.stream().distinct().count();
16-
commitAggregation.linesAdded = commits.stream().mapToInt(Commit::getAdditions).sum();
17-
commitAggregation.linesRemoved = commits.stream().mapToInt(Commit::getDeletions).sum();
1816
return commitAggregation;
1917
}
2018

2119
public int getNumCommits() {
2220
return numCommits;
2321
}
2422

25-
public int getLinesAdded() { return linesAdded; }
23+
public int getLinesAdded() {
24+
return linesAdded;
25+
}
2626

27-
public int getLinesRemoved() { return linesRemoved; }
27+
public int getLinesRemoved() {
28+
return linesRemoved;
29+
}
2830

2931
@Override
3032
public String toCSV() {

src/main/java/io/pakland/mdas/githubstats/domain/entity/PullRequest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import io.pakland.mdas.githubstats.domain.enums.PullRequestState;
44
import java.time.Instant;
55
import java.util.*;
6-
import java.util.stream.Collectors;
76
import lombok.*;
87

98
@Data

src/main/java/io/pakland/mdas/githubstats/infrastructure/github/model/GitHubCommitDTO.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
import lombok.Data;
1010
import lombok.NoArgsConstructor;
1111

12+
import java.util.Map;
13+
1214
@Data
1315
@NoArgsConstructor
1416
@AllArgsConstructor

0 commit comments

Comments
 (0)