diff --git a/result.go b/result.go index 4356b28e..dfe29383 100644 --- a/result.go +++ b/result.go @@ -146,3 +146,19 @@ func NewCommandsInfoCmdResult(val map[string]*CommandInfo, err error) *CommandsI cmd.setErr(err) return &cmd } + +// NewXMessageSliceCmdResult returns a XMessageSliceCmd initialised with val and err for testing +func NewXMessageSliceCmdResult(val []XMessage, err error) *XMessageSliceCmd { + var cmd XMessageSliceCmd + cmd.val = val + cmd.setErr(err) + return &cmd +} + +// NewXStreamSliceCmdResult returns a XStreamSliceCmd initialised with val and err for testing +func NewXStreamSliceCmdResult(val []XStream, err error) *XStreamSliceCmd { + var cmd XStreamSliceCmd + cmd.val = val + cmd.setErr(err) + return &cmd +}