本文整理汇总了Java中com.github.jberkel.pay.me.validator.SignatureValidator类的典型用法代码示例。如果您正苦于以下问题:Java SignatureValidator类的具体用法?Java SignatureValidator怎么用?Java SignatureValidator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
SignatureValidator类属于com.github.jberkel.pay.me.validator包,在下文中一共展示了SignatureValidator类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: IabHelper
import com.github.jberkel.pay.me.validator.SignatureValidator; //导入依赖的package包/类
/**
* Alternative constructor if you want to perform your own signature validation by
* implementing a {@link SignatureValidator}.
*
* @param ctx Your application or Activity context. Needed to bind to the in-app billing service.
* @param validator the validator to be used for verifying the signature.
*/
public IabHelper(Context ctx, SignatureValidator validator) {
if (ctx == null) throw new IllegalArgumentException("need non-null context");
if (validator == null) throw new IllegalArgumentException("need non-null validator");
mContext = ctx.getApplicationContext();
mSignatureValidator = validator;
logDebug("IAB helper created.");
}
示例2: shouldCreateHelperWithValidator
import com.github.jberkel.pay.me.validator.SignatureValidator; //导入依赖的package包/类
@Test public void shouldCreateHelperWithValidator() throws Exception {
SignatureValidator validator = mock(SignatureValidator.class);
new IabHelper(Robolectric.application, validator);
}
示例3: shouldRequireValidator
import com.github.jberkel.pay.me.validator.SignatureValidator; //导入依赖的package包/类
@Test(expected = IllegalArgumentException.class) public void shouldRequireValidator() throws Exception {
new IabHelper(Robolectric.application, (SignatureValidator)null);
}