Skip to content

Commit

Permalink
new tests created
Browse files Browse the repository at this point in the history
Signed-off-by: Philip-21 <[email protected]>
  • Loading branch information
Philip-21 committed Dec 16, 2023
1 parent 15cba86 commit 0b4d49d
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions internal/blockchain/ethereum/besu/besu_provider_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package besu

import (
"context"
"testing"

"github.com/hyperledger/firefly-cli/pkg/types"
"github.com/hyperledger/firefly-common/pkg/fftypes"
"github.com/stretchr/testify/assert"
)

func TestNewBesuProvider(t *testing.T) {
var ctx context.Context
testCases := []struct {
Name string
Ctx context.Context
Stack *types.Stack
}{
{
Name: "testcase1",
Ctx: ctx,
Stack: &types.Stack{
Name: "TestBesuProviderWithEthconnect",
Members: []*types.Organization{{OrgName: "Org1"}},
BlockchainProvider: fftypes.FFEnumValue("BlockchainProvider", "EthConnect"),
BlockchainConnector: fftypes.FFEnumValue("BlockchainConnector", "EthConnect"),
BlockchainNodeProvider: fftypes.FFEnumValue("BlockchainNodeProvider", "EthConnect"),
},
},
{
Name: "TestBesuProviderWithEvmconnect",
Stack: &types.Stack{
BlockchainProvider: fftypes.FFEnumValue("BlockchainProvider", "Geth"),
BlockchainConnector: fftypes.FFEnumValue("BlockchainConnector", "EvmConnect"),
BlockchainNodeProvider: fftypes.FFEnumValue("BlockchainNodeProvider", "Geth"),
},
},
}
for _, tc := range testCases {
t.Run(tc.Name, func(t *testing.T) {
besuProvider := NewBesuProvider(tc.Ctx, tc.Stack)
assert.NotNil(t, besuProvider)
})
}
}

0 comments on commit 0b4d49d

Please sign in to comment.