public void PopulateFeatureAddsExplorerControllerOfType() { var sut = new GenericControllerFeatureProvider <NullAction>(); var feature = new ControllerFeature(); sut.PopulateFeature(Enumerable.Empty <ApplicationPart>(), feature); Assert.Contains(typeof(ExplorerController <NullAction>), feature.Controllers); }
public void PopulateFeatureDoesntAddExistingActionController() { var sut = new GenericControllerFeatureProvider <NullAction>(); var feature = new ControllerFeature(); feature.Controllers.Add(typeof(NullActionController).GetTypeInfo()); sut.PopulateFeature(Enumerable.Empty <ApplicationPart>(), feature); Assert.DoesNotContain(typeof(ExplorerController <NullAction>), feature.Controllers); }
public void ImplementsApplicationFeatureProvider() { var sut = new GenericControllerFeatureProvider <NullAction>(); Assert.IsAssignableFrom <IApplicationFeatureProvider <ControllerFeature> >(sut); }