public void MultitenantTests_Configure_Validate_Valid() { var container = new StashboxContainer(); container.Register <IA, A>(); var md = new TenantDistributor(container); md.ConfigureTenant("A", c => c.Register <D>()); md.Validate(); }
public void MultitenantTests_Configure_Validate_Root_And_Tenants_Throws() { var container = new StashboxContainer(); container.Register <D>(); var md = new TenantDistributor(container); md.ConfigureTenant("A", c => c.Register <D>()); var exception = Assert.Throws <AggregateException>(() => md.Validate()); Assert.Equal(2, exception.InnerExceptions.Count); }