From 4370a8133c8e9c870d7d2c659f27ac655896eec0 Mon Sep 17 00:00:00 2001 From: Sam Anthony Date: Thu, 21 May 2026 14:40:50 -0400 Subject: shorten client method names; implement order cancelation --- cost_test.go | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'cost_test.go') diff --git a/cost_test.go b/cost_test.go index 446440d..c2f18ec 100644 --- a/cost_test.go +++ b/cost_test.go @@ -10,14 +10,14 @@ import ( ) var ( - //go:embed testdata/printjobcostreq.json - printJobCostReqJson string + //go:embed testdata/costreq.json + costReqJson string - //go:embed testdata/printjobcostresp.json - printJobCostRespJson string + //go:embed testdata/costresp.json + costRespJson string ) -var printJobCostReqSample = printJobCostReq{ +var costReqSample = printJobCostReq{ []PrintJobCostLineItem{ { 32, @@ -129,16 +129,16 @@ var printJobCostRespSample = printJobCostResp{ } func TestMarshalPrintJobCostReq(t *testing.T) { - requireMarshalJsonEq(t, printJobCostReqJson, printJobCostReqSample) + requireMarshalJsonEq(t, costReqJson, costReqSample) } func TestUnmarshalPrintJobCostResp(t *testing.T) { - requireUnmarshalJsonEq(t, printJobCostRespSample, printJobCostRespJson) + requireUnmarshalJsonEq(t, printJobCostRespSample, costRespJson) } -func TestPrintJobCost(t *testing.T) { +func TestCost(t *testing.T) { c := newClient(t) - items := printJobCostReqSample.LineItems + items := costReqSample.LineItems addr := ShippingAddress{ City: "Lübeck", Country: "DE", @@ -147,8 +147,8 @@ func TestPrintJobCost(t *testing.T) { Street1: "Holstenstr. 40", Phone: MustParsePhoneNumber("844-212-0689"), } - shiplvl := printJobCostReqSample.ShipOpt - cost, av, err := c.PrintJobCost(items, addr, shiplvl) + shiplvl := costReqSample.ShipOpt + cost, av, err := c.Cost(items, addr, shiplvl) require.NoError(t, err) require.Equal(t, printJobCostRespSample.AddressValidation, av) requireCurrency(t, cost.Currency) -- cgit v1.2.3