Skip to content

Commit c49335d

Browse files
author
barcigabri
committed
test: added test for model_get_company_plan_usage_response
1 parent fcae5cb commit c49335d

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
Fatture in Cloud API v2 - API Reference
3+
4+
Connect your software with Fatture in Cloud, the invoicing platform chosen by more than 400.000 businesses in Italy. The Fatture in Cloud API is based on REST, and makes possible to interact with the user related data prior authorization via OAuth2 protocol.
5+
6+
API version: 2.0.19
7+
8+
*/
9+
10+
package model
11+
12+
import (
13+
"encoding/json"
14+
"reflect"
15+
"testing"
16+
17+
. "github.com/fattureincloud/fattureincloud-go-sdk/v2/model"
18+
"github.com/stretchr/testify/assert"
19+
)
20+
21+
var GetCompanyPlanUsageResponseJsonStr string = "{\"data\":{\"limit\":5,\"usage\":7}}"
22+
23+
func TestGetCompanyPlanUsageResponse(t *testing.T) {
24+
obj := NewGetCompanyPlanUsageResponse()
25+
json.Unmarshal([]byte(GetCompanyPlanUsageResponseJsonStr), obj)
26+
jsonStr2, _ := json.Marshal(obj)
27+
28+
assert.JSONEq(t, GetCompanyPlanUsageResponseJsonStr, string(jsonStr2), "they should be equal")
29+
30+
newObj := NewGetCompanyPlanUsageResponse()
31+
newObj.SetData(obj.GetData())
32+
assert.True(t, reflect.DeepEqual(obj.GetData(), newObj.GetData()))
33+
}

0 commit comments

Comments
 (0)