Improves test suite performance - this should shed a few minutes off of the test runs.

This commit is contained in:
Shannon
2013-12-28 14:35:43 +11:00
parent b924b06062
commit 57d1ff20fd
10 changed files with 75 additions and 38 deletions

View File

@@ -22,6 +22,8 @@ namespace Umbraco.Tests.PublishedContent
get { return DatabaseBehavior.NoDatabasePerFixture; }
}
private IUmbracoSettingsSection _umbracoSettings;
public override void Initialize()
{
// required so we can access property.Value
@@ -29,7 +31,11 @@ namespace Umbraco.Tests.PublishedContent
base.Initialize();
var scriptingMock = Mock.Get(UmbracoSettings.Scripting);
//generate new mock settings and assign so we can configure in individual tests
_umbracoSettings = SettingsForTests.GenerateMockSettings();
SettingsForTests.ConfigureSettings(_umbracoSettings);
var scriptingMock = Mock.Get(_umbracoSettings.Scripting);
scriptingMock.Setup(x => x.DataTypeModelStaticMappings).Returns(new List<IRazorStaticMapping>());
// need to specify a custom callback for unit tests