forked from lthn/blockchain
Renamed Go SDK API services and documentation from BlockAPI/InfoAPI to BlockUtilsSdkClientGo/InfoUtilsSdkClientGo for consistency. Updated all references, method receivers, and usage examples accordingly. Added new Java SDK client, models, API, documentation, and build files under utils/sdk/client/java. Updated Go module dependencies and added go.sum. Enhanced Go models to support additional properties in JSON unmarshalling.
87 lines
2.1 KiB
Go
Generated
87 lines
2.1 KiB
Go
Generated
/*
|
|
Lethean Blockchain API
|
|
|
|
Testing BlockUtilsSdkClientGoService
|
|
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
|
|
|
package lthn
|
|
|
|
import (
|
|
"context"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
"testing"
|
|
openapiclient "github.com/letheanVPN/blockchain/utils/sdk/client/go"
|
|
)
|
|
|
|
func Test_lthn_BlockUtilsSdkClientGoService(t *testing.T) {
|
|
|
|
configuration := openapiclient.NewConfiguration()
|
|
apiClient := openapiclient.NewAPIClient(configuration)
|
|
|
|
t.Run("Test BlockUtilsSdkClientGoService CreateBlockTemplate", func(t *testing.T) {
|
|
|
|
t.Skip("skip test") // remove to run test
|
|
|
|
resp, httpRes, err := apiClient.BlockUtilsSdkClientGo.CreateBlockTemplate(context.Background()).Execute()
|
|
|
|
require.Nil(t, err)
|
|
require.NotNil(t, resp)
|
|
assert.Equal(t, 200, httpRes.StatusCode)
|
|
|
|
})
|
|
|
|
t.Run("Test BlockUtilsSdkClientGoService GetBlock", func(t *testing.T) {
|
|
|
|
t.Skip("skip test") // remove to run test
|
|
|
|
var identifier string
|
|
|
|
resp, httpRes, err := apiClient.BlockUtilsSdkClientGo.GetBlock(context.Background(), identifier).Execute()
|
|
|
|
require.Nil(t, err)
|
|
require.NotNil(t, resp)
|
|
assert.Equal(t, 200, httpRes.StatusCode)
|
|
|
|
})
|
|
|
|
t.Run("Test BlockUtilsSdkClientGoService GetBlocks", func(t *testing.T) {
|
|
|
|
t.Skip("skip test") // remove to run test
|
|
|
|
resp, httpRes, err := apiClient.BlockUtilsSdkClientGo.GetBlocks(context.Background()).Execute()
|
|
|
|
require.Nil(t, err)
|
|
require.NotNil(t, resp)
|
|
assert.Equal(t, 200, httpRes.StatusCode)
|
|
|
|
})
|
|
|
|
t.Run("Test BlockUtilsSdkClientGoService GetHeight", func(t *testing.T) {
|
|
|
|
t.Skip("skip test") // remove to run test
|
|
|
|
resp, httpRes, err := apiClient.BlockUtilsSdkClientGo.GetHeight(context.Background()).Execute()
|
|
|
|
require.Nil(t, err)
|
|
require.NotNil(t, resp)
|
|
assert.Equal(t, 200, httpRes.StatusCode)
|
|
|
|
})
|
|
|
|
t.Run("Test BlockUtilsSdkClientGoService SubmitBlock", func(t *testing.T) {
|
|
|
|
t.Skip("skip test") // remove to run test
|
|
|
|
resp, httpRes, err := apiClient.BlockUtilsSdkClientGo.SubmitBlock(context.Background()).Execute()
|
|
|
|
require.Nil(t, err)
|
|
require.NotNil(t, resp)
|
|
assert.Equal(t, 200, httpRes.StatusCode)
|
|
|
|
})
|
|
|
|
}
|