The core protocol of WoopChain
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
woop/waitnode/waitNode_test.go

21 lines
406 B

package waitnode
import (
"testing"
)
func TestNewNode(test *testing.T) {
6 years ago
addressNode := &address{IP: "1", Port: "2"}
ID := 1
6 years ago
node := New(addressNode, ID)
if node.Address == nil {
test.Error("Address is not initialized for the node")
}
6 years ago
if node.ID != 1 {
test.Error("ID is not initialized for the node")
}
6 years ago
if node.Worker != "pow" {
test.Error("Worker is not initialized for the node")
}
}