@@ -15,7 +15,7 @@ Feature: Aggregate class is an abstract class to keep summary of a repository st
15
15
When I call listFiles method
16
16
Then I get an empty list in response
17
17
18
- Scenario : commits of type modify should aggregate data for a file-key
18
+ Scenario : commits of type modify should aggregate data for a file-key (year-quarter)
19
19
Given I use a TestAggregate class
20
20
When I use a 'year-quarter' strategy
21
21
And I add commit of type 'modify' with filename 'src/file-1' and commite date '2023-05-04'
@@ -25,4 +25,28 @@ Feature: Aggregate class is an abstract class to keep summary of a repository st
25
25
When I call listAggregates method for 'src/file-1'
26
26
Then I get a list with 1 value in response
27
27
When I call getValue method for 'src/file-1' and '2023-Q2'
28
+ Then I get a number with value 4 in response
29
+
30
+ Scenario : commits of type modify should aggregate data for a file-key (year)
31
+ Given I use a TestAggregate class
32
+ When I use a 'year' strategy
33
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2023-05-04'
34
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2023-05-03'
35
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2023-05-02'
36
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2023-05-01'
37
+ When I call listAggregates method for 'src/file-1'
38
+ Then I get a list with 1 value in response
39
+ When I call getValue method for 'src/file-1' and '2023'
40
+ Then I get a number with value 4 in response
41
+
42
+ Scenario : commits of type modify should aggregate data for a file-key (all-time)
43
+ Given I use a TestAggregate class
44
+ When I use a 'all-time' strategy
45
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2022-05-04'
46
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2023-05-03'
47
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2024-05-02'
48
+ And I add commit of type 'modify' with filename 'src/file-1' and commite date '2025-05-01'
49
+ When I call listAggregates method for 'src/file-1'
50
+ Then I get a list with 1 value in response
51
+ When I call getValue method for 'src/file-1' and 'all-time'
28
52
Then I get a number with value 4 in response
0 commit comments