Updated the DynamicDocument and node unit tests to not init a db each time, runs much faster though in the future
we might have to re-enable this in a smart way.
This commit is contained in:
@@ -52,8 +52,9 @@ namespace Umbraco.Tests.DynamicDocument
|
||||
|
||||
protected override dynamic GetDynamicNode(int id)
|
||||
{
|
||||
var template = Template.MakeNew("test", new User(0));
|
||||
var ctx = GetUmbracoContext("/test", template.Id);
|
||||
//var template = Template.MakeNew("test", new User(0));
|
||||
//var ctx = GetUmbracoContext("/test", template.Id);
|
||||
var ctx = GetUmbracoContext("/test", 1234);
|
||||
var contentStore = new DefaultPublishedContentStore();
|
||||
var doc = contentStore.GetDocumentById(ctx, id);
|
||||
Assert.IsNotNull(doc);
|
||||
|
||||
@@ -12,6 +12,11 @@ namespace Umbraco.Tests.DynamicDocument
|
||||
[TestFixture]
|
||||
public abstract class DynamicDocumentTestsBase<TDocument, TDocumentList> : BaseWebTest
|
||||
{
|
||||
protected override bool RequiresDbSetup
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the dynamic node/document to run tests against
|
||||
/// </summary>
|
||||
|
||||
@@ -33,8 +33,9 @@ namespace Umbraco.Tests.DynamicDocument
|
||||
|
||||
protected override dynamic GetDynamicNode(int id)
|
||||
{
|
||||
var template = Template.MakeNew("test", new User(0));
|
||||
var ctx = GetUmbracoContext("/test", template.Id);
|
||||
//var template = Template.MakeNew("test", new User(0));
|
||||
//var ctx = GetUmbracoContext("/test", template.Id);
|
||||
var ctx = GetUmbracoContext("/test", 1234);
|
||||
var contentStore = new DefaultPublishedContentStore();
|
||||
var node = new DynamicNode(
|
||||
new DynamicBackingItem(
|
||||
|
||||
@@ -5,6 +5,14 @@ using System.Text;
|
||||
|
||||
namespace umbraco.interfaces
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Any class that implements this interface will be instantiated at application startup
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// NOTE: It is not recommended to use this interface and instead use IApplicationEventHandler
|
||||
/// and bind to any custom events in the OnApplicationInitialized method.
|
||||
/// </remarks>
|
||||
public interface IApplicationStartupHandler
|
||||
{ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user