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.
85 lines
1.7 KiB
85 lines
1.7 KiB
package convert
|
|
|
|
import (
|
|
"matchmaking-system/internal/biz/structure"
|
|
"reflect"
|
|
"testing"
|
|
)
|
|
|
|
func TestConvertAggregates(t *testing.T) {
|
|
type args struct {
|
|
body string
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
args args
|
|
want *structure.Aggregates
|
|
wantErr bool
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
got, err := ConvertAggregates(tt.args.body)
|
|
if (err != nil) != tt.wantErr {
|
|
t.Errorf("ConvertAggregates() error = %v, wantErr %v", err, tt.wantErr)
|
|
return
|
|
}
|
|
if !reflect.DeepEqual(got, tt.want) {
|
|
t.Errorf("ConvertAggregates() got = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
func TestConvertEod(t *testing.T) {
|
|
type args struct {
|
|
body string
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
args args
|
|
want []*structure.Eod
|
|
wantErr bool
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
got, err := ConvertEod(tt.args.body)
|
|
if (err != nil) != tt.wantErr {
|
|
t.Errorf("ConvertEod() error = %v, wantErr %v", err, tt.wantErr)
|
|
return
|
|
}
|
|
if !reflect.DeepEqual(got, tt.want) {
|
|
t.Errorf("ConvertEod() got = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|
|
func TestConvertInTraDay(t *testing.T) {
|
|
type args struct {
|
|
body string
|
|
}
|
|
tests := []struct {
|
|
name string
|
|
args args
|
|
want []*structure.InTraDay
|
|
wantErr bool
|
|
}{
|
|
// TODO: Add test cases.
|
|
}
|
|
for _, tt := range tests {
|
|
t.Run(tt.name, func(t *testing.T) {
|
|
got, err := ConvertInTraDay(tt.args.body)
|
|
if (err != nil) != tt.wantErr {
|
|
t.Errorf("ConvertInTraDay() error = %v, wantErr %v", err, tt.wantErr)
|
|
return
|
|
}
|
|
if !reflect.DeepEqual(got, tt.want) {
|
|
t.Errorf("ConvertInTraDay() got = %v, want %v", got, tt.want)
|
|
}
|
|
})
|
|
}
|
|
}
|
|
|