/** * Alipay.com Inc. * Copyright (c) 2004-2020 All Rights Reserved. */ package com.alipay.easysdk.payment.wap; import com.alipay.easysdk.TestAccount; import com.alipay.easysdk.factory.Factory; import com.alipay.easysdk.kernel.util.ResponseChecker; import com.alipay.easysdk.payment.wap.models.AlipayTradeWapPayResponse; import org.junit.Before; import org.junit.Test; import java.util.HashMap; import java.util.Map; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; public class ClientTest { @Before public void setUp() { Factory.setOptions(TestAccount.Mini.CONFIG); } @Test public void testPay() throws Exception { AlipayTradeWapPayResponse response = Factory.Payment.Wap().pay("iPhone6 16G", "b7f4bc7d-ea4b-4efd-9072-d8ea913c8946", "0.10", "https://www.taobao.com", "https://www.taobao.com"); assertThat(ResponseChecker.success(response), is(true)); assertThat(response.body.contains("