public void AddServicesExtensionRegistersNeededServices() { InventoryDependencyExtensions.AddDefaultInventoryServices(this.serviceCollection); this.AddItemRegistryMock(); this.BuildServiceProvider(); this.serviceProvider.GetRequiredService <IInventoryFactory>() .Should().BeOfType <InventoryFactory>(); this.serviceProvider.GetRequiredService <IItemFactory>() .Should().BeOfType <ItemFactory>(); }
public void RunningAddServiceExtensionsOnNullThrowsArgumentNullException() { Action act = () => InventoryDependencyExtensions.AddDefaultInventoryServices(null); act.Should().Throw <ArgumentNullException>(); }