1package bug
 2
 3import (
 4	"testing"
 5
 6	"github.com/MichaelMure/git-bug/entities/identity"
 7	"github.com/MichaelMure/git-bug/entity"
 8	"github.com/MichaelMure/git-bug/entity/dag"
 9)
10
11func TestLabelChangeSerialize(t *testing.T) {
12	dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) {
13		return NewLabelChangeOperation(author, unixTime, []Label{"added"}, []Label{"removed"}), nil
14	})
15	dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) {
16		return NewLabelChangeOperation(author, unixTime, []Label{"added"}, nil), nil
17	})
18	dag.SerializeRoundTripTest(t, operationUnmarshaler, func(author identity.Interface, unixTime int64) (*LabelChangeOperation, entity.Resolvers) {
19		return NewLabelChangeOperation(author, unixTime, nil, []Label{"removed"}), nil
20	})
21}