1+ package com .github .elibracha .ChangeTest ;
2+
3+ import org .junit .Test ;
4+ import com .github .elibracha .exceptions .SpecificationSupportException ;
5+
6+ public class ChangeTest extends AbstractChangeTest {
7+
8+ @ Test
9+ public void testContextProcessorUnchanged () throws SpecificationSupportException {
10+ this .executeChangeTest (
11+ "changes/context/diffignore.yaml" ,
12+ "changes/context/original.yaml" ,
13+ "changes/context/generated.yaml" ,
14+ "contextDiff" ,
15+ true
16+ );
17+ }
18+
19+ @ Test
20+ public void testParametersWildcardTrue () throws SpecificationSupportException {
21+ this .executeChangeTest (
22+ "changes/parameters/diffignore.yaml" ,
23+ "changes/parameters/original.yaml" ,
24+ "changes/parameters/generated.yaml" ,
25+ "parameterWildcardDiff" ,
26+ true
27+ );
28+ }
29+
30+ @ Test
31+ public void testRequestContentMediaTypesWildcardTrue () throws SpecificationSupportException {
32+ this .executeChangeTest (
33+ "changes/request/request_content_media_types/diffignore.yaml" ,
34+ "changes/request/request_content_media_types/original.yaml" ,
35+ "changes/request/request_content_media_types/generated.yaml" ,
36+ "requestWildMediaTypecardDiff" ,
37+ true
38+ );
39+ }
40+
41+ @ Test
42+ public void testRequestWildcardTrue () throws SpecificationSupportException {
43+ this .executeChangeTest (
44+ "changes/request/request_wildcard/diffignore.yaml" ,
45+ "changes/request/request_wildcard/original.yaml" ,
46+ "changes/request/request_wildcard/generated.yaml" ,
47+ "requestWildcardDiff" ,
48+ true
49+ );
50+ }
51+
52+ @ Test
53+ public void testResponseWildcardTrue () throws SpecificationSupportException {
54+ this .executeChangeTest (
55+ "changes/response/response_wildcard/diffignore_true.yaml" ,
56+ "changes/response/response_wildcard/original.yaml" ,
57+ "changes/response/response_wildcard/generated.yaml" ,
58+ "responseWildcardDiff" ,
59+ true
60+ );
61+ }
62+
63+ @ Test
64+ public void testResponseStatusWildcardTrue () throws SpecificationSupportException {
65+ this .executeChangeTest (
66+ "changes/response/response_status_wildcard/diffignore_true.yaml" ,
67+ "changes/response/response_wildcard/original.yaml" ,
68+ "changes/response/response_wildcard/generated.yaml" ,
69+ "responseStatusWildCardTrue" ,
70+ true
71+ );
72+ }
73+
74+ @ Test
75+ public void testResponseStatusWildcardFalse () throws SpecificationSupportException {
76+ this .executeChangeTest (
77+ "changes/response/response_status_wildcard/diffignore_false.yaml" ,
78+ "changes/response/response_status_wildcard/original.yaml" ,
79+ "changes/response/response_status_wildcard/generated.yaml" ,
80+ "responseStatusWildCardFalseDiff" ,
81+ false
82+ );
83+ }
84+
85+ @ Test
86+ public void testResponseStatusSchemaWildcardTrue () throws SpecificationSupportException {
87+ this .executeChangeTest (
88+ "changes/response/response_status_schema_wildcard/diffignore.yaml" ,
89+ "changes/response/response_status_schema_wildcard/original.yaml" ,
90+ "changes/response/response_status_schema_wildcard/generated.yaml" ,
91+ "responseStatusSchemaWildcardTrueDiff" ,
92+ true
93+ );
94+ }
95+
96+ @ Test
97+ public void testSecurityWildcardTrue () throws SpecificationSupportException {
98+ this .executeChangeTest (
99+ "changes/security/diffignore.yaml" ,
100+ "changes/security/original.yaml" ,
101+ "changes/security/generated.yaml" ,
102+ "responseStatusSchemaWildcardTrueDiff" ,
103+ true
104+ );
105+ }
106+
107+ @ Test
108+ public void testResponseIncreasedTrue () throws SpecificationSupportException {
109+ this .executeChangeTest (
110+ "changes/response/response_increased_true/diffignore.yaml" ,
111+ "changes/response/response_increased_true/original.yaml" ,
112+ "changes/response/response_increased_true/generated.yaml" ,
113+ "ResponseIncreasedTrue" ,
114+ true
115+ );
116+ }
117+
118+ @ Test
119+ public void testResponseIncreasedFalse () throws SpecificationSupportException {
120+ this .executeChangeTest (
121+ "changes/response/response_increased_false/diffignore.yaml" ,
122+ "changes/response/response_increased_false/original.yaml" ,
123+ "changes/response/response_increased_false/generated.yaml" ,
124+ "ResponseIncreasedFalse" ,
125+ false
126+ );
127+ }
128+
129+ @ Test
130+ public void testSecurityProcessorIncreasedTrue () throws SpecificationSupportException {
131+ this .executeChangeTest (
132+ "changes/security/increased_true/diffignore.yaml" ,
133+ "changes/security/increased_true/original.yaml" ,
134+ "changes/security/increased_true/generated.yaml" ,
135+ "securityIncreasedTrue" ,
136+ true
137+ );
138+ }
139+
140+ @ Test
141+ public void testSecurityProcessorIncreasedFalse () throws SpecificationSupportException {
142+ this .executeChangeTest (
143+ "changes/security/increased_false/diffignore.yaml" ,
144+ "changes/security/increased_false/original.yaml" ,
145+ "changes/security/increased_false/generated.yaml" ,
146+ "securityIncreasedFalse" ,
147+ false
148+ );
149+ }
150+ }
0 commit comments