27 lines
493 B
Go
27 lines
493 B
Go
|
package api
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"sort"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestOrder(t *testing.T) {
|
||
|
strings := []string{"pageNum", "pageSize", "userLongitude", "userLatitude", "cityCode", "querySource"}
|
||
|
sort.Strings(strings)
|
||
|
for _, s := range strings {
|
||
|
fmt.Println(s)
|
||
|
}
|
||
|
}
|
||
|
func TestShopList(t *testing.T) {
|
||
|
req := ShopReq{
|
||
|
PageNum: 1,
|
||
|
PageSize: 10,
|
||
|
UserLongitude: 121.58372497558594,
|
||
|
UserLatitude: 31.347728729248047,
|
||
|
CityCode: "310000",
|
||
|
QuerySource: 1,
|
||
|
}
|
||
|
shopList(req)
|
||
|
}
|