protected void SetupDefaultServiceProvider() { this.RealMeta = this.DefaultRealMeta; this.FakeMeta = this.DefaultFakeMeta; this.ActionMeta = this.DefaultActionMeta; this.SetupServiceProvider(this.DefaultRealMeta, this.DefaultFakeMeta, this.DefaultActionMeta); this.Item = (Item)this.ItemFactory.CreateItem(this.DefaultRealMeta, 1); this.FakeItem = (FakeItem)this.ItemFactory.CreateItem(this.DefaultFakeMeta, 1); this.ActionItem = (RealActionItem)this.ItemFactory.CreateItem(this.DefaultActionMeta, 1); }
protected void SetupDependencies() { RealActionItem.Reset(); this.ItemRegistry = new ItemRegistry(); this.ServiceCollection = new ServiceCollection(); this.ServiceCollection.AddInventoryServices(); if (this.ItemFactoryMock != null) { this.ServiceCollection.AddTransient(x => this.ItemFactoryMock.Object); } else { this.ServiceCollection.AddDefaultItemFactory(); } if (this.InventoryFactoryMock != null) { this.ServiceCollection.AddTransient(x => this.InventoryFactoryMock.Object); } else { this.ServiceCollection.AddDefaultInventoryFactory(); } if (this.ItemSplitStrategyHandlerMock != null) { this.ServiceCollection.AddTransient(x => this.ItemSplitStrategyHandlerMock.Object); } else { this.ServiceCollection.AddDefaultInventorySplitStrategy(); } if (this.ItemMergeStrategyHandlerMock != null) { this.ServiceCollection.AddTransient(x => this.ItemMergeStrategyHandlerMock.Object); } else { this.ServiceCollection.AddDefaultInventoryMergeStrategy(); } }