Simplifies more of the interface config collection to reduce nesting.
This commit is contained in:
@@ -32,17 +32,17 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
[Test]
|
||||
public virtual void ExternalLogger_Assembly()
|
||||
{
|
||||
Assert.IsTrue(Section.Logging.ExternalLogger.Assembly == "~/bin/assemblyFileName.dll");
|
||||
Assert.IsTrue(Section.Logging.ExternalLoggerAssembly == "~/bin/assemblyFileName.dll");
|
||||
}
|
||||
[Test]
|
||||
public virtual void ExternalLogger_Type()
|
||||
{
|
||||
Assert.IsTrue(Section.Logging.ExternalLogger.ExternalLoggerType == "fully.qualified.namespace.and.type");
|
||||
Assert.IsTrue(Section.Logging.ExternalLoggerType == "fully.qualified.namespace.and.type");
|
||||
}
|
||||
[Test]
|
||||
public virtual void ExternalLogger_LogAuditTrail()
|
||||
{
|
||||
Assert.IsTrue(Section.Logging.ExternalLogger.LogAuditTrail == false);
|
||||
Assert.IsTrue(Section.Logging.ExternalLoggerEnableAuditTrail == false);
|
||||
}
|
||||
[Test]
|
||||
public void AutoCleanLogs()
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
[Test]
|
||||
public void Users()
|
||||
{
|
||||
Assert.IsTrue(Section.Providers.Users.DefaultBackOfficeProvider == "UsersMembershipProvider");
|
||||
Assert.IsTrue(Section.Providers.DefaultBackOfficeUserProvider == "UsersMembershipProvider");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
[Test]
|
||||
public void RemoveDoubleDashes()
|
||||
{
|
||||
Assert.IsTrue(Section.RequestHandler.UrlReplacing.RemoveDoubleDashes == true);
|
||||
Assert.IsTrue(Section.RequestHandler.RemoveDoubleDashes == true);
|
||||
|
||||
}
|
||||
[Test]
|
||||
@@ -29,14 +29,14 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
{
|
||||
var chars = @" ,"",',%,.,;,/,\,:,#,+,*,&,?,æ,ø,å,ä,ö,ü,ß,Ä,Ö,|,<,>";
|
||||
var items = chars.Split(',');
|
||||
Assert.AreEqual(items.Length, Section.RequestHandler.UrlReplacing.CharCollection.Count());
|
||||
Assert.IsTrue(Section.RequestHandler.UrlReplacing.CharCollection
|
||||
Assert.AreEqual(items.Length, Section.RequestHandler.CharCollection.Count());
|
||||
Assert.IsTrue(Section.RequestHandler.CharCollection
|
||||
.All(x => items.Contains(x.Char)));
|
||||
|
||||
var vals = @"-,plus,star,ae,oe,aa,ae,oe,ue,ss,ae,oe,-";
|
||||
var splitVals = vals.Split(',');
|
||||
Assert.AreEqual(splitVals.Length, Section.RequestHandler.UrlReplacing.CharCollection.Count(x => x.Replacement.IsNullOrWhiteSpace() == false));
|
||||
Assert.IsTrue(Section.RequestHandler.UrlReplacing.CharCollection
|
||||
Assert.AreEqual(splitVals.Length, Section.RequestHandler.CharCollection.Count(x => x.Replacement.IsNullOrWhiteSpace() == false));
|
||||
Assert.IsTrue(Section.RequestHandler.CharCollection
|
||||
.All(x => string.IsNullOrEmpty(x.Replacement) || vals.Split(',').Contains(x.Replacement)));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
[Test]
|
||||
public override void DataTypeModelStaticMappings()
|
||||
{
|
||||
Assert.AreEqual(0, Section.Scripting.Razor.DataTypeModelStaticMappings.Count());
|
||||
Assert.AreEqual(0, Section.Scripting.DataTypeModelStaticMappings.Count());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,14 +10,14 @@ namespace Umbraco.Tests.Configurations.UmbracoSettings
|
||||
[Test]
|
||||
public void NotDynamicXmlDocumentElements()
|
||||
{
|
||||
Assert.IsTrue(Section.Scripting.Razor.NotDynamicXmlDocumentElements
|
||||
Assert.IsTrue(Section.Scripting.NotDynamicXmlDocumentElements
|
||||
.All(x => "p,div,ul,span".Split(',').Contains(x.Element)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public virtual void DataTypeModelStaticMappings()
|
||||
{
|
||||
var mappings = Section.Scripting.Razor.DataTypeModelStaticMappings.ToArray();
|
||||
var mappings = Section.Scripting.DataTypeModelStaticMappings.ToArray();
|
||||
Assert.IsTrue(mappings[0].DataTypeGuid == Guid.Parse("A3DB4034-BCB0-4E69-B3EE-DD4E6ECA74C2"));
|
||||
Assert.IsTrue(mappings[0].MappingName == "MyName.1");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user