SyncMadeEasy/force-app/main/default/classes/BatchForCreateWebhookMultiS...

46 lines
1.8 KiB
OpenEdge ABL

@istest
public class BatchForCreateWebhookMultiStore_Test {
@isTest
public static void Test1() {
HIC_ShopifySync__HIC_Configuration__c cnf = new HIC_ShopifySync__HIC_Configuration__c();
cnf.HIC_ShopifySync__Shopify_URL__c='https://www.google.com';
cnf.HIC_ShopifySync__API_Key__c = 'test21';
cnf.HIC_ShopifySync__Private_Key_Password__c = 'test12';
cnf.HIC_ShopifySync__Opportunity__c = True;
cnf.HIC_ShopifySync__Order__c= True;
cnf.HIC_ShopifySync__Opportunity_Line_Item__c = True;
cnf.HIC_ShopifySync__Order_Line_Item__c = True;
cnf.HIC_ShopifySync__Order_Fulfillment__c = True;
cnf.HIC_ShopifySync__Person_Account__c = True;
cnf.HIC_ShopifySync__Enable_Draft_Order__c = True;
cnf.HIC_ShopifySync__Inventory_Location__c = true;
cnf.HIC_ShopifySync__Store__c = 'test';
insert cnf;
HIC_ShopifySync__HIC_Webhook__c webhk =new HIC_ShopifySync__HIC_Webhook__c();
webhk.HIC_ShopifySync__DML_Type__c ='test';
webhk.HIC_ShopifySync__External_Id__c='test';
webhk.HIC_ShopifySync__SF_URL_Mapping__c='test';
webhk.HIC_ShopifySync__Shopify_Object__c='Order';
webhk.HIC_ShopifySync__Topic__c='test';
webhk.HIC_ShopifySync__Store__c='test';
insert webhk;
Test.startTest();
BatchForCreateWebhookMultiStore obj = new BatchForCreateWebhookMultiStore('test');
DataBase.executeBatch(obj);
// sobj.BatchForCreateWebhookMultiStore('123');
BatchForCreateWebhookMultiStore obj2 = new BatchForCreateWebhookMultiStore();
DataBase.executeBatch(obj2);
Test.stopTest();
System.assert(webhk.Id != null);
}
}