diff --git a/src/Orchard.Tests/DisplayManagement/Descriptors/StylesheetBindingStrategyTests.cs b/src/Orchard.Tests/DisplayManagement/Descriptors/StylesheetBindingStrategyTests.cs index fa10824a2..03bcfe58b 100644 --- a/src/Orchard.Tests/DisplayManagement/Descriptors/StylesheetBindingStrategyTests.cs +++ b/src/Orchard.Tests/DisplayManagement/Descriptors/StylesheetBindingStrategyTests.cs @@ -25,7 +25,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { protected override void Register(Autofac.ContainerBuilder builder) { _descriptor = new ShellDescriptor { }; _testViewEngine = new TestViewEngine(); - _testVirtualPathProvider = new TestVirtualPathProvider(); + _testVirtualPathProvider = new TestVirtualPathProvider { TestViewEngine = _testViewEngine }; builder.Register(ctx => _descriptor); builder.RegisterType().As(); @@ -44,6 +44,8 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { } public class TestVirtualPathProvider : IVirtualPathProvider { + public TestViewEngine TestViewEngine { get; set; } + public string Combine(params string[] paths) { throw new NotImplementedException(); } @@ -89,7 +91,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { } public IEnumerable ListFiles(string path) { - return new List {"~/Modules/Alpha/Styles/AlphaStyle.css"}; + return TestViewEngine.Keys.Select(o => o.ToString()); } public IEnumerable ListDirectories(string path) { @@ -129,6 +131,7 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { AddEnabledFeature("Alpha"); _testViewEngine.Add("~/Modules/Alpha/Styles/AlphaShape.css", null); + _testViewEngine.Add("~/Modules/Alpha/Styles/alpha-shape.css", null); var strategy = _container.Resolve(); IList alterationBuilders = new List(); @@ -137,6 +140,15 @@ namespace Orchard.Tests.DisplayManagement.Descriptors { var alterations = alterationBuilders.Select(alterationBuilder=>alterationBuilder.Build()); Assert.That(alterations.Any(alteration => alteration.ShapeType == "Style")); + + var descriptor = new ShapeDescriptor { ShapeType = "Style" }; + alterations.Aggregate(descriptor, (d, alteration) => { + alteration.Alter(d); + return d; + }); + + var keys = descriptor.Bindings.Select(b => b.Key); + Assert.That(keys.Count() == keys.Select(k => k.ToLowerInvariant()).Distinct().Count(), "Descriptors should never vary by case only."); } } diff --git a/src/Orchard.Web/Modules/Lucene/Lucene.csproj b/src/Orchard.Web/Modules/Lucene/Lucene.csproj index a367dca3b..6a6e8ed4c 100644 --- a/src/Orchard.Web/Modules/Lucene/Lucene.csproj +++ b/src/Orchard.Web/Modules/Lucene/Lucene.csproj @@ -68,6 +68,9 @@ Orchard.Framework + + +