public void Setup() { _helper = new LegacyShortStringHelper(); var currDir = new DirectoryInfo(TestHelpers.TestHelper.CurrentAssemblyDirectory); Directory.CreateDirectory(Path.Combine(currDir.Parent.Parent.FullName, "config")); File.Copy( currDir.Parent.Parent.Parent.GetDirectories("Umbraco.Web.UI") .First() .GetDirectories("config").First() .GetFiles("umbracoSettings.Release.config").First().FullName, Path.Combine(currDir.Parent.Parent.FullName, "config", "umbracoSettings.config"), true); Core.Configuration.UmbracoSettings.SettingsFilePath = Core.IO.IOHelper.MapPath(Core.IO.SystemDirectories.Config + Path.DirectorySeparatorChar, false); }
public void Setup() { var config = SettingsForTests.GetDefault(); SettingsForTests.ConfigureSettings(config); _helper = new LegacyShortStringHelper(); }
[TestCase("WhoIsNumber6InTheVillage", "Who Is Number6In The Village")] // we're happy to reproduce the issue public void CompatibleLegacyReplacement(string input, string expected) { var helper = new LegacyShortStringHelper(); var output = input.Length < 2 ? input : helper.SplitPascalCasing(input, ' ').ToFirstUpperInvariant(); Assert.AreEqual(expected, output); }
public void Setup() { TestHelper.EnsureUmbracoSettingsConfig(); _helper = new LegacyShortStringHelper(); }