Improves test suite performance - this should shed a few minutes off of the test runs.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user