-
Notifications
You must be signed in to change notification settings - Fork 216
Open
Description
I'm trying to create a test for B2BUtils.resolveCommunityIdToWebstoreId and am running into problems creating the WebStoreNetwork in my @testsetup
@isTest
private class B2BUtilsTest {
@testSetup static void setup() {
WebStore testWebStore = new WebStore(Name='TestWebStore', DefaultLanguage='en_US');
insert testWebStore;
WebStoreNetwork testWebStoreNetwork = new WebStoreNetwork(WebStoreId=testWebStore.Id);
insert testWebStoreNetwork;
}
In the Developer Console, I see the following errors:
Field is not writeable: WebStoreNetwork.WebStoreIdDML operation Insert not allowed on WebStoreNetwork
I extremely new to Salesforce development and apologize if this problem has an obvious solution. I'm not able to find any documentation on the WebStoreNetwork object or how to create one.
On a side note, if this repo is really intended to be a quickstart, it seems like a bare minimum requirement would be 75% test coverage on the included utility classes. Currently, there are at least four classes that have no tests whatsoever: B2BCartToOrderDraft, B2BGetInfo, B2BUtils and SalesforceAdapter
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels