public void TestAttachedComponentNames_NotEmpty() { var attachedComponentNames = new List <string> { "module1", "module2", }; var provider = new DependencyInjectionComponentStateProvider(attachedComponentNames); Assert.NotEmpty(provider.AttachedComponentNames); }
public void TestAttachedComponentNames_DoesNotContainsModule() { var attachedComponentNames = new List <string> { "module1", "module2", }; var provider = new DependencyInjectionComponentStateProvider(attachedComponentNames); Assert.DoesNotContain(provider.AttachedComponentNames, f => f == "module3"); }
public IReadOnlyList <ServiceRegistration> GetServiceRegistrations() { // Create component state provider instance var attachedComponentNames = _components .Select(m => m.Name) .ToList(); var componentStateProvider = new DependencyInjectionComponentStateProvider(attachedComponentNames); _providers[Providers.DependencyInjectionComponentStateProvider].ImplementationInstance = componentStateProvider; return(new List <ServiceRegistration>() .Union(_providers.Values) .ToList()); }