public void AppendsViewToName() { var convention = new DefaultViewNamingConvention(); var names = convention.GetAlternativeNames(RequestBuilder.CreateRequest().BuildControllerContext(), "EditCustomer").ToArray(); Assert.AreEqual(2, names.Length); Assert.AreEqual("EditCustomer", names[0]); Assert.AreEqual("EditCustomerView", names[1]); }
/// <summary> /// Initializes a new instance of the <see cref="ReflectionBasedViewEngine"/> class. /// </summary> protected ReflectionBasedViewEngine(params Assembly[] additionalViewAssemblies) { NamespaceConvention = new DefaultViewNamespaceConvention(); NamingConvention = new DefaultViewNamingConvention(); if (additionalViewAssemblies == null) return; foreach (var assembly in additionalViewAssemblies) { AdditionalViewAssemblies.Add(assembly); } }
/// <summary> /// Initializes a new instance of the <see cref="ReflectionBasedViewEngine"/> class. /// </summary> protected ReflectionBasedViewEngine(params Assembly[] additionalViewAssemblies) { NamespaceConvention = new DefaultViewNamespaceConvention(); NamingConvention = new DefaultViewNamingConvention(); if (additionalViewAssemblies == null) { return; } foreach (var assembly in additionalViewAssemblies) { AdditionalViewAssemblies.Add(assembly); } }