You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
695 B
36 lines
695 B
2 months ago
|
package consumer
|
||
|
|
||
|
import (
|
||
|
"github.com/streadway/amqp"
|
||
|
"matchmaking-system/internal/conf"
|
||
|
"reflect"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestNewConsumer(t *testing.T) {
|
||
|
type args struct {
|
||
|
f *conf.Data
|
||
|
con *amqp.Connection
|
||
|
}
|
||
|
tests := []struct {
|
||
|
name string
|
||
|
args args
|
||
|
want *Consumer
|
||
|
wantErr bool
|
||
|
}{
|
||
|
// TODO: Add test cases.
|
||
|
}
|
||
|
for _, tt := range tests {
|
||
|
t.Run(tt.name, func(t *testing.T) {
|
||
|
got, err := NewConsumer(tt.args.f, tt.args.con)
|
||
|
if (err != nil) != tt.wantErr {
|
||
|
t.Errorf("NewConsumer() error = %v, wantErr %v", err, tt.wantErr)
|
||
|
return
|
||
|
}
|
||
|
if !reflect.DeepEqual(got, tt.want) {
|
||
|
t.Errorf("NewConsumer() got = %v, want %v", got, tt.want)
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
}
|