2012-10-18 11:49:44 -02:00
|
|
|
|
using System;
|
2013-03-09 10:43:34 -01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.ComponentModel;
|
2012-10-18 11:49:44 -02:00
|
|
|
|
using System.Configuration;
|
|
|
|
|
|
using System.Data.SqlServerCe;
|
|
|
|
|
|
using System.IO;
|
2013-03-14 01:07:54 +04:00
|
|
|
|
using System.Linq;
|
2012-10-25 18:38:23 -02:00
|
|
|
|
using System.Web.Routing;
|
|
|
|
|
|
using System.Xml;
|
2012-10-18 11:49:44 -02:00
|
|
|
|
using NUnit.Framework;
|
2012-12-15 10:33:29 +05:00
|
|
|
|
using SQLCE4Umbraco;
|
2012-10-25 18:38:23 -02:00
|
|
|
|
using Umbraco.Core;
|
2012-11-02 10:18:07 -01:00
|
|
|
|
using Umbraco.Core.Configuration;
|
2013-02-20 05:54:41 +06:00
|
|
|
|
using Umbraco.Core.Logging;
|
2012-10-25 18:38:23 -02:00
|
|
|
|
using Umbraco.Core.ObjectResolution;
|
2012-10-18 11:49:44 -02:00
|
|
|
|
using Umbraco.Core.Persistence;
|
2013-03-13 01:09:29 +04:00
|
|
|
|
using Umbraco.Core.Persistence.Mappers;
|
2012-12-27 19:53:01 -01:00
|
|
|
|
using Umbraco.Core.Persistence.SqlSyntax;
|
2012-12-11 12:03:36 +05:00
|
|
|
|
using Umbraco.Core.Persistence.UnitOfWork;
|
|
|
|
|
|
using Umbraco.Core.Publishing;
|
2012-11-12 07:40:11 -01:00
|
|
|
|
using Umbraco.Core.Services;
|
2012-10-25 18:38:23 -02:00
|
|
|
|
using Umbraco.Tests.Stubs;
|
|
|
|
|
|
using Umbraco.Web;
|
|
|
|
|
|
using Umbraco.Web.Routing;
|
|
|
|
|
|
using umbraco.BusinessLogic;
|
2012-10-18 11:49:44 -02:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Tests.TestHelpers
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Use this abstract class for tests that requires a Sql Ce database populated with the umbraco db schema.
|
2013-01-02 10:44:28 -01:00
|
|
|
|
/// The PetaPoco Database class should be used through the <see cref="DefaultDatabaseFactory"/>.
|
2012-10-18 11:49:44 -02:00
|
|
|
|
/// </summary>
|
2012-10-30 19:27:47 -01:00
|
|
|
|
[TestFixture, RequiresSTA]
|
2013-03-13 18:31:07 +04:00
|
|
|
|
public abstract class BaseDatabaseFactoryTest : BaseUmbracoApplicationTest
|
2012-10-18 11:49:44 -02:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
//This is used to indicate that this is the first test to run in the test session, if so, we always
|
|
|
|
|
|
//ensure a new database file is used.
|
|
|
|
|
|
private static volatile bool _firstRunInTestSession = true;
|
2013-03-14 01:07:54 +04:00
|
|
|
|
private static readonly object Locker = new object();
|
2013-03-14 02:43:17 +04:00
|
|
|
|
private bool _firstTestInFixture = true;
|
|
|
|
|
|
|
|
|
|
|
|
//Used to flag if its the first test in the current session
|
|
|
|
|
|
private bool _isFirstRunInTestSession = false;
|
|
|
|
|
|
//Used to flag if its the first test in the current fixture
|
|
|
|
|
|
private bool _isFirstTestInFixture = false;
|
2013-03-14 01:07:54 +04:00
|
|
|
|
|
2012-10-18 11:49:44 -02:00
|
|
|
|
[SetUp]
|
2013-03-13 18:31:07 +04:00
|
|
|
|
public override void Initialize()
|
2012-10-18 11:49:44 -02:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
InitializeFirstRunFlags();
|
|
|
|
|
|
|
2013-03-13 18:31:07 +04:00
|
|
|
|
base.Initialize();
|
2012-10-30 15:03:58 -01:00
|
|
|
|
|
2013-03-13 18:31:07 +04:00
|
|
|
|
var path = TestHelper.CurrentAssemblyDirectory;
|
2012-10-18 11:49:44 -02:00
|
|
|
|
AppDomain.CurrentDomain.SetData("DataDirectory", path);
|
|
|
|
|
|
|
2012-12-14 08:06:32 +05:00
|
|
|
|
ApplicationContext.Current = new ApplicationContext(
|
|
|
|
|
|
//assign the db context
|
|
|
|
|
|
new DatabaseContext(new DefaultDatabaseFactory()),
|
|
|
|
|
|
//assign the service context
|
|
|
|
|
|
new ServiceContext(new PetaPocoUnitOfWorkProvider(), new FileUnitOfWorkProvider(), new PublishingStrategy())) { IsReady = true };
|
2013-03-14 01:07:54 +04:00
|
|
|
|
|
|
|
|
|
|
DatabaseContext.Initialize();
|
|
|
|
|
|
|
2013-03-14 02:43:17 +04:00
|
|
|
|
CreateDatabase();
|
|
|
|
|
|
|
2013-02-19 22:46:44 +06:00
|
|
|
|
InitializeDatabase();
|
2013-03-05 21:52:22 +06:00
|
|
|
|
|
|
|
|
|
|
//ensure the configuration matches the current version for tests
|
|
|
|
|
|
SettingsForTests.ConfigurationStatus = UmbracoVersion.Current.ToString(3);
|
2013-02-19 22:46:44 +06:00
|
|
|
|
}
|
2013-03-14 02:43:17 +04:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// The database behavior to use for the test/fixture
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
protected virtual DbInitBehavior DatabaseTestBehavior
|
2013-03-14 01:07:54 +04:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
get { return DbInitBehavior.NewSchemaPerTest; }
|
2013-03-14 01:07:54 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Creates the SqlCe database if required
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
protected virtual void CreateDatabase()
|
|
|
|
|
|
{
|
|
|
|
|
|
var path = TestHelper.CurrentAssemblyDirectory;
|
2013-03-14 02:43:17 +04:00
|
|
|
|
|
2013-03-14 01:07:54 +04:00
|
|
|
|
//Get the connectionstring settings from config
|
|
|
|
|
|
var settings = ConfigurationManager.ConnectionStrings[Core.Configuration.GlobalSettings.UmbracoConnectionName];
|
|
|
|
|
|
ConfigurationManager.AppSettings.Set(Core.Configuration.GlobalSettings.UmbracoConnectionName, @"datalayer=SQLCE4Umbraco.SqlCEHelper,SQLCE4Umbraco;data source=|DataDirectory|\UmbracoPetaPocoTests.sdf");
|
|
|
|
|
|
|
|
|
|
|
|
string dbFilePath = string.Concat(path, "\\UmbracoPetaPocoTests.sdf");
|
|
|
|
|
|
|
2013-03-14 02:43:17 +04:00
|
|
|
|
//create a new database file if
|
|
|
|
|
|
// - is the first test in the session
|
|
|
|
|
|
// - the database file doesn't exist
|
|
|
|
|
|
// - NewDbFileAndSchemaPerTest
|
|
|
|
|
|
// - _isFirstTestInFixture + DbInitBehavior.NewDbFileAndSchemaPerFixture
|
|
|
|
|
|
|
|
|
|
|
|
//if this is the first test in the session, always ensure a new db file is created
|
|
|
|
|
|
if (_isFirstRunInTestSession || !File.Exists(dbFilePath)
|
|
|
|
|
|
|| DatabaseTestBehavior == DbInitBehavior.NewDbFileAndSchemaPerTest
|
|
|
|
|
|
|| (_isFirstTestInFixture && DatabaseTestBehavior == DbInitBehavior.NewDbFileAndSchemaPerFixture))
|
2013-03-14 01:07:54 +04:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
|
|
|
|
|
|
RemoveDatabaseFile(ex =>
|
2013-03-14 01:07:54 +04:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
//if this doesn't work we have to make sure everything is reset! otherwise
|
|
|
|
|
|
// well run into issues because we've already set some things up
|
|
|
|
|
|
TearDown();
|
|
|
|
|
|
throw ex;
|
|
|
|
|
|
});
|
2013-03-14 01:07:54 +04:00
|
|
|
|
|
|
|
|
|
|
//Create the Sql CE database
|
|
|
|
|
|
var engine = new SqlCeEngine(settings.ConnectionString);
|
|
|
|
|
|
engine.CreateDatabase();
|
|
|
|
|
|
}
|
2013-03-14 02:43:17 +04:00
|
|
|
|
|
|
|
|
|
|
//clear the database if
|
|
|
|
|
|
// - NewSchemaPerTest
|
|
|
|
|
|
// - _isFirstTestInFixture + DbInitBehavior.NewSchemaPerFixture
|
|
|
|
|
|
|
|
|
|
|
|
else if (DatabaseTestBehavior == DbInitBehavior.NewSchemaPerTest
|
|
|
|
|
|
|| (_isFirstTestInFixture && DatabaseTestBehavior == DbInitBehavior.NewSchemaPerFixture))
|
2013-03-14 01:07:54 +04:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
DatabaseContext.Database.UninstallDatabaseSchema();
|
|
|
|
|
|
}
|
2013-03-14 01:07:54 +04:00
|
|
|
|
}
|
|
|
|
|
|
|
2013-03-13 18:31:07 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// sets up resolvers before resolution is frozen
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
protected override void FreezeResolution()
|
2013-02-20 02:50:08 +06:00
|
|
|
|
{
|
2013-03-13 18:31:07 +04:00
|
|
|
|
DataTypesResolver.Current = new DataTypesResolver(
|
|
|
|
|
|
() => PluginManager.Current.ResolveDataTypes());
|
|
|
|
|
|
|
|
|
|
|
|
RepositoryResolver.Current = new RepositoryResolver(
|
|
|
|
|
|
new RepositoryFactory());
|
|
|
|
|
|
|
|
|
|
|
|
SqlSyntaxProvidersResolver.Current = new SqlSyntaxProvidersResolver(
|
|
|
|
|
|
new List<Type> { typeof(MySqlSyntaxProvider), typeof(SqlCeSyntaxProvider), typeof(SqlServerSyntaxProvider) }) { CanResolveBeforeFrozen = true };
|
|
|
|
|
|
|
|
|
|
|
|
MappingResolver.Current = new MappingResolver(
|
|
|
|
|
|
() => PluginManager.Current.ResolveAssignedMapperTypes());
|
|
|
|
|
|
|
|
|
|
|
|
base.FreezeResolution();
|
2013-02-20 02:50:08 +06:00
|
|
|
|
}
|
|
|
|
|
|
|
2013-03-14 01:07:54 +04:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Creates the tables and data for the database
|
|
|
|
|
|
/// </summary>
|
2013-02-19 22:46:44 +06:00
|
|
|
|
protected virtual void InitializeDatabase()
|
|
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
//create the schema and load default data if:
|
|
|
|
|
|
// - is the first test in the session
|
|
|
|
|
|
// - NewSchemaPerTest
|
|
|
|
|
|
// - NewDbFileAndSchemaPerTest
|
|
|
|
|
|
// - _isFirstTestInFixture + DbInitBehavior.NewSchemaPerFixture
|
|
|
|
|
|
// - _isFirstTestInFixture + DbInitBehavior.NewDbFileAndSchemaPerFixture
|
|
|
|
|
|
|
|
|
|
|
|
if (_isFirstRunInTestSession
|
|
|
|
|
|
|| DatabaseTestBehavior == DbInitBehavior.NewSchemaPerTest
|
|
|
|
|
|
|| (_isFirstTestInFixture && DatabaseTestBehavior == DbInitBehavior.NewSchemaPerFixture))
|
|
|
|
|
|
{
|
|
|
|
|
|
//Create the umbraco database and its base data
|
|
|
|
|
|
DatabaseContext.Database.CreateDatabaseSchema(false);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TestFixtureTearDown]
|
|
|
|
|
|
public void FixtureTearDown()
|
|
|
|
|
|
{
|
|
|
|
|
|
if (DatabaseTestBehavior == DbInitBehavior.NewDbFileAndSchemaPerFixture)
|
|
|
|
|
|
{
|
|
|
|
|
|
RemoveDatabaseFile();
|
|
|
|
|
|
}
|
2012-10-18 11:49:44 -02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
[TearDown]
|
2013-03-13 18:31:07 +04:00
|
|
|
|
public override void TearDown()
|
2012-10-18 11:49:44 -02:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
_isFirstTestInFixture = false; //ensure this is false before anything!
|
2012-12-27 19:53:01 -01:00
|
|
|
|
|
2013-03-14 02:43:17 +04:00
|
|
|
|
if (DatabaseTestBehavior == DbInitBehavior.NewDbFileAndSchemaPerTest)
|
|
|
|
|
|
{
|
|
|
|
|
|
RemoveDatabaseFile();
|
|
|
|
|
|
}
|
|
|
|
|
|
else if (DatabaseTestBehavior == DbInitBehavior.NewSchemaPerTest)
|
|
|
|
|
|
{
|
|
|
|
|
|
DatabaseContext.Database.UninstallDatabaseSchema();
|
|
|
|
|
|
//TestHelper.ClearDatabase();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
AppDomain.CurrentDomain.SetData("DataDirectory", null);
|
2013-03-14 01:07:54 +04:00
|
|
|
|
|
2013-03-09 10:43:34 -01:00
|
|
|
|
SqlSyntaxContext.SqlSyntaxProvider = null;
|
2013-03-14 02:43:17 +04:00
|
|
|
|
|
|
|
|
|
|
base.TearDown();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void CloseDbConnections()
|
|
|
|
|
|
{
|
|
|
|
|
|
//Ensure that any database connections from a previous test is disposed.
|
|
|
|
|
|
//This is really just double safety as its also done in the TearDown.
|
|
|
|
|
|
if (ApplicationContext != null && DatabaseContext != null && DatabaseContext.Database != null)
|
|
|
|
|
|
DatabaseContext.Database.Dispose();
|
|
|
|
|
|
SqlCeContextGuardian.CloseBackgroundConnection();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void InitializeFirstRunFlags()
|
|
|
|
|
|
{
|
|
|
|
|
|
//this needs to be thread-safe
|
|
|
|
|
|
_isFirstRunInTestSession = false;
|
|
|
|
|
|
if (_firstRunInTestSession)
|
2013-02-20 05:54:41 +06:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
lock (Locker)
|
2013-03-14 01:07:54 +04:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
if (_firstRunInTestSession)
|
2013-03-14 01:07:54 +04:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
_isFirstRunInTestSession = true; //set the flag
|
|
|
|
|
|
_firstRunInTestSession = false;
|
2013-03-14 01:07:54 +04:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2013-03-14 02:43:17 +04:00
|
|
|
|
}
|
|
|
|
|
|
if (_firstTestInFixture)
|
|
|
|
|
|
{
|
|
|
|
|
|
lock (Locker)
|
2013-02-20 05:54:41 +06:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
if (_firstTestInFixture)
|
|
|
|
|
|
{
|
|
|
|
|
|
_isFirstTestInFixture = true; //set the flag
|
|
|
|
|
|
_firstTestInFixture = false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2013-03-14 01:07:54 +04:00
|
|
|
|
|
2013-03-14 02:43:17 +04:00
|
|
|
|
private void RemoveDatabaseFile(Action<Exception> onFail = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
CloseDbConnections();
|
|
|
|
|
|
string path = TestHelper.CurrentAssemblyDirectory;
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
string filePath = string.Concat(path, "\\UmbracoPetaPocoTests.sdf");
|
|
|
|
|
|
if (File.Exists(filePath))
|
|
|
|
|
|
{
|
|
|
|
|
|
File.Delete(filePath);
|
2013-02-20 05:54:41 +06:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2013-03-14 02:43:17 +04:00
|
|
|
|
catch (Exception ex)
|
2013-02-20 05:54:41 +06:00
|
|
|
|
{
|
2013-03-14 02:43:17 +04:00
|
|
|
|
LogHelper.Error<BaseDatabaseFactoryTest>("Could not remove the old database file", ex);
|
|
|
|
|
|
|
|
|
|
|
|
//We will swallow this exception! That's because a sub class might require further teardown logic.
|
|
|
|
|
|
if (onFail != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
onFail(ex);
|
|
|
|
|
|
}
|
2013-02-20 07:07:57 +06:00
|
|
|
|
}
|
2012-10-18 11:49:44 -02:00
|
|
|
|
}
|
2012-10-25 18:38:23 -02:00
|
|
|
|
|
2012-12-14 08:06:32 +05:00
|
|
|
|
protected ServiceContext ServiceContext
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return ApplicationContext.Services; }
|
|
|
|
|
|
}
|
2012-10-30 15:03:58 -01:00
|
|
|
|
|
2012-12-14 08:06:32 +05:00
|
|
|
|
protected DatabaseContext DatabaseContext
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return ApplicationContext.DatabaseContext; }
|
|
|
|
|
|
}
|
2012-10-30 15:03:58 -01:00
|
|
|
|
|
2012-10-25 18:38:23 -02:00
|
|
|
|
protected UmbracoContext GetUmbracoContext(string url, int templateId, RouteData routeData = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var ctx = new UmbracoContext(
|
|
|
|
|
|
GetHttpContextFactory(url, routeData).HttpContext,
|
2013-01-30 14:45:13 -01:00
|
|
|
|
ApplicationContext);
|
2012-10-25 18:38:23 -02:00
|
|
|
|
SetupUmbracoContextForTest(ctx, templateId);
|
|
|
|
|
|
return ctx;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected FakeHttpContextFactory GetHttpContextFactory(string url, RouteData routeData = null)
|
|
|
|
|
|
{
|
|
|
|
|
|
var factory = routeData != null
|
|
|
|
|
|
? new FakeHttpContextFactory(url, routeData)
|
|
|
|
|
|
: new FakeHttpContextFactory(url);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//set the state helper
|
|
|
|
|
|
StateHelper.HttpContext = factory.HttpContext;
|
|
|
|
|
|
|
|
|
|
|
|
return factory;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
internal virtual IRoutesCache GetRoutesCache()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new FakeRoutesCache();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Initlializes the UmbracoContext with specific XML
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="umbracoContext"></param>
|
|
|
|
|
|
/// <param name="templateId"></param>
|
|
|
|
|
|
protected void SetupUmbracoContextForTest(UmbracoContext umbracoContext, int templateId)
|
|
|
|
|
|
{
|
|
|
|
|
|
umbracoContext.GetXmlDelegate = () =>
|
|
|
|
|
|
{
|
|
|
|
|
|
var xDoc = new XmlDocument();
|
|
|
|
|
|
|
|
|
|
|
|
//create a custom xml structure to return
|
|
|
|
|
|
|
|
|
|
|
|
xDoc.LoadXml(GetXmlContent(templateId));
|
|
|
|
|
|
//return the custom x doc
|
|
|
|
|
|
return xDoc;
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
protected virtual string GetXmlContent(int templateId)
|
|
|
|
|
|
{
|
|
|
|
|
|
return @"<?xml version=""1.0"" encoding=""utf-8""?>
|
|
|
|
|
|
<!DOCTYPE root[
|
|
|
|
|
|
<!ELEMENT Home ANY>
|
|
|
|
|
|
<!ATTLIST Home id ID #REQUIRED>
|
|
|
|
|
|
<!ELEMENT CustomDocument ANY>
|
|
|
|
|
|
<!ATTLIST CustomDocument id ID #REQUIRED>
|
|
|
|
|
|
]>
|
|
|
|
|
|
<root id=""-1"">
|
|
|
|
|
|
<Home id=""1046"" parentID=""-1"" level=""1"" writerID=""0"" creatorID=""0"" nodeType=""1044"" template=""" + templateId + @""" sortOrder=""1"" createDate=""2012-06-12T14:13:17"" updateDate=""2012-07-20T18:50:43"" nodeName=""Home"" urlName=""home"" writerName=""admin"" creatorName=""admin"" path=""-1,1046"" isDoc="""">
|
|
|
|
|
|
<content><![CDATA[]]></content>
|
|
|
|
|
|
<umbracoUrlAlias><![CDATA[this/is/my/alias, anotheralias]]></umbracoUrlAlias>
|
|
|
|
|
|
<umbracoNaviHide>1</umbracoNaviHide>
|
|
|
|
|
|
<Home id=""1173"" parentID=""1046"" level=""2"" writerID=""0"" creatorID=""0"" nodeType=""1044"" template=""" + templateId + @""" sortOrder=""2"" createDate=""2012-07-20T18:06:45"" updateDate=""2012-07-20T19:07:31"" nodeName=""Sub1"" urlName=""sub1"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173"" isDoc="""">
|
|
|
|
|
|
<content><![CDATA[<div>This is some content</div>]]></content>
|
|
|
|
|
|
<umbracoUrlAlias><![CDATA[page2/alias, 2ndpagealias]]></umbracoUrlAlias>
|
|
|
|
|
|
<Home id=""1174"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1044"" template=""" + templateId + @""" sortOrder=""2"" createDate=""2012-07-20T18:07:54"" updateDate=""2012-07-20T19:10:27"" nodeName=""Sub2"" urlName=""sub2"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1174"" isDoc="""">
|
|
|
|
|
|
<content><![CDATA[]]></content>
|
|
|
|
|
|
<umbracoUrlAlias><![CDATA[only/one/alias]]></umbracoUrlAlias>
|
|
|
|
|
|
<creatorName><![CDATA[Custom data with same property name as the member name]]></creatorName>
|
|
|
|
|
|
</Home>
|
|
|
|
|
|
<Home id=""1176"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1044"" template=""" + templateId + @""" sortOrder=""3"" createDate=""2012-07-20T18:08:08"" updateDate=""2012-07-20T19:10:52"" nodeName=""Sub 3"" urlName=""sub-3"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1176"" isDoc="""">
|
|
|
|
|
|
<content><![CDATA[]]></content>
|
|
|
|
|
|
</Home>
|
|
|
|
|
|
<CustomDocument id=""1177"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""4"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-18T14:23:35"" nodeName=""custom sub 1"" urlName=""custom-sub-1"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1177"" isDoc="""" />
|
|
|
|
|
|
<CustomDocument id=""1178"" parentID=""1173"" level=""3"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""4"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-16T14:23:35"" nodeName=""custom sub 2"" urlName=""custom-sub-2"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1173,1178"" isDoc="""" />
|
|
|
|
|
|
</Home>
|
|
|
|
|
|
<Home id=""1175"" parentID=""1046"" level=""2"" writerID=""0"" creatorID=""0"" nodeType=""1044"" template=""" + templateId + @""" sortOrder=""3"" createDate=""2012-07-20T18:08:01"" updateDate=""2012-07-20T18:49:32"" nodeName=""Sub 2"" urlName=""sub-2"" writerName=""admin"" creatorName=""admin"" path=""-1,1046,1175"" isDoc=""""><content><![CDATA[]]></content>
|
|
|
|
|
|
</Home>
|
|
|
|
|
|
</Home>
|
|
|
|
|
|
<CustomDocument id=""1172"" parentID=""-1"" level=""1"" writerID=""0"" creatorID=""0"" nodeType=""1234"" template=""" + templateId + @""" sortOrder=""2"" createDate=""2012-07-16T15:26:59"" updateDate=""2012-07-18T14:23:35"" nodeName=""Test"" urlName=""test-page"" writerName=""admin"" creatorName=""admin"" path=""-1,1172"" isDoc="""" />
|
|
|
|
|
|
</root>";
|
|
|
|
|
|
}
|
2012-10-18 11:49:44 -02:00
|
|
|
|
}
|
|
|
|
|
|
}
|