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.
81 lines
1.5 KiB
81 lines
1.5 KiB
package offer |
|
|
|
import ( |
|
"reflect" |
|
"testing" |
|
|
|
"go-common/app/job/main/app-wall/model/offer" |
|
) |
|
|
|
func TestService_activeConsumer(t *testing.T) { |
|
tests := []struct { |
|
name string |
|
s *Service |
|
}{ |
|
// TODO: Add test cases. |
|
} |
|
for _, tt := range tests { |
|
t.Run(tt.name, func(t *testing.T) { |
|
tt.s.activeConsumer() |
|
}) |
|
} |
|
} |
|
|
|
func TestService_checkMsgIllegal(t *testing.T) { |
|
type args struct { |
|
msg []byte |
|
} |
|
tests := []struct { |
|
name string |
|
s *Service |
|
args args |
|
wantActive *offer.ActiveMsg |
|
wantErr bool |
|
}{ |
|
// TODO: Add test cases. |
|
} |
|
for _, tt := range tests { |
|
t.Run(tt.name, func(t *testing.T) { |
|
gotActive, err := tt.s.checkMsgIllegal(tt.args.msg) |
|
if (err != nil) != tt.wantErr { |
|
t.Errorf("Service.checkMsgIllegal() error = %v, wantErr %v", err, tt.wantErr) |
|
return |
|
} |
|
if !reflect.DeepEqual(gotActive, tt.wantActive) { |
|
t.Errorf("Service.checkMsgIllegal() = %v, want %v", gotActive, tt.wantActive) |
|
} |
|
}) |
|
} |
|
} |
|
|
|
func TestService_activeproc(t *testing.T) { |
|
tests := []struct { |
|
name string |
|
s *Service |
|
}{ |
|
// TODO: Add test cases. |
|
} |
|
for _, tt := range tests { |
|
t.Run(tt.name, func(t *testing.T) { |
|
tt.s.activeproc() |
|
}) |
|
} |
|
} |
|
|
|
func TestService_active(t *testing.T) { |
|
type args struct { |
|
msg *offer.ActiveMsg |
|
} |
|
tests := []struct { |
|
name string |
|
s *Service |
|
args args |
|
}{ |
|
// TODO: Add test cases. |
|
} |
|
for _, tt := range tests { |
|
t.Run(tt.name, func(t *testing.T) { |
|
tt.s.active(tt.args.msg) |
|
}) |
|
} |
|
}
|
|
|