Ejemplo n.º 1
0
        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");
        }
Ejemplo n.º 2
0
        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);
        }