35 lines
696 B

package producers
import (
"github.com/streadway/amqp"
"matchmaking-system/internal/conf"
"reflect"
"testing"
)
func TestNewProducer(t *testing.T) {
type args struct {
f *conf.Data
con *amqp.Connection
}
tests := []struct {
name string
args args
want *Producer
wantErr bool
}{
// TODO: Add test cases.
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, err := NewProducer(tt.args.f, tt.args.con)
if (err != nil) != tt.wantErr {
t.Errorf("NewProducer() error = %v, wantErr %v", err, tt.wantErr)
return
}
if !reflect.DeepEqual(got, tt.want) {
t.Errorf("NewProducer() got = %v, want %v", got, tt.want)
}
})
}
}