neo-go/pkg/consensus/change_view_test.go

19 lines
334 B
Go
Raw Normal View History

2019-11-15 10:32:40 +00:00
package consensus
import (
"testing"
"github.com/nspcc-dev/dbft"
2019-11-15 10:32:40 +00:00
"github.com/stretchr/testify/require"
)
func TestChangeView_Getters(t *testing.T) {
var c = &changeView{
newViewNumber: 2,
reason: dbft.CVTimeout,
}
2019-11-15 10:32:40 +00:00
require.EqualValues(t, 2, c.NewViewNumber())
require.EqualValues(t, dbft.CVTimeout, c.Reason())
2019-11-15 10:32:40 +00:00
}