public void ShouldAddExpectedFeatureName_TheNamespaceClosestToTheController2() { var fc = new FeatureConvention(); var model = new ControllerModel(typeof(Features.Controller1).GetTypeInfo(), new List <object>()) { ControllerName = "Controller1" }; fc.Apply(model); model.Properties.Should().ContainKey("feature"); model.Properties["feature"].Should().IsSameOrEqualTo("Features"); }
public void ShouldAddFeatureAsAnEmptyStringForControllersFoundWithoutAClearReference() { var fc = new FeatureConvention(); var model = new ControllerModel(typeof(Mvc.Controller1).GetTypeInfo(), new List <object>()) { ControllerName = "Controller1" }; fc.Apply(model); model.Properties.Should().ContainKey("feature"); model.Properties["feature"].Should().IsSameOrEqualTo(string.Empty); }