public StorefrontContext(ISitecoreService sitecoreService, IConnectEntityProvider connectEntityProvider) { Assert.ArgumentNotNull(connectEntityProvider, nameof(connectEntityProvider)); Assert.ArgumentNotNull(sitecoreService, nameof(sitecoreService)); this.sitecoreService = sitecoreService; this.shopProvider = connectEntityProvider.GetShopProvider(); this.connectStorefrontContext = connectEntityProvider.GetConnectStorefrontContext(); }
public StorefrontContextTests() { this.fixture = new Fixture().Customize(new AutoDbCustomization()); this.sitecoreService = Substitute.For <ISitecoreService>(); var connectEntityProvider = Substitute.For <IConnectEntityProvider>(); this.shopProvider = Substitute.For <IShopProvider>(); this.connectStorefrontContext = Substitute.For <IConnectStorefrontContext>(); connectEntityProvider.GetConnectStorefrontContext().Returns(this.connectStorefrontContext); connectEntityProvider.GetShopProvider().Returns(this.shopProvider); this.storefrontContext = new StorefrontContext(this.sitecoreService, connectEntityProvider); }