34 lines
866 B
Go
34 lines
866 B
Go
package model
|
|
|
|
import "testing"
|
|
|
|
func TestChainNetworkArbitrumSepoliaSupport(t *testing.T) {
|
|
network, ok := ParseChainNetwork("arbitrum_sepolia")
|
|
if !ok {
|
|
t.Fatal("ParseChainNetwork(arbitrum_sepolia) returned ok=false")
|
|
}
|
|
if network != ChainNetworkArbitrumSepolia {
|
|
t.Fatalf("ParseChainNetwork(arbitrum_sepolia) = %q, want %q", network, ChainNetworkArbitrumSepolia)
|
|
}
|
|
if !network.IsValid() {
|
|
t.Fatal("ChainNetworkArbitrumSepolia should be valid")
|
|
}
|
|
if !network.IsEVM() {
|
|
t.Fatal("ChainNetworkArbitrumSepolia should be EVM")
|
|
}
|
|
if !network.IsTestnet() {
|
|
t.Fatal("ChainNetworkArbitrumSepolia should be testnet")
|
|
}
|
|
|
|
found := false
|
|
for _, candidate := range AllChainNetworks() {
|
|
if candidate == ChainNetworkArbitrumSepolia {
|
|
found = true
|
|
break
|
|
}
|
|
}
|
|
if !found {
|
|
t.Fatal("AllChainNetworks() is missing ChainNetworkArbitrumSepolia")
|
|
}
|
|
}
|