File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
test/java/test/com/qiniu/sms Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -225,6 +225,17 @@ public Response describeTemplate(String templateId) throws QiniuException {
225
225
return get (requestUrl );
226
226
}
227
227
228
+ /**
229
+ * 查询单个模板信息
230
+ *
231
+ * @param templateId 模板ID
232
+ */
233
+ public TemplateInfo .Item describeTemplateItem (String templateId ) throws QiniuException {
234
+ Response resp = describeTemplate (templateId );
235
+ TemplateInfo .Item item = Json .decode (resp .bodyString (), TemplateInfo .Item .class );
236
+ return item ;
237
+ }
238
+
228
239
/**
229
240
* 创建模板
230
241
*
Original file line number Diff line number Diff line change @@ -196,6 +196,18 @@ public void testDescribeSingleTemplate() {
196
196
}
197
197
}
198
198
199
+ @ Test
200
+ @ Tag ("IntegrationTest" )
201
+ public void testDescribeSingleTemplateItem () {
202
+ try {
203
+ TemplateInfo .Item item = smsManager .describeTemplateItem ("templateId" );
204
+ assertNotNull (item );
205
+ } catch (QiniuException e ) {
206
+ assertTrue (ResCode .find (e .code (), ResCode .getPossibleResCode (401 )));
207
+ }
208
+ }
209
+
210
+
199
211
@ Test
200
212
@ Tag ("IntegrationTest" )
201
213
public void testCreateTemplate () {
You can’t perform that action at this time.
0 commit comments