Skip to content

Commit

Permalink
feat(#2): FixedReviewsTest fix
Browse files Browse the repository at this point in the history
  • Loading branch information
h1alexbel committed Apr 1, 2024
1 parent 7c549b0 commit d58bca7
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
final class FixedReviewsTest {

@Test
void collectsAllIds() throws Exception {
void collectsIdsAndBodies() throws Exception {
final JsonArray reviews = new FixedReviews(
() -> Json.createReader(
new InputStreamReader(
Expand All @@ -51,41 +51,14 @@ void collectsAllIds() throws Exception {
)
).readArray()
).value();
final List<Integer> expected = new ListOf<>(
1_928_092_753,
1_933_376_078,
1_933_400_866,
1_933_423_242,
1_934_365_729,
1_936_499_773,
1_937_766_798,
1_937_769_165,
1_938_765_378,
1_941_381_055,
1_942_346_249,
1_942_473_609,
1_942_543_997,
1_942_546_920,
1_943_201_197,
1_944_125_139,
1_944_149_138,
1_944_162_704,
1_945_559_698,
1_945_588_726,
1_945_825_481,
1_957_939_991,
1_958_081_438,
1_958_089_833,
1_958_101_405,
1_958_244_013,
1_958_387_750,
1_958_419_033,
1_958_445_820,
1_958_450_376
);
final JsonArray expected = Json.createReader(
new ResourceOf(
"git/tracehub/codereview/action/github/fixed-review.json"
).stream()
).readArray();
MatcherAssert.assertThat(
String.format(
"Collected identifiers (%s) do not match with expected (%s)",
"Collected JSON (%s) does not match with expected (%s)",
reviews,
expected
),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
[
{
"id": 1928092753,
"body": "@Yanich96 Please, check all the grammar mistakes in this text."
},
{
"id": 1933376078,
"body": ""
},
{
"id": 1933400866,
"body": ""
},
{
"id": 1933423242,
"body": ""
},
{
"id": 1934365729,
"body": ""
},
{
"id": 1936499773,
"body": ""
},
{
"id": 1937766798,
"body": ""
},
{
"id": 1937769165,
"body": ""
},
{
"id": 1938765378,
"body": "@Yanich96 Could you please link this PR with the issue you are trying to solve?"
},
{
"id": 1941381055,
"body": ""
},
{
"id": 1942346249,
"body": ""
},
{
"id": 1942473609,
"body": ""
},
{
"id": 1942543997,
"body": ""
},
{
"id": 1942546920,
"body": ""
},
{
"id": 1943201197,
"body": ""
},
{
"id": 1944125139,
"body": ""
},
{
"id": 1944149138,
"body": ""
},
{
"id": 1944162704,
"body": ""
},
{
"id": 1945559698,
"body": ""
},
{
"id": 1945588726,
"body": ""
},
{
"id": 1945825481,
"body": ""
},
{
"id": 1957939991,
"body": ""
},
{
"id": 1958081438,
"body": ""
},
{
"id": 1958089833,
"body": ""
},
{
"id": 1958101405,
"body": ""
},
{
"id": 1958244013,
"body": ""
},
{
"id": 1958387750,
"body": ""
},
{
"id": 1958419033,
"body": ""
},
{
"id": 1958445820,
"body": ""
},
{
"id": 1958450376,
"body": ""
}
]

0 comments on commit d58bca7

Please sign in to comment.