public void CanSelectASettingsThemeWithInvalidWebConfigTheme() { var settings = MockAppFactory.GetMockSettings(); var mapper = new MockPathMapper(); var themeElement = new ThemeElement{ SelectedTheme = "InvalidTheme" }; var selectedTheme = themeElement.FindTheme(settings, mapper); Assert.AreEqual("PerfectBlemish", selectedTheme); }
public void CanSelectAWebConfigTheme() { var settings = MockAppFactory.GetMockSettings(); var mapper = new MockPathMapper(); var themeElement = new ThemeElement{ SelectedTheme = "PrePaid" }; var selectedTheme = themeElement.FindTheme(settings, mapper); Assert.AreEqual("PrePaid", selectedTheme); }
public void Can_Generate_Css_Possiblity() { var aliases = new List<string> { "css" }; var pathMapper = new MockPathMapper(); var syntaxPossiblities = new SyntaxPossibilities(pathMapper, "CSharp"); var csharpPossiblity = syntaxPossiblities.FindPossibility("Css"); Assert.IsNotNull(csharpPossiblity); aliases.ForEach(alias => Assert.IsTrue(csharpPossiblity.PossibleAliases.Contains(alias))); }
public void ReturnsNullIfNeitherExists() { var settings = MockAppFactory.GetMockSettings(); settings.BlogTheme = ""; var mapper = new MockPathMapper(); var themeElement = new ThemeElement(); var selectedTheme = themeElement.FindTheme(settings, mapper); Assert.IsNull(selectedTheme); }
public void Path_Mapper_Can_Identify_A_Folder() { var pathMapper = new MockPathMapper(); var path = pathMapper.MapPath("~/Content/codeHighlighter/scripts"); Assert.IsNotNull(path); Assert.AreNotEqual(string.Empty, path); Assert.IsTrue(path.Contains("Content/codeHighlighter/scripts")); Assert.IsTrue(Directory.Exists(path)); }
public void Can_Generate_Possibilities_For_Various_Brushes() { var possibleBrushes = new List<string> { "AppleScript", "AS3", "Bash", "ColdFusion", "Cpp", "CSharp", "Css", "Delphi", "Diff", "Erlang", "Groovy", "Java", "JavaFX", "JScript", "Perl", "Php", "Plain", "PowerShell", "Python", "Ruby", "Sass", "Scala", "Sql", "Vb", "Xml" }; var pathMapper = new MockPathMapper(); var syntaxPossiblities = new SyntaxPossibilities(pathMapper, "CSharp"); possibleBrushes.ForEach(brush => Assert.IsNotNull(syntaxPossiblities.FindPossibility(brush))); possibleBrushes.ForEach(brush => { SyntaxPossibility possibility = syntaxPossiblities.FindPossibility(brush); possibility.PossibleAliases.ForEach(alias => Assert.IsFalse(string.IsNullOrEmpty(alias))); }); }