13
13
14
14
import java .util .Arrays ;
15
15
import java .util .List ;
16
+ import java .util .Collections ;
16
17
17
18
import static org .junit .jupiter .api .Assertions .assertEquals ;
18
19
import static org .junit .jupiter .api .Assertions .assertTrue ;
@@ -35,13 +36,14 @@ public List<RequestMock> getMocks() {
35
36
RequestMock .build (this .url + "/projects/" + projectId + "/approvals" , HttpGet .METHOD_NAME , "api/stringtranslations/listApprovals.json" ),
36
37
RequestMock .build (this .url + "/projects/" + projectId + "/approvals" , HttpPost .METHOD_NAME , "api/stringtranslations/addApprovalRequest.json" , "api/stringtranslations/approval.json" ),
37
38
RequestMock .build (this .url + "/projects/" + projectId + "/approvals/" + approvalId , HttpGet .METHOD_NAME , "api/stringtranslations/approval.json" ),
39
+ RequestMock .build (this .url + "/projects/" + projectId + "/approvals" , HttpDelete .METHOD_NAME , null , Collections .singletonMap ("stringId" , stringId )),
38
40
RequestMock .build (this .url + "/projects/" + projectId + "/approvals/" + approvalId , HttpDelete .METHOD_NAME ),
39
41
RequestMock .build (String .format ("%s/projects/%d/languages/%s/translations" , this .url , projectId , language ), HttpGet .METHOD_NAME , "api/stringtranslations/listLanguageTranslations_plain.json" ),
40
42
RequestMock .build (String .format ("%s/projects/%d/languages/%s/translations" , this .url , secondProjectId , language ), HttpGet .METHOD_NAME , "api/stringtranslations/listLanguageTranslations_plural.json" ),
41
43
RequestMock .build (String .format ("%s/projects/%d/languages/%s/translations" , this .url , thirdProjectId , language ), HttpGet .METHOD_NAME , "api/stringtranslations/listLanguageTranslations_ICU.json" ),
42
44
RequestMock .build (this .url + "/projects/" + projectId + "/translations" , HttpGet .METHOD_NAME , "api/stringtranslations/listStringTranslations..json" ),
43
45
RequestMock .build (this .url + "/projects/" + projectId + "/translations" , HttpPost .METHOD_NAME , "api/stringtranslations/addTranslationRequest.json" , "api/stringtranslations/translation.json" ),
44
- RequestMock .build (this .url + "/projects/" + projectId + "/translations" , HttpDelete .METHOD_NAME ),
46
+ RequestMock .build (this .url + "/projects/" + projectId + "/translations" , HttpDelete .METHOD_NAME , null , Collections . singletonMap ( "stringId" , stringId ) ),
45
47
RequestMock .build (this .url + "/projects/" + projectId + "/translations/" + translationId , HttpGet .METHOD_NAME , "api/stringtranslations/translation.json" ),
46
48
RequestMock .build (this .url + "/projects/" + projectId + "/translations/" + translationId , HttpDelete .METHOD_NAME ),
47
49
RequestMock .build (this .url + "/projects/" + projectId + "/translations/" + translationId , HttpPut .METHOD_NAME , "api/stringtranslations/translation.json" ),
@@ -86,6 +88,11 @@ public void getApprovalTest() {
86
88
assertEquals (approvalResponseObject .getData ().getId (), approvalId );
87
89
}
88
90
91
+ @ Test
92
+ public void removeStringApprovalsTest () {
93
+ this .getStringTranslationsApi ().removeStringApprovals (projectId , stringId );
94
+ }
95
+
89
96
@ Test
90
97
public void removeApprovalTest () {
91
98
this .getStringTranslationsApi ().removeApproval (projectId , approvalId );
@@ -134,7 +141,7 @@ public void addTranslationTest() {
134
141
135
142
@ Test
136
143
public void deleteTranslationsTest () {
137
- this .getStringTranslationsApi ().deleteStringTranslations (projectId , null , null );
144
+ this .getStringTranslationsApi ().deleteStringTranslations (projectId , stringId , null );
138
145
}
139
146
140
147
@ Test
0 commit comments