xmpp: mellium.im/xmpp/internal/xmpptest Index | Files

package xmpptest

import "mellium.im/xmpp/internal/xmpptest"

Package xmpptest provides utilities for XMPP testing.


Package Files


func NewSession Uses

func NewSession(state xmpp.SessionState, rw io.ReadWriter) *xmpp.Session

NewSession returns a new XMPP session with the state bits set to state|xmpp.Ready, the origin JID set to "test@example.net" and the location JID set to "example.net".

NewSession panics on error for ease of use in testing, where a panic is acceptable.

func NopNegotiator Uses

func NopNegotiator(state xmpp.SessionState) xmpp.Negotiator

NopNegotiator marks the state as ready (by returning state|xmpp.Ready) and does not actually transmit any data over the wire or perform any other session negotiation.

Package xmpptest imports 4 packages (graph). Updated 2019-06-11. Refresh now. Tools for package owners.