package pddapi

import (
	"git.rosy.net.cn/baseapi/utils"
	"testing"
	"time"
)

func TestOrderListRangeGet(t *testing.T) {
	result, err := api.OrderListRangeGet("2021-05-05 00:00:00", "2021-05-06:23:59:59", "", 100)
	if err != nil {
		t.Fatal(err)
	}
	t.Log(utils.Format4Output(result, false))
}

func TestOrderDetailGet(t *testing.T) {
	result, err := api.OrderDetailGet("210506-020860160903116")
	if err != nil {
		t.Fatal(err)
	}
	t.Log(utils.Format4Output(result, false))
}

func TestOrderListIncrementGet(t *testing.T) {
	result, err := api.OrderListIncrementGet(time.Now().Add(-time.Hour*24).Unix(), time.Now().Unix(), 1, 50)
	if err != nil {
		t.Fatal(err)
	}
	t.Log(utils.Format4Output(result, false))
}
