Skip to content

Commit

Permalink
feat: add algorand network names (#675)
Browse files Browse the repository at this point in the history
  • Loading branch information
robdefeo committed Feb 14, 2021
1 parent 8ca0db2 commit 6531d32
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
17 changes: 17 additions & 0 deletions internal/protocols/algorand/algorand.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package algorand

const (
// Mainnet network name.
Mainnet = "mainnet"

// Betanet network name.
Betanet = "betanet"

// Testnet network name.
Testnet = "testnet"
)

// Networks supported by substrate package.
func Networks() []string {
return []string{Mainnet, Betanet, Testnet}
}
26 changes: 26 additions & 0 deletions internal/protocols/algorand/algorand_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package algorand

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestNetworks(t *testing.T) {
tests := []struct {
name string
want []string
}{
{
"success",
[]string{"mainnet", "betanet", "testnet"},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := Networks(); !assert.Equal(t, tt.want, got) {
t.Errorf("Networks() = %v, want %v", got, tt.want)
}
})
}
}

0 comments on commit 6531d32

Please sign in to comment.