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:
Shannon Deminick
2012-09-11 04:43:30 +07:00
parent fe92947d72
commit 37969909ca
4 changed files with 19 additions and 4 deletions

View File

@@ -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);

View File

@@ -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>

View File

@@ -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(

View File

@@ -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
{ }
}