#853 小程序模块获取二维码和小程序码接口增加对应返回byte数组的实现方法
This commit is contained in:
@@ -7,6 +7,9 @@ import org.testng.annotations.*;
|
||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||
import cn.binarywang.wx.miniapp.test.ApiTestModule;
|
||||
import com.google.inject.Inject;
|
||||
import me.chanjar.weixin.common.error.WxErrorException;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||
@@ -18,21 +21,38 @@ public class WxMaQrcodeServiceImplTest {
|
||||
private WxMaService wxService;
|
||||
|
||||
@Test
|
||||
public void testCreateQrCode() throws Exception {
|
||||
public void testCreateQrcode() throws Exception {
|
||||
final File qrCode = this.wxService.getQrcodeService().createQrcode("111", 122);
|
||||
System.out.println(qrCode);
|
||||
assertThat(qrCode).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateWxaCode() throws Exception {
|
||||
final File wxCode = this.wxService.getQrcodeService().createWxaCode("111", 122);
|
||||
System.out.println(wxCode);
|
||||
assertThat(wxCode).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateWxaCodeUnlimit() throws Exception {
|
||||
final File wxCode = this.wxService.getQrcodeService().createWxaCodeUnlimit("111", null);
|
||||
System.out.println(wxCode);
|
||||
assertThat(wxCode).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateQrcodeBytes() throws WxErrorException {
|
||||
final byte[] qrCode = this.wxService.getQrcodeService().createQrcodeBytes("111", 122);
|
||||
assertThat(qrCode).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateWxaCodeBytes() throws WxErrorException {
|
||||
final byte[] wxCode = this.wxService.getQrcodeService().createWxaCodeBytes("111", 122, true, null, false);
|
||||
assertThat(wxCode).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateWxaCodeUnlimitBytes() throws WxErrorException {
|
||||
final byte[] wxCode = this.wxService.getQrcodeService().createWxaCodeUnlimitBytes("111", null, 122, true, null, false);
|
||||
assertThat(wxCode).isNotNull();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user