Refactored the traversal, ishelper, etc... methods to be extension methods on IPublishedContent so now all of these methods are available on the Typed object not just the dynamic object which makes a whole lot more sense... and you can have intellisense.

Updated DynamicPublishedContent's methods to just proxy calls to the new extension methods so that all of the logic is contained in one place.
Added new GetRootDocuments to the IPublishedContentStore since we need this in order to get the root list of documents for many of these methods.
Fixed an issue with the DynamicNode to IPublishedContent converter.
Fixed many of the failing unit tests.
This commit is contained in:
Shannon Deminick
2012-10-04 01:31:08 +05:00
parent 831d1966dc
commit c0102f1c71
40 changed files with 2391 additions and 2120 deletions

View File

@@ -17,14 +17,14 @@ namespace Umbraco.Tests.DynamicDocument
{
base.Initialize();
DynamicPublishedContentDataSourceResolver.Current = new DynamicPublishedContentDataSourceResolver(
new TestDynamicPublishedContentDataSource());
}
public override void TearDown()
{
base.TearDown();
DynamicPublishedContentDataSourceResolver.Reset();
}
protected override bool RequiresDbSetup
@@ -32,20 +32,6 @@ namespace Umbraco.Tests.DynamicDocument
get { return false; }
}
private class TestDynamicPublishedContentDataSource : IDynamicPublishedContentDataSource
{
public Guid GetDataType(string docTypeAlias, string propertyAlias)
{
if (propertyAlias == "content")
{
//return the rte type id
return Guid.Parse("5e9b75ae-face-41c8-b47e-5f4b0fd82f83");
}
return Guid.Empty;
}
}
/// <summary>
/// Returns the dynamic node/document to run tests against