package com.izouma.nineth.service;

import com.github.binarywang.wxpay.exception.WxPayException;
import com.izouma.nineth.ApplicationTests;
import com.izouma.nineth.domain.Order;
import com.izouma.nineth.domain.User;
import org.apache.commons.codec.EncoderException;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import static org.junit.Assert.*;

public class OrderServiceTest extends ApplicationTests {
    @Autowired
    private OrderService orderService;

    @Test
    public void create() throws EncoderException, WxPayException {
        Order order = orderService.create(30L, 201L, 1, null);
        String url = orderService.payOrderWeixinH5(order.getId());
        System.out.println(url);
    }
}