diff --git a/src/Umbraco.Core/Models/IPublishedContent.cs b/src/Umbraco.Core/Models/IPublishedContent.cs
index 213a0e5ed3..6f55bdb413 100644
--- a/src/Umbraco.Core/Models/IPublishedContent.cs
+++ b/src/Umbraco.Core/Models/IPublishedContent.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
namespace Umbraco.Core.Models
{
@@ -10,7 +11,7 @@ namespace Umbraco.Core.Models
///
/// A replacement for INode which needs to occur since INode doesn't contain the document type alias
/// and INode is poorly formatted with mutable properties (i.e. Lists instead of IEnumerable)
- ///
+ ///
public interface IPublishedContent
{
int Id { get; }
diff --git a/src/Umbraco.Tests/EnumerableExtensionsTests.cs b/src/Umbraco.Tests/EnumerableExtensionsTests.cs
index 870e607f19..0fd436fcea 100644
--- a/src/Umbraco.Tests/EnumerableExtensionsTests.cs
+++ b/src/Umbraco.Tests/EnumerableExtensionsTests.cs
@@ -7,16 +7,34 @@ using umbraco.BusinessLogic;
namespace Umbraco.Tests
{
- [TestFixture]
+ [TestFixture]
public class EnumerableExtensionsTests
{
- [Test]
- public void Flatten_List()
- {
- var hierarchy = new TestItem()
- {
- Children = new List()
+ [Test]
+ public void Flatten_List_2()
+ {
+ var hierarchy = new TestItem()
+ {
+ Children = new List()
+ {
+ new TestItem(),
+ new TestItem(),
+ new TestItem()
+ }
+ };
+
+ var flattened = hierarchy.Children.FlattenList(x => x.Children);
+
+ Assert.AreEqual(3, flattened.Count());
+ }
+
+ [Test]
+ public void Flatten_List()
+ {
+ var hierarchy = new TestItem()
+ {
+ Children = new List()
{
new TestItem()
{
@@ -65,12 +83,12 @@ namespace Umbraco.Tests
}
},
}
- };
+ };
- var flattened = hierarchy.Children.FlattenList(x => x.Children);
+ var flattened = hierarchy.Children.FlattenList(x => x.Children);
Assert.AreEqual(10, flattened.Count());
- }
+ }
private class TestItem
{
@@ -78,7 +96,7 @@ namespace Umbraco.Tests
{
Children = Enumerable.Empty();
}
- public IEnumerable Children { get; set; }
+ public IEnumerable Children { get; set; }
}
[Test]
diff --git a/src/Umbraco.Tests/PublishedContent/StronglyTypedQueryTests.cs b/src/Umbraco.Tests/PublishedContent/StronglyTypedQueryTests.cs
index e437829956..cd974fa534 100644
--- a/src/Umbraco.Tests/PublishedContent/StronglyTypedQueryTests.cs
+++ b/src/Umbraco.Tests/PublishedContent/StronglyTypedQueryTests.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Linq;
using NUnit.Framework;
using Umbraco.Core.Configuration;
@@ -216,6 +217,7 @@ namespace Umbraco.Tests.PublishedContent
}
}
+ [DebuggerDisplay("Content Id: {Id}, Name: {Name}")]
public class PublishedContentWrapper : IPublishedContent, IOwnerCollectionAware
{
protected IPublishedContent WrappedContent { get; private set; }
diff --git a/src/Umbraco.Web/Models/DynamicPublishedContent.cs b/src/Umbraco.Web/Models/DynamicPublishedContent.cs
index 4eae00ff5f..35f2040410 100644
--- a/src/Umbraco.Web/Models/DynamicPublishedContent.cs
+++ b/src/Umbraco.Web/Models/DynamicPublishedContent.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
+using System.Diagnostics;
using System.Dynamic;
using System.Linq;
using System.Web;
@@ -20,6 +21,7 @@ namespace Umbraco.Web.Models
///
/// The base dynamic model for views
///
+ [DebuggerDisplay("Content Id: {Id}, Name: {Name}")]
public class DynamicPublishedContent : DynamicObject, IPublishedContent, IOwnerCollectionAware
{
protected internal IPublishedContent PublishedContent { get; private set; }
diff --git a/src/Umbraco.Web/Models/PublishedContentBase.cs b/src/Umbraco.Web/Models/PublishedContentBase.cs
index fc19775bfa..12501c6fac 100644
--- a/src/Umbraco.Web/Models/PublishedContentBase.cs
+++ b/src/Umbraco.Web/Models/PublishedContentBase.cs
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
+using System.Diagnostics;
using System.Linq;
using System.Text;
using Umbraco.Core;
@@ -17,6 +18,7 @@ namespace Umbraco.Web.Models
/// This also ensures that we have an OwnersCollection property so that the IsFirst/IsLast/Index helper methods work
/// when referenced inside the result of a collection. http://issues.umbraco.org/issue/U4-1797
///
+ [DebuggerDisplay("Content Id: {Id}, Name: {Name}")]
public abstract class PublishedContentBase : IPublishedContent, IOwnerCollectionAware
{
private string _url;