v1_test.go 615 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2019 getensh.com. All rights reserved.
  2. // Use of this source code is governed by getensh.com.
  3. package tests
  4. import (
  5. "context"
  6. v1 "property-garden/pb/v1"
  7. "testing"
  8. jsoniter "github.com/json-iterator/go"
  9. )
  10. var json = jsoniter.ConfigCompatibleWithStandardLibrary
  11. func Test_GenerateBill(t *testing.T) {
  12. req := &v1.GenerateBillRequest{
  13. GardenId: 6,
  14. //ChargeId: 7,
  15. //ChargeBindId: 1038,
  16. //EndTime: 1625068800,
  17. }
  18. r, err := client.GenerateBill(context.Background(), req)
  19. if err == nil {
  20. s, _ := json.MarshalToString(r)
  21. t.Log(s)
  22. } else {
  23. t.Error("failed to call: ", err)
  24. }
  25. }