forked from gitlab4j/gitlab4j-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestGitLabApiBeans.java
More file actions
818 lines (684 loc) · 31 KB
/
TestGitLabApiBeans.java
File metadata and controls
818 lines (684 loc) · 31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
/*
* The MIT License (MIT)
*
* Copyright (c) 2017-2020 Greg Messner <greg@messners.com>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software.json"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package org.gitlab4j.models;
import static org.gitlab4j.models.JsonUtils.compareJson;
import static org.gitlab4j.models.JsonUtils.unmarshalResource;
import static org.gitlab4j.models.JsonUtils.unmarshalResourceList;
import static org.gitlab4j.models.JsonUtils.unmarshalResourceMap;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.List;
import java.util.Map;
import org.gitlab4j.api.models.*;
import org.gitlab4j.api.models.Package;
import org.gitlab4j.api.services.JiraService;
import org.gitlab4j.api.services.SlackService;
import org.gitlab4j.api.webhook.ExternalStatusCheckEvent;
import org.junit.jupiter.api.Test;
public class TestGitLabApiBeans {
@Test
public void testAccessRequest() throws Exception {
AccessRequest accessRequest = unmarshalResource(AccessRequest.class, "access-request.json");
assertTrue(compareJson(accessRequest, "access-request.json"));
}
@Test
public void testApplications() throws Exception {
List<Application> applications = unmarshalResourceList(Application.class, "applications.json");
assertTrue(compareJson(applications, "applications.json"));
}
@Test
public void testAssociations() throws Exception {
Associations associations = unmarshalResource(Associations.class, "associations.json");
assertTrue(compareJson(associations, "associations.json"));
}
@Test
public void testAuditEvent() throws Exception {
List<AuditEvent> auditEvents = unmarshalResourceList(AuditEvent.class, "audit-events.json");
assertTrue(compareJson(auditEvents, "audit-events.json"));
}
@Test
public void testAwardEmoji() throws Exception {
AwardEmoji awardEmoji = unmarshalResource(AwardEmoji.class, "award-emoji.json");
assertTrue(compareJson(awardEmoji, "award-emoji.json"));
}
@Test
public void testBadges() throws Exception {
List<Badge> badges = unmarshalResourceList(Badge.class, "badges.json");
assertTrue(compareJson(badges, "badges.json"));
}
@Test
public void testBlame() throws Exception {
List<Blame> blame = unmarshalResourceList(Blame.class, "blame.json");
assertTrue(compareJson(blame, "blame.json"));
}
@Test
public void testProjectBoard() throws Exception {
List<Board> boards = unmarshalResourceList(Board.class, "project-board.json");
assertTrue(compareJson(boards, "project-board.json"));
}
@Test
public void testGroupBoard() throws Exception {
List<Board> boards = unmarshalResourceList(Board.class, "group-board.json");
assertTrue(compareJson(boards, "group-board.json"));
}
@Test
public void testGroupEpicBoard() throws Exception {
Board board = unmarshalResource(Board.class, "group-epic-board.json");
assertTrue(compareJson(board, "group-epic-board.json"));
}
@Test
public void testBranch() throws Exception {
Branch branch = unmarshalResource(Branch.class, "branch.json");
assertTrue(compareJson(branch, "branch.json"));
branch = unmarshalResource(Branch.class, "bad-branch.json");
assertTrue(!Branch.isValid(branch));
}
@Test
public void testCreateRunnerResponse() throws Exception {
CreateRunnerResponse r = unmarshalResource(CreateRunnerResponse.class, "created-runner-response.json");
assertTrue(compareJson(r, "created-runner-response.json"));
}
@Test
public void testCreatedChildEpic() throws Exception {
CreatedChildEpic childEpic = unmarshalResource(CreatedChildEpic.class, "created-child-epic.json");
assertTrue(compareJson(childEpic, "created-child-epic.json"));
}
@Test
public void testChildEpic() throws Exception {
ChildEpic childEpic = unmarshalResource(ChildEpic.class, "child-epic.json");
assertTrue(compareJson(childEpic, "child-epic.json"));
}
@Test
public void testCommit() throws Exception {
Commit commit = unmarshalResource(Commit.class, "commit.json");
assertTrue(compareJson(commit, "commit.json"));
}
@Test
public void testCommitPayload() throws Exception {
CommitPayload commitPayload = unmarshalResource(CommitPayload.class, "commit-payload.json");
assertTrue(compareJson(commitPayload, "commit-payload.json"));
}
@Test
public void testCommitStatus() throws Exception {
CommitStatus commitStatus = unmarshalResource(CommitStatus.class, "commit-status.json");
assertTrue(compareJson(commitStatus, "commit-status.json"));
}
@Test
public void testCompareResults() throws Exception {
CompareResults compareResults = unmarshalResource(CompareResults.class, "compare-results.json");
assertTrue(compareJson(compareResults, "compare-results.json"));
}
@Test
public void testContributors() throws Exception {
List<Contributor> contributors = unmarshalResourceList(Contributor.class, "contributors.json");
assertTrue(compareJson(contributors, "contributors.json"));
}
@Test
public void testDiff() throws Exception {
List<Diff> diffs = unmarshalResourceList(Diff.class, "diff.json");
assertTrue(compareJson(diffs, "diff.json"));
}
@Test
public void testComment() throws Exception {
Comment comment = unmarshalResource(Comment.class, "comment.json");
assertTrue(compareJson(comment, "comment.json"));
}
@Test
public void testDeployment() throws Exception {
Deployment deployment = unmarshalResource(Deployment.class, "deployment.json");
assertTrue(compareJson(deployment, "deployment.json"));
}
@Test
public void testDeployTokens() throws Exception {
List<DeployToken> deployTokens = unmarshalResourceList(DeployToken.class, "deploy-tokens.json");
assertTrue(compareJson(deployTokens, "deploy-tokens.json"));
}
@Test
public void testEmails() throws Exception {
List<Email> emails = unmarshalResourceList(Email.class, "emails.json");
assertTrue(compareJson(emails, "emails.json"));
}
@Test
public void testEnvironment() throws Exception {
Environment environment = unmarshalResource(Environment.class, "environment.json");
assertTrue(compareJson(environment, "environment.json"));
}
@Test
public void testEpic() throws Exception {
Epic epic = unmarshalResource(Epic.class, "epic.json");
assertTrue(compareJson(epic, "epic.json"));
}
@Test
public void testEpicIssue() throws Exception {
EpicIssue epicIssue = unmarshalResource(EpicIssue.class, "epic-issue.json");
assertTrue(compareJson(epicIssue, "epic-issue.json"));
}
@Test
public void testEpicIssueLink() throws Exception {
EpicIssueLink epicIssueLink = unmarshalResource(EpicIssueLink.class, "epic-issue-link.json");
assertTrue(compareJson(epicIssueLink, "epic-issue-link.json"));
}
@Test
public void testEvent() throws Exception {
Event event = unmarshalResource(Event.class, "event.json");
assertTrue(compareJson(event, "event.json"));
}
@Test
public void testEvents() throws Exception {
List<Event> events = unmarshalResourceList(Event.class, "events.json");
assertTrue(compareJson(events, "events.json"));
}
@Test
public void testExportStatus() throws Exception {
ExportStatus exportStatus = unmarshalResource(ExportStatus.class, "export-status.json");
assertTrue(compareJson(exportStatus, "export-status.json"));
}
@Test
public void testExternalStatusChecks() throws Exception {
List<ExternalStatusCheck> externalStatusChecks =
unmarshalResourceList(ExternalStatusCheck.class, "external-status-checks.json");
assertTrue(compareJson(externalStatusChecks, "external-status-checks.json"));
}
@Test
public void testExternalStatusCheckEvent() throws Exception {
ExternalStatusCheckEvent externalStatusCheckEvent =
unmarshalResource(ExternalStatusCheckEvent.class, "external-status-check-event.json");
assertTrue(compareJson(externalStatusCheckEvent, "external-status-check-event.json"));
}
@Test
public void testExternalStatusCheckResult() throws Exception {
ExternalStatusCheckResult externalStatusCheckResult =
unmarshalResource(ExternalStatusCheckResult.class, "external-status-check-result.json");
assertTrue(compareJson(externalStatusCheckResult, "external-status-check-result.json"));
}
@Test
public void testExternalStatusCheckStatuses() throws Exception {
List<ExternalStatusCheckStatus> externalStatusCheckStatuses =
unmarshalResourceList(ExternalStatusCheckStatus.class, "external-status-check-statuses.json");
assertTrue(compareJson(externalStatusCheckStatuses, "external-status-check-statuses.json"));
}
@Test
public void testFileUpload() throws Exception {
FileUpload fileUpload = unmarshalResource(FileUpload.class, "file-upload.json");
assertTrue(compareJson(fileUpload, "file-upload.json"));
}
@Test
public void testGitLabCiTemplateElements() throws Exception {
List<GitLabCiTemplateElement> ciYamlTemplatesElements =
unmarshalResourceList(GitLabCiTemplateElement.class, "gitlab-ci-template-elements.json");
assertTrue(compareJson(ciYamlTemplatesElements, "gitlab-ci-template-elements.json"));
}
@Test
public void testGitLabCiTemplate() throws Exception {
GitLabCiTemplate ciYamlTemplate = unmarshalResource(GitLabCiTemplate.class, "gitlab-ci-template.json");
assertTrue(compareJson(ciYamlTemplate, "gitlab-ci-template.json"));
}
@Test
public void testGpgSignature() throws Exception {
GpgSignature gpgSignature = unmarshalResource(GpgSignature.class, "gpg-signature.json");
assertTrue(compareJson(gpgSignature, "gpg-signature.json"));
}
@Test
public void testIssuesStatistics() throws Exception {
IssuesStatistics statistics = unmarshalResource(IssuesStatistics.class, "issues-statistics.json");
assertTrue(compareJson(statistics, "issues-statistics.json"));
}
@Test
public void testProjectFetches() throws Exception {
ProjectFetches fetches = unmarshalResource(ProjectFetches.class, "project-fetches.json");
assertTrue(compareJson(fetches, "project-fetches.json"));
}
@Test
public void testGroup() throws Exception {
Group group = unmarshalResource(Group.class, "group.json");
assertTrue(compareJson(group, "group.json"));
}
@Test
public void testHealthCheckInfo() throws Exception {
HealthCheckInfo healthCheck = unmarshalResource(HealthCheckInfo.class, "health-check.json");
assertTrue(compareJson(healthCheck, "health-check.json"));
}
@Test
public void testHealthCheckInfoNew() throws Exception {
HealthCheckInfo healthCheck = unmarshalResource(HealthCheckInfo.class, "health-check-new.json");
assertTrue(compareJson(healthCheck, "health-check.json"));
}
@Test
public void testImportStatus() throws Exception {
ImportStatus importStatus = unmarshalResource(ImportStatus.class, "import-status.json");
assertTrue(compareJson(importStatus, "import-status.json"));
}
@Test
public void testIssue() throws Exception {
Issue issue = unmarshalResource(Issue.class, "issue.json");
assertTrue(compareJson(issue, "issue.json"));
}
@Test
public void testIssueLink() throws Exception {
IssueLink issueLink = unmarshalResource(IssueLink.class, "issue-link.json");
assertTrue(compareJson(issueLink, "issue-link.json"));
}
@Test
public void testIssuesClosedBy() throws Exception {
List<Issue> issues = unmarshalResourceList(Issue.class, "issues-closed-by-mr.json");
assertTrue(compareJson(issues, "issues-closed-by-mr.json"));
}
@Test
public void testLabelEvents() throws Exception {
List<LabelEvent> events = unmarshalResourceList(LabelEvent.class, "label-events.json");
assertTrue(compareJson(events, "label-events.json"));
}
@Test
public void testLinkedIssues() throws Exception {
List<LinkedIssue> linkedIssues = unmarshalResourceList(LinkedIssue.class, "linked-issues.json");
assertTrue(compareJson(linkedIssues, "linked-issues.json"));
}
@Test
public void testLinks() throws Exception {
List<Link> links = unmarshalResourceList(Link.class, "links.json");
assertTrue(compareJson(links, "links.json"));
}
@Test
public void testCommitDiscussions() throws Exception {
List<Discussion> discussions = unmarshalResourceList(Discussion.class, "commit-discussions.json");
assertTrue(compareJson(discussions, "commit-discussions.json"));
}
@Test
public void testEpicDiscussions() throws Exception {
List<Discussion> discussions = unmarshalResourceList(Discussion.class, "epic-discussions.json");
assertTrue(compareJson(discussions, "epic-discussions.json"));
}
@Test
public void testIssueDiscussions() throws Exception {
List<Discussion> discussions = unmarshalResourceList(Discussion.class, "issue-discussions.json");
assertTrue(compareJson(discussions, "issue-discussions.json"));
}
@Test
public void testMergeRequestDiscussions() throws Exception {
List<Discussion> discussions = unmarshalResourceList(Discussion.class, "merge-request-discussions.json");
assertTrue(compareJson(discussions, "merge-request-discussions.json"));
}
@Test
public void testPackages() throws Exception {
List<Package> packages = unmarshalResourceList(Package.class, "packages.json");
assertTrue(compareJson(packages, "packages.json"));
}
@Test
public void testPackageFiles() throws Exception {
List<PackageFile> packageFiles = unmarshalResourceList(PackageFile.class, "package-files.json");
assertTrue(compareJson(packageFiles, "package-files.json"));
}
@Test
public void testSnippetDiscussions() throws Exception {
List<Discussion> discussions = unmarshalResourceList(Discussion.class, "snippet-discussions.json");
assertTrue(compareJson(discussions, "snippet-discussions.json"));
}
@Test
public void testPipeline() throws Exception {
Pipeline pipeline = unmarshalResource(Pipeline.class, "pipeline.json");
assertTrue(compareJson(pipeline, "pipeline.json"));
}
@Test
public void testPipelineSchedule() throws Exception {
PipelineSchedule pipelineSchedule = unmarshalResource(PipelineSchedule.class, "pipeline-schedule.json");
assertTrue(compareJson(pipelineSchedule, "pipeline-schedule.json"));
}
@Test
public void testPipelineTestReportSummary() throws Exception {
TestReportSummary testReportSummary =
unmarshalResource(TestReportSummary.class, "pipeline-test-report-summary.json");
assertTrue(compareJson(testReportSummary, "pipeline-test-report-summary.json"));
}
@Test
public void testPipelineVariables() throws Exception {
List<Variable> variables = unmarshalResourceList(Variable.class, "pipeline-variables.json");
assertTrue(compareJson(variables, "pipeline-variables.json"));
}
@Test
public void testProjectVariables() throws Exception {
List<Variable> variables = unmarshalResourceList(Variable.class, "project-variables.json");
assertTrue(compareJson(variables, "project-variables.json"));
}
@Test
public void testJob() throws Exception {
Job job = unmarshalResource(Job.class, "job.json");
assertTrue(compareJson(job, "job.json"));
}
@Test
public void testBridge() throws Exception {
Bridge bridge = unmarshalResource(Bridge.class, "bridge.json");
assertTrue(compareJson(bridge, "bridge.json"));
}
@Test
public void testDeployKeys() throws Exception {
List<DeployKey> deployKeys = unmarshalResourceList(DeployKey.class, "deploy-keys.json");
assertTrue(compareJson(deployKeys, "deploy-keys.json"));
}
@Test
public void testArtifactsFile() throws Exception {
ArtifactsFile artifactFile = unmarshalResource(ArtifactsFile.class, "artifacts-file.json");
assertTrue(compareJson(artifactFile, "artifacts-file.json"));
}
@Test
public void testProjectGroups() throws Exception {
List<ProjectGroup> projectGroups = unmarshalResourceList(ProjectGroup.class, "project-groups.json");
assertTrue(compareJson(projectGroups, "project-groups.json"));
}
@Test
public void testProjectLanguages() throws Exception {
Map<String, Float> projectLanguages = unmarshalResourceMap(Float.class, "project-languages.json");
assertTrue(compareJson(projectLanguages, "project-languages.json"));
}
@Test
public void testProjectUsers() throws Exception {
List<ProjectUser> projectUsers = unmarshalResourceList(ProjectUser.class, "project-users.json");
assertTrue(compareJson(projectUsers, "project-users.json"));
}
@Test
public void testProjectHook() throws Exception {
ProjectHook hook = unmarshalResource(ProjectHook.class, "hook.json");
assertTrue(compareJson(hook, "hook.json"));
}
@Test
public void testProjectEvents() throws Exception {
List<Event> events = unmarshalResourceList(Event.class, "project-events.json");
assertTrue(compareJson(events, "project-events.json"));
}
@Test
public void testProjectVariableDetails() throws Exception {
Variable variable = unmarshalResource(Variable.class, "project-variable-details.json");
assertTrue(compareJson(variable, "project-variable-details.json"));
}
@Test
public void testProjectApprovalsCofig() throws Exception {
ProjectApprovalsConfig approvalsConfig =
unmarshalResource(ProjectApprovalsConfig.class, "project-approvals-config.json");
assertTrue(compareJson(approvalsConfig, "project-approvals-config.json"));
}
@Test
public void testProtectedBranch() throws Exception {
ProtectedBranch protectedBranch = unmarshalResource(ProtectedBranch.class, "protected-branch.json");
assertTrue(compareJson(protectedBranch, "protected-branch.json"));
}
@Test
public void testProtectedTags() throws Exception {
List<ProtectedTag> protectedTags = unmarshalResourceList(ProtectedTag.class, "protected-tags.json");
assertTrue(compareJson(protectedTags, "protected-tags.json"));
}
@Test
public void testPushRule() throws Exception {
PushRules pushRule = unmarshalResource(PushRules.class, "push-rule.json");
assertTrue(compareJson(pushRule, "push-rule.json"));
}
@Test
public void testPullMirror() throws Exception {
PullMirror value = unmarshalResource(PullMirror.class, "pull-mirror.json");
assertTrue(compareJson(value, "pull-mirror.json"));
}
@Test
public void testRegistryRepositories() throws Exception {
List<RegistryRepository> repos = unmarshalResourceList(RegistryRepository.class, "registry-repositories.json");
assertTrue(compareJson(repos, "registry-repositories.json"));
}
@Test
public void testRelatedEpicLink() throws Exception {
RelatedEpicLink relatedEpics = unmarshalResource(RelatedEpicLink.class, "related-epic-link.json");
assertTrue(compareJson(relatedEpics, "related-epic-link.json"));
}
@Test
public void testRelatedEpics() throws Exception {
List<RelatedEpic> relatedEpics = unmarshalResourceList(RelatedEpic.class, "related-epics.json");
assertTrue(compareJson(relatedEpics, "related-epics.json"));
}
@Test
public void testReleases() throws Exception {
List<Release> releases = unmarshalResourceList(Release.class, "releases.json");
assertTrue(compareJson(releases, "releases.json"));
}
@Test
public void testRemoteMirror() throws Exception {
RemoteMirror remoteMirror = unmarshalResource(RemoteMirror.class, "remote-mirror.json");
assertTrue(compareJson(remoteMirror, "remote-mirror.json"));
}
@Test
public void testRepositoryFile() throws Exception {
RepositoryFile file = unmarshalResource(RepositoryFile.class, "repository-file.json");
assertTrue(compareJson(file, "repository-file.json"));
}
@Test
public void testRepositoryFileResponse() throws Exception {
RepositoryFileResponse file = unmarshalResource(RepositoryFileResponse.class, "repository-file-response.json");
assertTrue(compareJson(file, "repository-file-response.json"));
}
@Test
public void testRunnerDetail() throws Exception {
RunnerDetail runnerDetail = unmarshalResource(RunnerDetail.class, "runner-detail.json");
assertTrue(compareJson(runnerDetail, "runner-detail.json"));
}
@Test
public void testAllRunners() throws Exception {
List<Runner> allRunners = unmarshalResourceList(Runner.class, "all-runners.json");
assertTrue(compareJson(allRunners, "all-runners.json"));
}
@Test
public void testJiraService() throws Exception {
JiraService jira = unmarshalResource(JiraService.class, "jira.json");
assertTrue(compareJson(jira, "jira.json"));
}
@Test
public void testKey() throws Exception {
Key key = unmarshalResource(Key.class, "key.json");
assertTrue(compareJson(key, "key.json"));
}
@Test
public void testMembers() throws Exception {
List<Member> members = unmarshalResourceList(Member.class, "members.json");
assertTrue(compareJson(members, "members.json"));
}
@Test
public void testMergeRequestApprovals() throws Exception {
MergeRequest mergeRequestApprovals = unmarshalResource(MergeRequest.class, "approvals.json");
assertTrue(compareJson(mergeRequestApprovals, "approvals.json"));
}
@Test
public void testMergeRequestApprovalState() throws Exception {
ApprovalState approvalState = unmarshalResource(ApprovalState.class, "approval-state.json");
assertTrue(compareJson(approvalState, "approval-state.json"));
}
@Test
public void testMergeRequestApprovalRule() throws Exception {
ApprovalRule approvalRule = unmarshalResource(ApprovalRule.class, "approval-rule.json");
assertTrue(compareJson(approvalRule, "approval-rule.json"));
}
@Test
public void testMergeRequest() throws Exception {
MergeRequest mergeRequest = unmarshalResource(MergeRequest.class, "merge-request.json");
assertTrue(compareJson(mergeRequest, "merge-request.json"));
}
@Test
public void testMergeRequestDiff() throws Exception {
MergeRequestDiff diff = unmarshalResource(MergeRequestDiff.class, "merge-request-diff.json");
assertTrue(compareJson(diff, "merge-request-diff.json"));
}
@Test
public void testMergeRequestDiffs() throws Exception {
List<MergeRequestDiff> diffs = unmarshalResourceList(MergeRequestDiff.class, "merge-request-diffs.json");
assertTrue(compareJson(diffs, "merge-request-diffs.json"));
}
@Test
public void testMergeRequestVersions() throws Exception {
List<MergeRequestVersion> versions =
unmarshalResourceList(MergeRequestVersion.class, "merge-request-versions.json");
assertTrue(compareJson(versions, "merge-request-diffs.json"));
}
@Test
public void testMilestone() throws Exception {
Milestone milestone = unmarshalResource(Milestone.class, "milestone.json");
assertTrue(compareJson(milestone, "milestone.json"));
}
@Test
public void testGroupMilestone() throws Exception {
Milestone milestone = unmarshalResource(Milestone.class, "milestone-group.json");
assertTrue(compareJson(milestone, "milestone-group.json"));
}
@Test
public void testNote() throws Exception {
Note note = unmarshalResource(Note.class, "note.json");
assertTrue(compareJson(note, "note.json"));
}
@Test
public void testMergeRequestNote() throws Exception {
Note note = unmarshalResource(Note.class, "merge-request-note.json");
assertTrue(compareJson(note, "merge-request-note.json"));
}
@Test
public void testNotificationSettings() throws Exception {
NotificationSettings settings = unmarshalResource(NotificationSettings.class, "notification-settings.json");
assertTrue(compareJson(settings, "notification-settings.json"));
}
@Test
public void testPersonalAccessToken() throws Exception {
PersonalAccessToken project = unmarshalResource(PersonalAccessToken.class, "personal-access-token.json");
assertTrue(compareJson(project, "personal-access-token.json"));
}
@Test
public void testProject() throws Exception {
Project project = unmarshalResource(Project.class, "project.json");
assertTrue(compareJson(project, "project.json"));
}
@Test
public void testProjectSnippet() throws Exception {
Snippet snippet = unmarshalResource(Snippet.class, "snippet.json");
assertTrue(compareJson(snippet, "snippet.json"));
}
@Test
public void testSlackService() throws Exception {
SlackService slackNotifications = unmarshalResource(SlackService.class, "slack-notifications.json");
assertTrue(compareJson(slackNotifications, "slack-notifications.json"));
}
@Test
public void testSystemHook() throws Exception {
SystemHook systemHook = unmarshalResource(SystemHook.class, "system-hook.json");
assertTrue(compareJson(systemHook, "system-hook.json"));
}
@Test
public void testTag() throws Exception {
Tag tag = unmarshalResource(Tag.class, "tag.json");
assertTrue(compareJson(tag, "tag.json"));
}
@Test
public void testSshKey() throws Exception {
SshKey sshKey = unmarshalResource(SshKey.class, "sshkey.json");
assertTrue(compareJson(sshKey, "sshkey.json"));
}
@Test
public void testTodos() throws Exception {
List<Todo> todos = unmarshalResourceList(Todo.class, "todos.json");
assertTrue(compareJson(todos, "todos.json"));
}
@Test
public void testTopic() throws Exception {
Topic topic = unmarshalResource(Topic.class, "topic.json");
assertTrue(compareJson(topic, "topic.json"));
}
@Test
public void testTree() throws Exception {
List<TreeItem> tree = unmarshalResourceList(TreeItem.class, "tree.json");
assertTrue(compareJson(tree, "tree.json"));
}
@Test
public void testTrigger() throws Exception {
Trigger trigger = unmarshalResource(Trigger.class, "trigger.json");
assertTrue(compareJson(trigger, "trigger.json"));
}
@Test
public void testUser() throws Exception {
User user = unmarshalResource(User.class, "user.json");
assertTrue(compareJson(user, "user.json"));
}
@Test
public void testUploadedFile() throws Exception {
UploadedFile uploadedFile = unmarshalResource(UploadedFile.class, "uploaded-file.json");
assertTrue(compareJson(uploadedFile, "uploaded-file.json"));
}
@Test
public void testImpersonationToken() throws Exception {
ImpersonationToken token = unmarshalResource(ImpersonationToken.class, "impersonation-token.json");
assertTrue(compareJson(token, "impersonation-token.json"));
}
@Test
public void testGroupAccessToken() throws Exception {
ImpersonationToken token = unmarshalResource(GroupAccessToken.class, "group-access-token.json");
assertTrue(compareJson(token, "group-access-token.json"));
}
@Test
public void testIteration() throws Exception {
Iteration token = unmarshalResource(Iteration.class, "iteration.json");
assertTrue(compareJson(token, "iteration.json"));
}
@Test
public void testOauthToken() throws Exception {
OauthTokenResponse token = unmarshalResource(OauthTokenResponse.class, "oauth-token.json");
assertTrue(compareJson(token, "oauth-token.json"));
}
@Test
public void testLabels() throws Exception {
List<Label> labels = unmarshalResourceList(Label.class, "labels.json");
assertTrue(compareJson(labels, "labels.json"));
}
@Test
public void testLdapGroupLink() throws Exception {
LdapGroupLink link = unmarshalResource(LdapGroupLink.class, "ldap-group-link.json");
assertTrue(compareJson(link, "ldap-group-link.json"));
}
@Test
public void testSamlGroupLink() throws Exception {
SamlGroupLink link = unmarshalResource(SamlGroupLink.class, "saml-group-link.json");
assertTrue(compareJson(link, "saml-group-link.json"));
}
@Test
public void testSearchBlobs() throws Exception {
List<SearchBlob> searchResults = unmarshalResourceList(SearchBlob.class, "wiki-blobs.json");
assertTrue(compareJson(searchResults, "wiki-blobs.json"));
}
@Test
public void testProjectAccessToken() throws Exception {
ProjectAccessToken token = unmarshalResource(ProjectAccessToken.class, "project-access-token.json");
assertTrue(compareJson(token, "project-access-token.json"));
}
@Test
public void testMetadata() throws Exception {
Metadata metadata = unmarshalResource(Metadata.class, "metadata.json");
assertTrue(compareJson(metadata, "metadata.json"));
}
@Test
public void testWebhook() throws Exception {
GroupHook groupHook = unmarshalResource(GroupHook.class, "group-hook.json");
assertTrue(compareJson(groupHook, "group-hook.json"));
}
@Test
public void testErrorTrackingClientKey() throws Exception {
ErrorTrackingClientKey errorTrackingClientKey =
unmarshalResource(ErrorTrackingClientKey.class, "error-tracking-client-key.json");
assertTrue(compareJson(errorTrackingClientKey, "error-tracking-client-key.json"));
}
}