0

I have a method that uses an package method dao.ToVendorId, how can i mock it??

func group(context context.Execution, dataStore dataStore) (map[string][]VendorItem, map[string]string, error) {

    for _,info := range dataStore.Items {
        if itemId, err := dao.ToVendorId(context, info.Seller, info.Id); err != nil {
            return vendorItems, vendorDataTranslated, err
        } else {
      //More Code
        }
    }
    return vendorItems, vendorDataTranslated, nil;
}
Sly
  • 1,145
  • 7
  • 19
Vipercold
  • 599
  • 1
  • 7
  • 27

0 Answers0