func TestCreatePusherInitializesMarshaller(t *testing.T) {
	theMarshaller := serialization.NewJsonMarshaller()
	result := CreatePusher(aAppId, aAppKey, aAppSecret, aPoster, theMarshaller)

	if result.marshaller != theMarshaller {
		t.Error("marshaller not initialized correctly")
	}
}
Beispiel #2
0
package gopusher

import (
	"github.com/pjvds/pusher-go-server/serialization"
)

var (
	aAppId      = "myappid"
	aAppKey     = "myappkey"
	aAppSecret  = "myappsecret"
	aPoster     = &NullPoster{}
	aMarshaller = serialization.NewJsonMarshaller()
)